]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/q_hfsc.c
tc: implement support for terse dump
[mirror_iproute2.git] / tc / q_hfsc.c
index c19e87f98761ea472871f9018b07de6d6224fffa..f34b1b2fe2a98f10c5f65ac4f20b26686fcbae4f 100644 (file)
@@ -201,9 +201,7 @@ hfsc_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
                return -1;
        }
 
-       tail = NLMSG_TAIL(n);
-
-       addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
+       tail = addattr_nest(n, 1024, TCA_OPTIONS);
        if (rsc_ok)
                addattr_l(n, 1024, TCA_HFSC_RSC, &rsc, sizeof(rsc));
        if (fsc_ok)
@@ -211,7 +209,7 @@ hfsc_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
        if (usc_ok)
                addattr_l(n, 1024, TCA_HFSC_USC, &usc, sizeof(usc));
 
-       tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
+       addattr_nest_end(n, tail);
        return 0;
 }