Skip to content

Commit cc75f85

Browse files
williamtudavem330
authored andcommitted
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: William Tu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cb891fa commit cc75f85

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

samples/bpf/tcbpf2_kern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ int _geneve_set_tunnel(struct __sk_buff *skb)
147147
__builtin_memset(&gopt, 0x0, sizeof(gopt));
148148
gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */
149149
gopt.type = 0x08;
150-
gopt.r1 = 1;
150+
gopt.r1 = 0;
151151
gopt.r2 = 0;
152-
gopt.r3 = 1;
152+
gopt.r3 = 0;
153153
gopt.length = 2; /* 4-byte multiple */
154154
*(int *) &gopt.opt_data = 0xdeadbeef;
155155

samples/bpf/test_tunnel_bpf.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ function cleanup {
149149
ip link del veth1
150150
ip link del ipip11
151151
ip link del gretap11
152+
ip link del vxlan11
152153
ip link del geneve11
153154
pkill tcpdump
154155
pkill cat

0 commit comments

Comments
 (0)