diff options
author | 2!tgraf <2!tgraf> | 2005-01-18 22:11:58 +0000 |
---|---|---|
committer | 2!tgraf <2!tgraf> | 2005-01-18 22:11:58 +0000 |
commit | 78934000777e1f1837450ed6bfe738df1fde5a03 (patch) | |
tree | 6c7aece64d0c5008f2aa5c69357f236096e4364a | |
parent | 7d69fd97ecc7d15288787276424d9ac2ced9c41d (diff) |
Use parse_rtattr_nested
(Logical change 1.129)
-rw-r--r-- | tc/m_ipt.c | 4 | ||||
-rw-r--r-- | tc/m_pedit.c | 3 |
2 files changed, 3 insertions, 4 deletions
@@ -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 "); diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 8d7a60b0..5031c62e 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -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]"); |