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 <dsah...@gmail.com> Signed-off-by: Nicolas Dichtel <nicolas.dich...@6wind.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