From: David Ahern <dsahern@gmail.com>
To: Andrea Mayer <andrea.mayer@uniroma2.it>,
"David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Jakub Kicinski <kuba@kernel.org>, Shuah Khan <shuah@kernel.org>,
Shrijeet Mukherjee <shrijeet@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Cc: Stefano Salsano <stefano.salsano@uniroma2.it>,
Paolo Lungaroni <paolo.lungaroni@cnit.it>,
Ahmed Abdelsalam <ahabdels.dev@gmail.com>
Subject: Re: [net-next,v1,1/5] vrf: add mac header for tunneled packets when sniffer is attached
Date: Tue, 3 Nov 2020 15:39:50 -0700 [thread overview]
Message-ID: <bf69c702-db2f-b9f2-148e-17a325a3cbda@gmail.com> (raw)
In-Reply-To: <20201103125242.11468-2-andrea.mayer@uniroma2.it>
On 11/3/20 5:52 AM, Andrea Mayer wrote:
> Before this patch, a sniffer attached to a VRF used as the receiving
> interface of L3 tunneled packets detects them as malformed packets and
> it complains about that (i.e.: tcpdump shows bogus packets).
>
> The reason is that a tunneled L3 packet does not carry any L2
> information and when the VRF is set as the receiving interface of a
> decapsulated L3 packet, no mac header is currently set or valid.
> Therefore, the purpose of this patch consists of adding a MAC header to
> any packet which is directly received on the VRF interface ONLY IF:
>
> i) a sniffer is attached on the VRF and ii) the mac header is not set.
>
> In this case, the mac address of the VRF is copied in both the
> destination and the source address of the ethernet header. The protocol
> type is set either to IPv4 or IPv6, depending on which L3 packet is
> received.
>
> Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
> ---
> drivers/net/vrf.c | 78 +++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 72 insertions(+), 6 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2020-11-03 22:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 12:52 [net-next,v1,0/5] seg6: add support for SRv6 End.DT4 behavior Andrea Mayer
2020-11-03 12:52 ` [net-next,v1,1/5] vrf: add mac header for tunneled packets when sniffer is attached Andrea Mayer
2020-11-03 22:39 ` David Ahern [this message]
2020-11-03 12:52 ` [net-next,v1,2/5] seg6: improve management of behavior attributes Andrea Mayer
2020-11-03 12:52 ` [net-next,v1,3/5] seg6: add callbacks for customizing the creation/destruction of a behavior Andrea Mayer
2020-11-03 12:52 ` [net-next,v1,4/5] seg6: add support for the SRv6 End.DT4 behavior Andrea Mayer
2020-11-03 12:52 ` [net-next,v1,5/5] selftests: add selftest " Andrea Mayer
2020-11-03 22:46 ` David Ahern
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=bf69c702-db2f-b9f2-148e-17a325a3cbda@gmail.com \
--to=dsahern@gmail.com \
--cc=ahabdels.dev@gmail.com \
--cc=andrea.mayer@uniroma2.it \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paolo.lungaroni@cnit.it \
--cc=shrijeet@gmail.com \
--cc=shuah@kernel.org \
--cc=songliubraving@fb.com \
--cc=stefano.salsano@uniroma2.it \
--cc=yhs@fb.com \
--cc=yoshfuji@linux-ipv6.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