aboutsummaryrefslogtreecommitdiffstats
path: root/tc
diff options
context:
space:
mode:
authorRoi Dayan <roid@mellanox.com>2017-01-19 14:31:20 +0200
committerStephen Hemminger <stephen@networkplumber.org>2017-01-20 09:27:34 -0800
commit00697ca19ae3e1118f2af82c3b41ac4335fe918b (patch)
treecc8b40f51fb30c83c03e3e19d8c5a13789e076bc /tc
parentc85609b25faff034d450b0106fac7932d6acf124 (diff)
downloadplatform_external_iproute2-00697ca19ae3e1118f2af82c3b41ac4335fe918b.tar.gz
platform_external_iproute2-00697ca19ae3e1118f2af82c3b41ac4335fe918b.tar.bz2
platform_external_iproute2-00697ca19ae3e1118f2af82c3b41ac4335fe918b.zip
tc: flower: Fix incorrect error msg about eth type
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>
Diffstat (limited to 'tc')
-rw-r--r--tc/f_flower.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tc/f_flower.c b/tc/f_flower.c
index 1272a471..314c2dd1 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -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;