diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-10-14 19:11:05 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-10-14 19:11:05 +0200 |
commit | dca31d4206dc06df462b6fe9fe98094a2c7397a3 (patch) | |
tree | 25524a351215c7861f57fe49a790c440ff2ed64c /netlink.c | |
parent | 388435542eeba594557d604630e3cf26d3737e9d (diff) | |
download | passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.tar passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.tar.gz passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.tar.bz2 passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.tar.lz passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.tar.xz passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.tar.zst passt-dca31d4206dc06df462b6fe9fe98094a2c7397a3.zip |
netlink: Bring up interface even if neither MTU nor MAC address is configured
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'netlink.c')
-rw-r--r-- | netlink.c | 5 |
1 files changed, 5 insertions, 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; |