Commit 021ed13f authored by 5!tgraf's avatar 5!tgraf

Use parse_rtattr_nested

(Logical change 1.129)
parent 3b3ecd31
...@@ -109,9 +109,7 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u ...@@ -109,9 +109,7 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u
if (opt == NULL) if (opt == NULL)
return 0; return 0;
memset(tb, 0, sizeof(tb)); parse_rtattr_nested(tb, TCA_FW_MAX, opt);
if (opt)
parse_rtattr(tb, TCA_FW_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
if (handle) if (handle)
fprintf(f, "handle 0x%x ", handle); fprintf(f, "handle 0x%x ", handle);
......
...@@ -422,8 +422,7 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) ...@@ -422,8 +422,7 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if (opt == NULL) if (opt == NULL)
return 0; return 0;
memset(tb, 0, sizeof(tb)); parse_rtattr_nested(tb, TCA_CBQ_MAX, opt);
parse_rtattr(tb, TCA_CBQ_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
if (tb[TCA_CBQ_RATE]) { if (tb[TCA_CBQ_RATE]) {
if (RTA_PAYLOAD(tb[TCA_CBQ_RATE]) < sizeof(*r)) if (RTA_PAYLOAD(tb[TCA_CBQ_RATE]) < sizeof(*r))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment