]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/tc_class.c
tc: B.W limits can now be specified in %.
[mirror_iproute2.git] / tc / tc_class.c
index 0214775b95a6ca83b0a2ce4255d3af7ccef2203e..1b214b82c702baa1eb781ad9fa8b10e0cca40442 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -68,8 +67,8 @@ static int tc_class_modify(int cmd, unsigned int flags, int argc, char **argv)
        };
        struct qdisc_util *q = NULL;
        struct tc_estimator est = {};
-       char  d[16] = {};
-       char  k[16] = {};
+       char  d[IFNAMSIZ] = {};
+       char  k[FILTER_NAMESZ] = {};
 
        while (argc > 0) {
                if (strcmp(*argv, "dev") == 0) {
@@ -129,7 +128,7 @@ static int tc_class_modify(int cmd, unsigned int flags, int argc, char **argv)
                        fprintf(stderr, "Error: Qdisc \"%s\" is classless.\n", k);
                        return 1;
                }
-               if (q->parse_copt(q, argc, argv, &req.n))
+               if (q->parse_copt(q, argc, argv, &req.n, d))
                        return 1;
        } else {
                if (argc) {
@@ -389,7 +388,7 @@ int print_class(const struct sockaddr_nl *who,
 static int tc_class_list(int argc, char **argv)
 {
        struct tcmsg t = { .tcm_family = AF_UNSPEC };
-       char d[16] = {};
+       char d[IFNAMSIZ] = {};
        char buf[1024] = {0};
 
        filter_qdisc = 0;