]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/q_drr.c
m_vlan: add pop_eth and push_eth actions
[mirror_iproute2.git] / tc / q_drr.c
index 5e541c09abe11b433e879f5df323230027ec8281..f9c90f3035f388163d8dcb41331fabd726bde2fc 100644 (file)
@@ -55,8 +55,7 @@ static int drr_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
        struct rtattr *tail;
        __u32 tmp;
 
-       tail = NLMSG_TAIL(n);
-       addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
+       tail = addattr_nest(n, 1024, TCA_OPTIONS);
 
        while (argc > 0) {
                if (strcmp(*argv, "quantum") == 0) {
@@ -77,7 +76,7 @@ static int drr_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
                argc--; argv++;
        }
 
-       tail->rta_len = (void *) NLMSG_TAIL(n) - (void *)tail;
+       addattr_nest_end(n, tail);
        return 0;
 }