diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-10-12 00:17:26 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-10-13 00:30:45 +0100 |
commit | 7a048bd6871df952ff1324bec7175891c9b38f99 (patch) | |
tree | 50ed3d6a732fb6b1248b2049369f949930e62c6c /interface.h | |
parent | be8cd8fd4d6fd320bf668482fb49c4e0426c9d28 (diff) | |
download | netifd-7a048bd6871df952ff1324bec7175891c9b38f99.tar.gz |
interface, ubus: rework netns up/down
Let per-container netifd instance handle the netns bringdown, it makes
everything easier and gets rid of the fork() when bringing down
container network interfaces.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'interface.h')
-rw-r--r-- | interface.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/interface.h b/interface.h index 1767bf1..73a9070 100644 --- a/interface.h +++ b/interface.h @@ -109,7 +109,8 @@ struct interface { const char *name; const char *device; char *jail; - char *jail_ifname; + char *jail_device; + char *host_device; int netns_fd; bool available; @@ -208,7 +209,7 @@ void interface_update_start(struct interface *iface, const bool keep_old); void interface_update_complete(struct interface *iface); void interface_start_pending(void); -void interface_start_jail(const char *jail, const pid_t netns_pid); -void interface_stop_jail(const char *jail, const pid_t netns_pid); +void interface_start_jail(int netns_fd, const char *jail); +void interface_stop_jail(int netns_fd); #endif |