]> git.proxmox.com Git - mirror_iproute2.git/commit - tc/tc_class.c
Fix tc stats when using -batch mode
authorNigel Kukard <nkukard@lbsd.net>
Wed, 30 Oct 2013 18:44:58 +0000 (18:44 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 30 Oct 2013 23:37:07 +0000 (16:37 -0700)
commit9bea14ff6b64f3fe56af2d93ca70ac56b355027e
tree78539ee8f7b20b4952c8665b2f313d60ff632afd
parentaa574cd60e57d6a31b4d433e0b09bfacd2cb79d1
Fix tc stats when using -batch mode

There are two global variables in tc/tc_class.c:
__u32 filter_qdisc;
__u32 filter_classid;

These are not re-initialized for each line received in -batch mode:
class show dev eth0 parent 1: classid 1:1
class show dev eth0 parent 1: classid 1:1
Error: duplicate "classid": "1:1" is the second value.

This patch fixes the issue by initializing the two globals when we
enter print_class().

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
tc/tc_class.c