diff mbox

[iproute] Fix MAC address length check

Message ID 1466589938-14448-1-git-send-email-phil@nwl.cc
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Phil Sutter June 22, 2016, 10:05 a.m. UTC
I forgot to change the variable in the conditional, too.

Fixes: 8fe58d58941f4 ("iplink: Check address length via netlink")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 ip/iplink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

stephen hemminger June 27, 2016, 6:02 p.m. UTC | #1
On Wed, 22 Jun 2016 12:05:38 +0200
Phil Sutter <phil@nwl.cc> wrote:

> I forgot to change the variable in the conditional, too.
> 
> Fixes: 8fe58d58941f4 ("iplink: Check address length via netlink")
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Applied
diff mbox

Patch

diff --git a/ip/iplink.c b/ip/iplink.c
index 68e5faea3581d..b1f8a37922f51 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -491,7 +491,7 @@  int iplink_parse(int argc, char **argv, struct iplink_req *req,
 		} else if (matches(*argv, "address") == 0) {
 			NEXT_ARG();
 			addr_len = ll_addr_a2n(abuf, sizeof(abuf), *argv);
-			if (len < 0)
+			if (addr_len < 0)
 				return -1;
 			addattr_l(&req->n, sizeof(*req), IFLA_ADDRESS, abuf, addr_len);
 		} else if (matches(*argv, "broadcast") == 0 ||