]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
samples/bpf: fix bpf tunnel cleanup
authorWilliam Tu <u9012063@gmail.com>
Mon, 31 Jul 2017 21:40:50 +0000 (14:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Aug 2017 05:02:47 +0000 (22:02 -0700)
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 <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/tcbpf2_kern.c
samples/bpf/test_tunnel_bpf.sh

index 9c823a609e75f8d66bbe1fa31a1ecebac7f65311..270edcc149a113c4026602f9d3a35e01475086df 100644 (file)
@@ -147,9 +147,9 @@ int _geneve_set_tunnel(struct __sk_buff *skb)
        __builtin_memset(&gopt, 0x0, sizeof(gopt));
        gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */
        gopt.type = 0x08;
-       gopt.r1 = 1;
+       gopt.r1 = 0;
        gopt.r2 = 0;
-       gopt.r3 = 1;
+       gopt.r3 = 0;
        gopt.length = 2; /* 4-byte multiple */
        *(int *) &gopt.opt_data = 0xdeadbeef;
 
index 1ff634f187b7fd927bef6a091b96e32dbca27870..a70d2ea90313fe9535abb92ea604681a73a1ce0c 100755 (executable)
@@ -149,6 +149,7 @@ function cleanup {
        ip link del veth1
        ip link del ipip11
        ip link del gretap11
+       ip link del vxlan11
        ip link del geneve11
        pkill tcpdump
        pkill cat