netdev
[Top] [All Lists]

Re: patch: tunnels not setting inputdev

To: hadi@xxxxxxxxxx
Subject: Re: patch: tunnels not setting inputdev
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Fri, 31 Dec 2004 19:02:04 +0100
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Wichert Akkerman <wichert@xxxxxxxxx>
In-reply-to: <1104513392.1048.316.camel@jzny.localdomain>
References: <1104513392.1048.316.camel@jzny.localdomain>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
jamal wrote:
Dave,

Patch attached that has tunnels setting input dev correctly.

Incorporates what ive sent to Wichert already.

A lot of the stuff the tunnels do is very similar, so maybe wiser to
have something like tunnel_type_trans().

cheers,
jamal


------------------------------------------------------------------------

--- 2610-bk1/net/ipv4/xfrm4_input.c     2004/12/31 17:00:25     1.1
+++ 2610-bk1/net/ipv4/xfrm4_input.c     2004/12/31 17:01:05
@@ -142,6 +142,7 @@
                        dst_release(skb->dst);
                        skb->dst = NULL;
                }
+               skb->input_dev = skb->dev;

This is not necessary, xfrm4_input doesn't change anything regarding devices, so if it was correct before, it is still correct. For the remaining changes, why not simply set input_dev in netif_receive_skb before the call to ing_filter ?


                netif_rx(skb);
                return 0;
        } else {

Another question - why is ing_filter exported when CONFIG_NET_CLS_ACT is defined ? Nobody uses it currently outside of dev.c.

Regards
Patrick

<Prev in Thread] Current Thread [Next in Thread>