From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: David Miller <davem@davemloft•net>
Cc: yamahata@valinux•co.jp, netdev@vger•kernel.org,
murphy.mccauley@gmail•com, jasowang@redhat•com, mst@redhat•com,
edumazet@google•com, kaber@trash•net, honkiko@gmail•com,
ramirose@gmail•com, tparkin@katalix•com,
xiyou.wangcong@gmail•com, pshelar@nicira•com, jesse@nicira•com,
dev@openvswitch•org
Subject: Re: [PATCH] core/dev: set pkt_type after eth_type_trans() in dev_forward_skb()
Date: Fri, 05 Jul 2013 09:48:01 +0200 [thread overview]
Message-ID: <51D67A31.1020601@6wind.com> (raw)
In-Reply-To: <20130704.145712.2078075601927798473.davem@davemloft.net>
Le 04/07/2013 23:57, David Miller a écrit :
> From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
> Date: Wed, 03 Jul 2013 16:53:52 +0200
>
>> Le 03/07/2013 01:00, David Miller a écrit :
>>> From: Isaku Yamahata <yamahata@valinux•co.jp>
>>> Date: Tue, 2 Jul 2013 20:30:10 +0900
>>>
>>>> The dev_forward_skb() assignment of pkt_type should be done
>>>> after the call to eth_type_trans().
>>>>
>>>> ip-encapsulated packets can be handled by localhost. But skb->pkt_type
>>>> can be PACKET_OTHERHOST when packet comes via veth into ip tunnel
>>>> device.
>>>> In that case, the packet is dropped by ip_rcv().
>>>> Although this example uses gretap. l2tp-eth also has same issue.
>>>> For l2tp-eth case, add dummy device for ip address and ip l2tp
>>>> command.
>>> ...
>>>> Signed-off-by: Isaku Yamahata <yamahata@valinux•co.jp>
>>>
>>> Applied, but I had to adjust the patch because in net-next we use
>>> a new helper function (skb_scrub_packet()) to clear things out from
>>> dev_forward_skb().
>> What about calling skb_scrub_packet() after eth_type_trans()?
>>
>> I wonder if the same problem may happen the day gre will support
>> x-netns,
>> because skb_scrub_packet() is also called before eth_type_trans() in
>> ip_tunnel_rcv().
>
> That's a fine suggestion, I was just being overly conservative in my
> forward-porting of his patch.
>
Ok, I will wait that net-next opens to submit this patch.
prev parent reply other threads:[~2013-07-05 7:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 11:30 [PATCH] core/dev: set pkt_type after eth_type_trans() in dev_forward_skb() Isaku Yamahata
2013-07-02 23:00 ` David Miller
2013-07-03 14:53 ` Nicolas Dichtel
2013-07-04 21:57 ` David Miller
2013-07-05 7:48 ` Nicolas Dichtel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D67A31.1020601@6wind.com \
--to=nicolas.dichtel@6wind$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dev@openvswitch$(echo .)org \
--cc=edumazet@google$(echo .)com \
--cc=honkiko@gmail$(echo .)com \
--cc=jasowang@redhat$(echo .)com \
--cc=jesse@nicira$(echo .)com \
--cc=kaber@trash$(echo .)net \
--cc=mst@redhat$(echo .)com \
--cc=murphy.mccauley@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pshelar@nicira$(echo .)com \
--cc=ramirose@gmail$(echo .)com \
--cc=tparkin@katalix$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
--cc=yamahata@valinux$(echo .)co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox