]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Use parse_rtattr_nested
author2!tgraf <2!tgraf>
Tue, 18 Jan 2005 22:11:58 +0000 (22:11 +0000)
committer2!tgraf <2!tgraf>
Tue, 18 Jan 2005 22:11:58 +0000 (22:11 +0000)
(Logical change 1.129)

tc/m_ipt.c
tc/m_pedit.c

index ec33f8fe41591f09ed18639ee2737151804bec58..eea4bc11c1417848dc52080d880c599de7fa1f89 100644 (file)
@@ -596,8 +596,8 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg)
 
        if (NULL == opts)
                return -1;
-       memset(tb, 0, sizeof (tb));
-       parse_rtattr(tb, TCA_IPT_MAX, RTA_DATA(arg), RTA_PAYLOAD(arg));
+
+       parse_rtattr_nested(tb, TCA_IPT_MAX, arg);
 
        if (tb[TCA_IPT_TABLE] == NULL) {
                fprintf(f, "[NULL ipt table name ] assuming mangle ");
index 8d7a60b0d32dab2eab7bf1746c8dc7f83a7b7b64..5031c62ef32083d2bfa8447e2ee5206ec72176ae 100644 (file)
@@ -554,8 +554,7 @@ print_pedit(struct action_util *au,FILE * f, struct rtattr *arg)
        if (arg == NULL)
                return -1;
 
-       memset(tb, 0, sizeof (tb));
-       parse_rtattr(tb, TCA_PEDIT_MAX, RTA_DATA(arg), RTA_PAYLOAD(arg));
+       parse_rtattr_nested(tb, TCA_PEDIT_MAX, arg);
 
        if (tb[TCA_PEDIT_PARMS] == NULL) {
                fprintf(f, "[NULL pedit parameters]");