]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "vxlan: move encapsulation warning"
authorJakub Kicinski <kuba@kernel.org>
Sat, 26 Sep 2020 01:56:04 +0000 (18:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Sep 2020 19:34:47 +0000 (12:34 -0700)
commitcce67e32c8432b6da8729336824dc37349034f58
tree85e8f2c59745533384f38e014b69bf546792889e
parentbc478d8779a976122533c89987cd88a902c42ddc
Revert "vxlan: move encapsulation warning"

This reverts commit 517d02a1b0f8162298a9c9c8de63a99289dcd31f.

Nothing prevents user from sending frames to "external" VxLAN devices.
In fact kernel itself may generate icmp chatter.

This is fine, such frames should be dropped.

The point of the "missing encapsulation" warning was that
frames with missing encap should not make it into vxlan_xmit_one().
And vxlan_xmit() drops them cleanly, so let it just do that.

Without this revert the warning is triggered by the udp_tunnel_nic.sh
test, but the minimal repro is:

$ ip link add vxlan0 type vxlan \
                  group 239.1.1.1 \
     dev lo \
     dstport 1234 \
     external
$ ip li set dev vxlan0 up

[  419.165981] vxlan0: Missing encapsulation instructions
[  419.166551] WARNING: CPU: 0 PID: 1041 at drivers/net/vxlan.c:2889 vxlan_xmit+0x15c0/0x1fc0 [vxlan]

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c