]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/f_tcindex.c
man: tc-taprio.8: fix syntax error
[mirror_iproute2.git] / tc / f_tcindex.c
index dd1cb475098c8f19f7f0a3fbcdb68531abd04423..159cf41461b5b35c02a415a384668dafc78f7a47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * f_tcindex.c         Traffic control index filter
  *
@@ -7,7 +8,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <fcntl.h>
 #include <string.h>
 #include <netinet/in.h>
@@ -37,8 +37,7 @@ static int tcindex_parse_opt(struct filter_util *qu, char *handle, int argc,
                }
        }
        if (!argc) return 0;
-       tail = NLMSG_TAIL(n);
-       addattr_l(n, 4096, TCA_OPTIONS, NULL, 0);
+       tail = addattr_nest(n, 4096, TCA_OPTIONS);
        while (argc) {
                if (!strcmp(*argv, "hash")) {
                        int hash;
@@ -113,7 +112,7 @@ static int tcindex_parse_opt(struct filter_util *qu, char *handle, int argc,
                argc--;
                argv++;
        }
-       tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
+       addattr_nest_end(n, tail);
        return 0;
 }