Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc75f851 authored by William Tu's avatar William Tu Committed by David S. Miller
Browse files

samples/bpf: fix bpf tunnel cleanup



test_tunnel_bpf.sh fails to remove the vxlan11 tunnel device, causing the
next geneve tunnelling test case fails.  In addition, the geneve reserved bit
in tcbpf2_kern.c should be zero, according to the RFC.

Signed-off-by: default avatarWilliam Tu <u9012063@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb891fa6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -147,9 +147,9 @@ int _geneve_set_tunnel(struct __sk_buff *skb)
	__builtin_memset(&gopt, 0x0, sizeof(gopt));
	__builtin_memset(&gopt, 0x0, sizeof(gopt));
	gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */
	gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */
	gopt.type = 0x08;
	gopt.type = 0x08;
	gopt.r1 = 1;
	gopt.r1 = 0;
	gopt.r2 = 0;
	gopt.r2 = 0;
	gopt.r3 = 1;
	gopt.r3 = 0;
	gopt.length = 2; /* 4-byte multiple */
	gopt.length = 2; /* 4-byte multiple */
	*(int *) &gopt.opt_data = 0xdeadbeef;
	*(int *) &gopt.opt_data = 0xdeadbeef;


+1 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,7 @@ function cleanup {
	ip link del veth1
	ip link del veth1
	ip link del ipip11
	ip link del ipip11
	ip link del gretap11
	ip link del gretap11
	ip link del vxlan11
	ip link del geneve11
	ip link del geneve11
	pkill tcpdump
	pkill tcpdump
	pkill cat
	pkill cat