lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 May 2019 16:42:10 +0200
From:   Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:     stephen@...workplumber.org
Cc:     netdev@...r.kernel.org, dsahern@...il.com,
        Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: [PATCH iproute2] iplink: don't try to get ll addr len when creating an iface

It will obviously fail. This is a follow up of the commit
757837230a65 ("lib: suppress error msg when filling the cache").

Suggested-by: David Ahern <dsahern@...il.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
---
 ip/iplink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 7952cb2be364..d275efa9d087 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -945,7 +945,8 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req, char **type)
 	else if (!strcmp(name, dev))
 		name = dev;
 
-	if (dev && addr_len) {
+	if (dev && addr_len &&
+	    !(req->n.nlmsg_flags & NLM_F_CREATE)) {
 		int halen = nl_get_ll_addr_len(dev);
 
 		if (halen >= 0 && halen != addr_len) {
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ