Re: [PATCH 2/3] [VLAN]: Update iif when receiving via VLAN device
From: Thomas Graf <tgraf@suug.ch>
Date: 2006-06-30 21:20:27
From: Thomas Graf <tgraf@suug.ch>
Date: 2006-06-30 21:20:27
* jamal [off-list ref] 2006-06-30 17:09
On Fri, 2006-30-06 at 19:13 +0200, Thomas Graf wrote:quoted
Index: net-2.6.git/drivers/net/ifb.c ===================================================================--- net-2.6.git.orig/drivers/net/ifb.c +++ net-2.6.git/drivers/net/ifb.c@@ -158,19 +158,23 @@ static int ifb_xmit(struct sk_buff *skb, stats->tx_packets++; stats->tx_bytes+=skb->len; - if (!from || !skb->input_dev) { + if (!from || !skb->iif) {Can you have something similar to what you did in tcf_match_indev above? i.e grab dev by skb->iif so as to increment refcount - if it doesnt exist it becomes equivalent to !skb->input_dev and if it exists you drop the ref inside the else below after changing input_dev
A non-existant iif is already equivalent to !iif since it jumps into the same branch. Grabing a reference is completely pointless, the netdevice represented by skb->iif is at this point until the packet gets queued covered by a reference taken in netif_rx().