]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_csum.c
treewide: Use addattr_nest()/addattr_nest_end() to handle nested attributes
[mirror_iproute2.git] / tc / m_csum.c
index e1352c0820f69fdebebf71fd0c1630a8030bd69f..42d37ababbf6486a71308129810b29e706fd2445 100644 (file)
@@ -139,10 +139,9 @@ parse_csum(struct action_util *a, int *argc_p,
                }
        }
 
-       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_CSUM_PARMS, &sel, sizeof(sel));
-       tail->rta_len = (char *)NLMSG_TAIL(n) - (char *)tail;
+       addattr_nest_end(n, tail);
 
        *argc_p = argc;
        *argv_p = argv;