Files
linux/net/ipv6
Nicolas Dichtel d233bd93b6 vti[6]: fix packet tx through bpf_redirect()
[ Upstream commit 95224166a9 ]

With an ebpf program that redirects packets through a vti[6] interface,
the packets are dropped because no dst is attached.

This could also be reproduced with an AF_PACKET socket, with the following
python script (vti1 is an ip_vti interface):

 import socket
 send_s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, 0)
 # scapy
 # p = IP(src='10.100.0.2', dst='10.200.0.1')/ICMP(type='echo-request')
 # raw(p)
 req = b'E\x00\x00\x1c\x00\x01\x00\x00@\x01e\xb2\nd\x00\x02\n\xc8\x00\x01\x08\x00\xf7\xff\x00\x00\x00\x00'
 send_s.sendto(req, ('vti1', 0x800, 0, 0))

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-05 13:03:42 +00:00
..
2019-02-23 09:05:13 +01:00
2015-10-08 04:27:03 -07:00
2015-12-03 11:32:06 -05:00
2017-09-27 11:00:12 +02:00
2015-02-28 16:56:51 -05:00
2015-11-03 10:52:13 -05:00
2019-03-23 08:44:29 +01:00