]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: flower: Fix incorrect error msg about eth type
authorRoi Dayan <roid@mellanox.com>
Thu, 19 Jan 2017 12:31:20 +0000 (14:31 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 20 Jan 2017 17:27:34 +0000 (09:27 -0800)
addattr16 may return an error about the nl msg size
but not about incorrect eth type.

Fixes: 488b41d020fb ("tc: flower no need to specify the ethertype")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
tc/f_flower.c

index 1272a471a84296fc7de6b004dddc11832b071913..314c2dd1e4fe421ce49b472a41e2312e009ad7fe 100644 (file)
@@ -530,11 +530,8 @@ parse_done:
                return ret;
 
        ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type);
-       if (ret) {
-               fprintf(stderr, "Illegal \"eth_type\"(0x%x)\n",
-                       ntohs(eth_type));
-               return -1;
-       }
+       if (ret)
+               return ret;
 
        tail->rta_len = (((void *)n)+n->nlmsg_len) - (void *)tail;