• Nigel Kukard's avatar
    Fix tc stats when using -batch mode · 9bea14ff
    Nigel Kukard authored
    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: default avatarNigel Kukard <nkukard@lbsd.net>
    9bea14ff
tc_class.c 8.31 KB