nspawn: explicitly remove veth links after use (#3111)
* sd-netlink: permit RTM_DELLINK messages with no ifindex This is useful for removing network interfaces by name. * nspawn: explicitly remove veth links we created after use Sometimes the kernel keeps veth links pinned after the namespace they have been joined to died. Let's hence explicitly remove veth links after use. Fixes: #2173
This commit is contained in:
committed by
Daniel Mack
parent
4f4d6ee4be
commit
d2773e59de
@@ -3713,6 +3713,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
expose_port_flush(arg_expose_ports, &exposed);
|
||||
(void) remove_veth_links(veth_name, arg_network_veth_extra);
|
||||
}
|
||||
|
||||
finish:
|
||||
@@ -3745,6 +3746,7 @@ finish:
|
||||
}
|
||||
|
||||
expose_port_flush(arg_expose_ports, &exposed);
|
||||
(void) remove_veth_links(veth_name, arg_network_veth_extra);
|
||||
|
||||
free(arg_directory);
|
||||
free(arg_template);
|
||||
|
||||
Reference in New Issue
Block a user