config: add --iface_own to the proto config

This commit is contained in:
Robert Swiecki 2018-06-03 03:19:40 +02:00
parent a30f2ddf12
commit 111481532b
2 changed files with 6 additions and 0 deletions

View File

@ -247,6 +247,9 @@ static bool configParseInternal(nsjconf_t* nsjconf, const nsjail::NsJailConfig&
nsjconf->cgroup_net_cls_parent = njc.cgroup_net_cls_parent();
nsjconf->iface_lo = !(njc.iface_no_lo());
for (ssize_t i = 0; i < njc.iface_own().size(); i++) {
nsjconf->ifaces.push_back(njc.iface_own(i));
}
if (njc.has_macvlan_iface()) {
nsjconf->iface_vs = njc.macvlan_iface();
}

View File

@ -217,6 +217,9 @@ message NsJailConfig {
/* Should the 'lo' interface be brought up (active) inside this jail? */
optional bool iface_no_lo = 71 [default = false];
/* Put this interface inside the jail */
repeated string iface_own = 78;
/* Parameters for the cloned MACVLAN interface inside jail */
optional string macvlan_iface = 72; /* Interface to be cloned, eg 'eth0' */
optional string macvlan_vs_ip = 73 [default = "192.168.0.2"];