]> git.ipfire.org Git - thirdparty/iproute2.git/commit
f_bpf: fix filling of handle when no further arg is provided
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 May 2016 09:58:41 +0000 (11:58 +0200)
committerStephen Hemminger <shemming@brocade.com>
Mon, 23 May 2016 23:14:18 +0000 (16:14 -0700)
commit1a0320727c6e4b55ff3ec02979a29fd275fa6291
tree8b36b39661f1085fa9288037fae979f5e3cd0219
parent110e84a0589a54309a23e9b1fe333a7b72cc14d9
f_bpf: fix filling of handle when no further arg is provided

We need to fill handle when provided by the user, even if no further
argument is provided. Thus, move the test for arg to the correct location,
so that it works correctly:

  # tc filter show dev foo egress
  filter protocol all pref 1 bpf
  filter protocol all pref 1 bpf handle 0x1 bpf.o:[classifier] direct-action
  filter protocol all pref 1 bpf handle 0x2 bpf.o:[classifier] direct-action
  # tc filter del dev foo egress prio 1 handle 2 bpf
  # tc filter show dev foo egress
  filter protocol all pref 1 bpf
  filter protocol all pref 1 bpf handle 0x1 bpf.o:[classifier] direct-action

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tc/f_bpf.c