]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_skbmod.c
iproute: Set ip/ip6 lwtunnel flags
[mirror_iproute2.git] / tc / m_skbmod.c
index 561b73fb8264783b6188b3e0eecbe3c9c4aa519e..2dd1bb7e3d6dbe0e584703b4ecd6bb30769703a7 100644 (file)
@@ -142,8 +142,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p,
                skbmod_usage();
        }
 
-       tail = NLMSG_TAIL(n);
-       addattr_l(n, MAX_MSG, tca_id, NULL, 0);
+       tail = addattr_nest(n, MAX_MSG, tca_id);
        addattr_l(n, MAX_MSG, TCA_SKBMOD_PARMS, &p, sizeof(p));
 
        if (daddr)
@@ -153,7 +152,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p,
        if (saddr)
                addattr_l(n, MAX_MSG, TCA_SKBMOD_SMAC, sbuf, ETH_ALEN);
 
-       tail->rta_len = (void *)NLMSG_TAIL(n) - (void *)tail;
+       addattr_nest_end(n, tail);
 
        *argc_p = argc;
        *argv_p = argv;