netlink: Bring up interface even if neither MTU nor MAC address is configured
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
388435542e
commit
dca31d4206
1 changed files with 5 additions and 0 deletions
|
@ -489,6 +489,7 @@ void nl_link(int ns, unsigned int ifi, void *mac, int up, int mtu)
|
|||
req.rta.rta_type = IFLA_ADDRESS;
|
||||
req.rta.rta_len = RTA_LENGTH(ETH_ALEN);
|
||||
nl_req(ns, buf, &req, req.nlh.nlmsg_len);
|
||||
up = 0;
|
||||
}
|
||||
|
||||
if (mtu) {
|
||||
|
@ -497,8 +498,12 @@ void nl_link(int ns, unsigned int ifi, void *mac, int up, int mtu)
|
|||
req.rta.rta_type = IFLA_MTU;
|
||||
req.rta.rta_len = RTA_LENGTH(sizeof(unsigned int));
|
||||
nl_req(ns, buf, &req, req.nlh.nlmsg_len);
|
||||
up = 0;
|
||||
}
|
||||
|
||||
if (up)
|
||||
nl_req(ns, buf, &req, req.nlh.nlmsg_len);
|
||||
|
||||
if (change)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue