[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1484829080-18593-2-git-send-email-roid@mellanox.com>
Date: Thu, 19 Jan 2017 14:31:19 +0200
From: Roi Dayan <roid@...lanox.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, Amir Vadai <amir@...ai.me>,
Jiri Pirko <jiri@...lanox.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Paul Blakey <paulb@...lanox.com>, Roi Dayan <roid@...lanox.com>
Subject: [PATCH iproute2 1/2] tc: flower: Add missing err check when parsing flower options
addattr32 may return an error.
Fixes: cfcabf18d84a ("tc: flower: Add skip_{hw|sw} support")
Signed-off-by: Roi Dayan <roid@...lanox.com>
Reviewed-by: Paul Blakey <paulb@...lanox.com>
---
tc/f_flower.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tc/f_flower.c b/tc/f_flower.c
index 1dbc532..1272a47 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -525,7 +525,9 @@ static int flower_parse_opt(struct filter_util *qu, char *handle,
}
parse_done:
- addattr32(n, MAX_MSG, TCA_FLOWER_FLAGS, flags);
+ ret = addattr32(n, MAX_MSG, TCA_FLOWER_FLAGS, flags);
+ if (ret)
+ return ret;
ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type);
if (ret) {
--
1.7.1
Powered by blists - more mailing lists