Thread (14 messages) 14 messages, 2 authors, 2022-07-29

Re: [PATCH] net/ipv4/ip_gre.c net/ipv6/ip6_gre.c: ip and gre header are recorded twice

From: Aleksey Shumnik <hidden>
Date: 2022-06-28 15:18:43

On Fri, Jun 24, 2022 at 8:17 PM Jakub Kicinski [off-list ref] wrote:
On Fri, 24 Jun 2022 16:51:41 +0300 Aleksey Shumnik wrote:
quoted
On Fri, Jun 24, 2022 at 6:26 AM Jakub Kicinski [off-list ref] wrote:
quoted
quoted
I use SOCK_DGRAM
Strange.
Why is it strange?
I meant surprising, I'd have thought we could miss something like that
for RAW sockets maybe but DGRAM/ICMP should work.
I was surprised too.
quoted
quoted
quoted
I want to find out, the creation of gre and ip header twice, is it a
feature or a bug?
I can't think why that'd be a feature. Could add this case to selftests
to show how to repro and catch regressions?
I don't really know how to do it, but I'll try
If we just talk about selftests/net, then everything has passed
What I'm looking for is a bash(?) script which sets up the tunnel sends
a packet and checks if the headers are valid.
I'm creating a file "mgre0" on spok, and use ifup to create the interface:

auto mgre0
iface mgre0 inet6 static
address 2001:470::1
netmask 64
pre-up ip tunnel add mgre0 mode ip6gre local 4444::1111 key 1 ttl 64 tos inherit
pre-up ethtool -K mgre0 tx off > /dev/null
pre-up ip link set mgre0 mtu 1400
pre-up ip link set mgre0 multicast on
post-down ip link del mgre0

do the same on hub:

auto mgre0
iface mgre0 inet6 static
address 2001:470::100
netmask 64
pre-up ip tunnel add mgre0 mode ip6gre local 4444::4444 key 1 ttl 64 tos inherit
pre-up ethtool -K mgre0 tx off > /dev/null
pre-up ip link set mgre0 mtu 1400
pre-up ip link set mgre0 multicast on
post-down ip link del mgre0

then I use ip neigh to add an entry to the neighbors table
spok:
$ ip -6 neigh add 2001:470::100 lladdr 4444::4444 dev mgre0

hub:
$ ip -6 neigh add 2001:470::1 lladdr 4444::1111 dev mgre0

and then ping hub from spok
$ ping 2001:470::100

To check if the headers are valid, I use tcpdump and look at the packets
quoted
quoted
quoted
I did everything according to the instructions, hope everything is
correct this time.
Nope, still mangled.
Strangely, everything works fine for me
Depends on definition of "works", are you saying you can download this:

https://lore.kernel.org/all/CAJGXZLiNo=G=5889sPyiCZVjRf65Ygov3=DWFgKmay+Dy3wCYw@mail.gmail.com/raw (local)

which is your email in text form and `git am` will accept that as a
patch?
I use the kernel version 5.10.70.
I copy the code (starting from "diff" and up to the end), create a
patch file and apply it to the kernel.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help