From: Roi Dayan Date: Thu, 19 Jan 2017 12:31:20 +0000 (+0200) Subject: tc: flower: Fix incorrect error msg about eth type X-Git-Tag: v4.10.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00697ca19ae3e1118f2af82c3b41ac4335fe918b;p=thirdparty%2Fiproute2.git 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 Reviewed-by: Paul Blakey --- diff --git a/tc/f_flower.c b/tc/f_flower.c index 1272a471a..314c2dd1e 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;