Skip to content

Commit

Permalink
samples/bpf: fix bpf tunnel cleanup
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
williamtu authored and davem330 committed Aug 1, 2017
1 parent cb891fa commit cc75f85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/bpf/tcbpf2_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions samples/bpf/test_tunnel_bpf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc75f85

Please sign in to comment.