diff options
Diffstat (limited to 'tc/m_pedit.c')
-rw-r--r-- | tc/m_pedit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tc/m_pedit.c b/tc/m_pedit.c index f3cec6fe..8d7a60b0 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -534,11 +534,10 @@ parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, stru } } - tail = (struct rtattr *) (((void *) n) + NLMSG_ALIGN(n->nlmsg_len)); + tail = NLMSG_TAIL(n); addattr_l(n, MAX_MSG, tca_id, NULL, 0); addattr_l(n, MAX_MSG, TCA_PEDIT_PARMS,&sel, sizeof(sel.sel)+sel.sel.nkeys*sizeof(struct tc_pedit_key)); - tail->rta_len = - (((void *) n) + NLMSG_ALIGN(n->nlmsg_len)) - (void *) tail; + tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail; *argc_p = argc; *argv_p = argv; |