Received: with ECARTIS (v1.0.0; list netdev); Fri, 31 Dec 2004 12:03:38 -0800 (PST) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iBVK35Wi015385 for ; Fri, 31 Dec 2004 12:03:25 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CkT7b-00007s-GU for netdev@oss.sgi.com; Fri, 31 Dec 2004 15:11:39 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CkT7Y-0004Me-2b; Fri, 31 Dec 2004 15:11:36 -0500 Subject: Re: patch: tunnels not setting inputdev From: jamal Reply-To: hadi@cyberus.ca To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, Wichert Akkerman In-Reply-To: <41D5941C.8060001@trash.net> References: <1104513392.1048.316.camel@jzny.localdomain> <41D5941C.8060001@trash.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1104523892.1047.338.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 31 Dec 2004 15:11:32 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.80/645/Mon Dec 27 14:56:20 2004 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean X-archive-position: 13311 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-12-31 at 13:02, Patrick McHardy wrote: > jamal wrote: > > --- 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. Same logic can apply to xfrm6_input then - since both are not exactly tunnels. I didnt check the code path - iam gonna assume you are right and kill those two. > For the remaining changes, why not simply set > input_dev in netif_receive_skb before the call to ing_filter ? > You want to be able to filter on indev at ingress - it is safer for whoever calls netif_rx() to do the setting. The packet could be looped from egress multiple times as well (redirected). > > 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. Go ahead kill it there and in net/pkt_cls.h cheers, jamal