Commit 60a383ae authored by 3!tgraf's avatar 3!tgraf

Use NLMSG_TAIL

(Logical change 1.127)
parent fc78a8e9
......@@ -201,11 +201,10 @@ parse_egress(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, str
if (mirred_d)
fprintf(stdout, "Action %d device %s ifindex %d\n",p.action, d,p.ifindex);
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_MIRRED_PARMS, &p, sizeof (p));
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;
......
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