diff options
author | Daniel Golle <daniel@makrotopia.org> | 2019-12-30 14:57:47 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-01-18 13:39:45 +0200 |
commit | 1321c1bd8fe921986c4eb39c3783ddd827b79543 (patch) | |
tree | 89c1af96541324a445e683ea978f8f4aede3f2ee /interface-ip.h | |
parent | 64f4eb79fe2977320660f8940bc908fa4def807b (diff) |
add basic support for jail network namespaces
Prepare netifd for handling procd service jails having their own
network namespace.
Intefaces having the jail attribute will only be brought inside the
jail's network namespace by procd calling the newly introduced ubus
method 'netns_updown'.
Currently proto 'static' is supported and configuration changes are
not yet being handled (ie. you'll have to restart the jailed service
for changes to take effect).
Example /etc/config/network snippet:
config device 'veth0'
option type 'veth'
option name 'vhost0'
option peer_name 'virt0'
config interface 'virt'
option type 'bridge'
list ifname 'vhost0'
option proto 'static'
option ipaddr '10.0.0.1'
option netmask '255.255.255.0'
config interface 'virt0'
option ifname 'virt0'
option proto 'static'
option ipaddr '10.0.0.2'
option netmask '255.255.255.0'
option gateway '10.0.0.1'
option dns '10.0.0.1'
option jail 'transmission'
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'interface-ip.h')
-rw-r--r-- | interface-ip.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-ip.h b/interface-ip.h index 3f99eb9..5ab9299 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -173,7 +173,7 @@ extern struct list_head prefixes; void interface_ip_init(struct interface *iface); void interface_add_dns_server_list(struct interface_ip_settings *ip, struct blob_attr *list); void interface_add_dns_search_list(struct interface_ip_settings *ip, struct blob_attr *list); -void interface_write_resolv_conf(void); +void interface_write_resolv_conf(const char *jail); void interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6); void interface_ip_add_neighbor(struct interface *iface, struct blob_attr *attr, bool v6); |