naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0129-tc-flower-Add-missing-err-check-when-parsing-flower-.patch

4aca6e
From e22b364d6615a03fe4c21b8c5640cabf07aa81ca Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Fri, 17 Mar 2017 13:24:16 +0100
4aca6e
Subject: [PATCH] tc: flower: Add missing err check when parsing flower options
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1422629
4aca6e
Upstream Status: iproute2.git commit c85609b25faff
4aca6e
4aca6e
commit c85609b25faff034d450b0106fac7932d6acf124
4aca6e
Author: Roi Dayan <roid@mellanox.com>
4aca6e
Date:   Thu Jan 19 14:31:19 2017 +0200
4aca6e
4aca6e
    tc: flower: Add missing err check when parsing flower options
4aca6e
4aca6e
    addattr32 may return an error.
4aca6e
4aca6e
    Fixes: cfcabf18d84a ("tc: flower: Add skip_{hw|sw} support")
4aca6e
    Signed-off-by: Roi Dayan <roid@mellanox.com>
4aca6e
    Reviewed-by: Paul Blakey <paulb@mellanox.com>
4aca6e
---
4aca6e
 tc/f_flower.c | 4 +++-
4aca6e
 1 file changed, 3 insertions(+), 1 deletion(-)
4aca6e
4aca6e
diff --git a/tc/f_flower.c b/tc/f_flower.c
4aca6e
index a3178a0..d210b67 100644
4aca6e
--- a/tc/f_flower.c
4aca6e
+++ b/tc/f_flower.c
4aca6e
@@ -591,7 +591,9 @@ static int flower_parse_opt(struct filter_util *qu, char *handle,
4aca6e
 	}
4aca6e
 
4aca6e
 parse_done:
4aca6e
-	addattr32(n, MAX_MSG, TCA_FLOWER_FLAGS, flags);
4aca6e
+	ret = addattr32(n, MAX_MSG, TCA_FLOWER_FLAGS, flags);
4aca6e
+	if (ret)
4aca6e
+		return ret;
4aca6e
 
4aca6e
 	ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type);
4aca6e
 	if (ret) {
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e