Commit ac2fc2df authored by 8!tgraf's avatar 8!tgraf

Use parse_rtattr_nested

(Logical change 1.129)
parent 2af5c3d3
......@@ -956,9 +956,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __
if (opt == NULL)
return 0;
memset(tb, 0, sizeof(tb));
if (opt)
parse_rtattr(tb, TCA_U32_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
parse_rtattr_nested(tb, TCA_U32_MAX, opt);
if (handle) {
SPRINT_BUF(b1);
......
......@@ -229,8 +229,7 @@ tc_print_one_action(FILE * f, struct rtattr *arg)
if (arg == NULL)
return -1;
memset(tb, 0, sizeof (tb));
parse_rtattr(tb, TCA_ACT_MAX, RTA_DATA(arg), RTA_PAYLOAD(arg));
parse_rtattr_nested(tb, TCA_ACT_MAX, arg);
if (tb[TCA_ACT_KIND] == NULL) {
fprintf(stderr, "NULL Action!\n");
return -1;
......@@ -272,8 +271,7 @@ tc_print_action(FILE * f, const struct rtattr *arg)
if (arg == NULL)
return 0;
memset(tb, 0, sizeof (tb));
parse_rtattr(tb, TCA_ACT_MAX_PRIO, RTA_DATA(arg), RTA_PAYLOAD(arg));
parse_rtattr_nested(tb, TCA_ACT_MAX_PRIO, arg);
if (tab_flush && NULL != tb[0] && NULL == tb[1]) {
int ret = tc_print_one_action(f, tb[0]);
......@@ -310,7 +308,6 @@ static int do_print_action(const struct sockaddr_nl *who,
return -1;
}
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, TCAA_MAX, TA_RTA(t), len);
if (NULL == tb[TCA_ACT_TAB]) {
......
......@@ -239,8 +239,7 @@ hfsc_print_class_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if (opt == NULL)
return 0;
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, TCA_HFSC_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
parse_rtattr_nested(tb, TCA_HFSC_MAX, opt);
if (tb[TCA_HFSC_RSC]) {
if (RTA_PAYLOAD(tb[TCA_HFSC_RSC]) < sizeof(*rsc))
......
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