From: Roi Dayan <roid@mellanox.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Amir Vadai <amir@vadai.me>,
Jiri Pirko <jiri@mellanox.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Paul Blakey <paulb@mellanox.com>, Roi Dayan <roid@mellanox.com>
Subject: [PATCH iproute2 2/2] tc: flower: Fix incorrect error msg about eth type
Date: Thu, 19 Jan 2017 14:31:20 +0200 [thread overview]
Message-ID: <1484829080-18593-3-git-send-email-roid@mellanox.com> (raw)
In-Reply-To: <1484829080-18593-1-git-send-email-roid@mellanox.com>
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 | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/tc/f_flower.c b/tc/f_flower.c
index 1272a47..314c2dd 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;
--
1.7.1
next prev parent reply other threads:[~2017-01-19 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 12:31 [PATCH iproute2 0/2] two small fixes in flower option parser error flow Roi Dayan
2017-01-19 12:31 ` [PATCH iproute2 1/2] tc: flower: Add missing err check when parsing flower options Roi Dayan
2017-01-19 12:31 ` Roi Dayan [this message]
2017-01-20 17:30 ` [PATCH iproute2 0/2] two small fixes in flower option parser error flow Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484829080-18593-3-git-send-email-roid@mellanox.com \
--to=roid@mellanox.com \
--cc=amir@vadai.me \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=paulb@mellanox.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).