mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-04 21:07:27 +00:00
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 757837230a ("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>
This commit is contained in:
parent
a9661b8b0f
commit
c442234858
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user