tc: print index, refcnt & bindcnt for nat action

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
This commit is contained in:
Roman Mashak 2018-03-20 14:21:47 -04:00 committed by Stephen Hemminger
parent fec62c0ec7
commit d64a22f393

View File

@ -169,6 +169,9 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg)
format_host_r(AF_INET, 4, &sel->new_addr, buf2, sizeof(buf2)));
print_action_control(f, " ", sel->action, "");
fprintf(f, "\n\t index %u ref %d bind %d",
sel->index, sel->refcnt, sel->bindcnt);
if (show_stats) {
if (tb[TCA_NAT_TM]) {
struct tcf_t *tm = RTA_DATA(tb[TCA_NAT_TM]);
@ -177,6 +180,8 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg)
}
}
fprintf(f, "\n");
return 0;
}