]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_action.c
Merge branch 'master' into net-next
[mirror_iproute2.git] / tc / m_action.c
index 50d16b41e469703f0a57e01e15a71686c52f1cb9..402228bbf833daad54d374be6b89f3c7d7a6dbbf 100644 (file)
@@ -242,7 +242,7 @@ done0:
                                        invarg("cookie must be a hex string\n",
                                               *argv);
 
-                               act_ck_len = slen;
+                               act_ck_len = slen / 2;
                                argc--;
                                argv++;
                        }
@@ -307,7 +307,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg)
                print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL);
                if (tb[TCA_ACT_COOKIE]) {
                        int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]);
-                       char b1[strsz+1];
+                       char b1[strsz * 2 + 1];
 
                        fprintf(f, "\n\tcookie len %d %s ", strsz,
                                hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]),