Fix MAC address length check

I forgot to change the variable in the conditional, too.

Fixes: 8fe58d5894 ("iplink: Check address length via netlink")
Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2016-06-22 12:05:38 +02:00 committed by Stephen Hemminger
parent 3462c116f8
commit 0aae23468a
1 changed files with 1 additions and 1 deletions

View File

@ -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 ||