naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0225-Fix-MAC-address-length-check.patch

049c96
From b6e8abac9c09c000f0b3f20ec3855f30aa1a4135 Mon Sep 17 00:00:00 2001
049c96
From: Jakub Sitnicki <jkbs@redhat.com>
049c96
Date: Wed, 27 Jul 2016 15:56:20 +0200
049c96
Subject: [PATCH] Fix MAC address length check
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1253767
049c96
          https://bugzilla.redhat.com/show_bug.cgi?id=1271580
049c96
Upstream Status: iproute2.git commit 0aae234
049c96
049c96
commit 0aae23468ac57924c040ef4588ecd6b6dcb33075
049c96
Author: Phil Sutter <phil@nwl.cc>
049c96
Date:   Wed Jun 22 12:05:38 2016 +0200
049c96
049c96
    Fix MAC address length check
049c96
049c96
    I forgot to change the variable in the conditional, too.
049c96
049c96
    Fixes: 8fe58d58941f4 ("iplink: Check address length via netlink")
049c96
    Signed-off-by: Phil Sutter <phil@nwl.cc>
049c96
---
049c96
 ip/iplink.c | 2 +-
049c96
 1 file changed, 1 insertion(+), 1 deletion(-)
049c96
049c96
diff --git a/ip/iplink.c b/ip/iplink.c
049c96
index a8bcc09..f49b32e 100644
049c96
--- a/ip/iplink.c
049c96
+++ b/ip/iplink.c
049c96
@@ -474,7 +474,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
049c96
 		} else if (matches(*argv, "address") == 0) {
049c96
 			NEXT_ARG();
049c96
 			addr_len = ll_addr_a2n(abuf, sizeof(abuf), *argv);
049c96
-			if (len < 0)
049c96
+			if (addr_len < 0)
049c96
 				return -1;
049c96
 			addattr_l(&req->n, sizeof(*req), IFLA_ADDRESS, abuf, addr_len);
049c96
 		} else if (matches(*argv, "broadcast") == 0 ||
049c96
-- 
049c96
1.8.3.1
049c96