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@gmail.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
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) {