From: David Miller <davem@davemloft.net>
To: maheshb@google.com
Cc: mahesh@bandewar.net, netdev@vger.kernel.org, edumazet@google.com,
amit.sikka@ericsson.com
Subject: Re: [PATCH next] ipvlan: add L2 check for packets arriving via virtual devices
Date: Mon, 11 Dec 2017 15:16:05 -0500 (EST) [thread overview]
Message-ID: <20171211.151605.338267507460459106.davem@davemloft.net> (raw)
In-Reply-To: <CAF2d9jit3jNemKVU0tXHNOknpb=pXejXi1Y+1aFGdHfAVcbjwQ@mail.gmail.com>
From: Mahesh Bandewar (महेश बंडेवार) <maheshb@google.com>
Date: Mon, 11 Dec 2017 11:38:04 -0800
> On Mon, Dec 11, 2017 at 8:15 AM, David Miller <davem@davemloft.net> wrote:
>> From: Mahesh Bandewar <mahesh@bandewar.net>
>> Date: Thu, 7 Dec 2017 15:15:43 -0800
>>
>>> From: Mahesh Bandewar <maheshb@google.com>
>>>
>>> Packets that don't have dest mac as the mac of the master device should
>>> not be entertained by the IPvlan rx-handler. This is mostly true as the
>>> packet path mostly takes care of that, except when the master device is
>>> a virtual device. As demonstrated in the following case -
>> ...
>>> This patch adds that missing check in the IPvlan rx-handler.
>>>
>>> Reported-by: Amit Sikka <amit.sikka@ericsson.com>
>>> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
>>
>> Applied, but it's a shame that the data plane takes on this new MAC
>> compare operation.
> Your comment made me think little more about this and a discussion
> with Eric kind of put things in perspective. eth_type_trans() does the
> right thing and sets the packet_type correctly (when .ndo_xmit of veth
> is called). However IPvlan is over-aggressive in packet scrubbing and
> that scrub changes packet type. This causes the actual problem. It's
> not clear to me why skb_scrub_packet() changes the packet type to
> PACKET_HOST unconditionally? But that's another issue.
>
> I'll send another patch to remove excessive scrubbing in IPvlan and
> revert of this patch so that this additional comparison (though not
> expensive!) can be avoided.
Thanks for looking more deeply into this.
prev parent reply other threads:[~2017-12-11 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 23:15 [PATCH next] ipvlan: add L2 check for packets arriving via virtual devices Mahesh Bandewar
2017-12-11 16:15 ` David Miller
2017-12-11 19:38 ` Mahesh Bandewar (महेश बंडेवार)
2017-12-11 20:16 ` David Miller [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=20171211.151605.338267507460459106.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=amit.sikka@ericsson.com \
--cc=edumazet@google.com \
--cc=mahesh@bandewar.net \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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