code formatting
This commit is contained in:
parent
eee0cec302
commit
7fe87b41c7
11
net.cc
11
net.cc
@ -189,12 +189,13 @@ bool initNsFromParent(nsjconf_t* nsjconf, int pid) {
|
|||||||
|
|
||||||
std::vector<std::string> argv;
|
std::vector<std::string> argv;
|
||||||
|
|
||||||
if ( nsjconf->iface_vs_ma != "" ) {
|
if (nsjconf->iface_vs_ma != "") {
|
||||||
argv = {"/sbin/ip", "link", "add", "link", nsjconf->iface_vs,
|
argv = {"/sbin/ip", "link", "add", "link", nsjconf->iface_vs, "name", IFACE_NAME,
|
||||||
"name", IFACE_NAME, "netns", std::to_string(pid), "address", nsjconf->iface_vs_ma, "type", "macvlan", "mode", "bridge"};
|
"netns", std::to_string(pid), "address", nsjconf->iface_vs_ma, "type",
|
||||||
|
"macvlan", "mode", "bridge"};
|
||||||
} else {
|
} else {
|
||||||
argv = {"/sbin/ip", "link", "add", "link", nsjconf->iface_vs,
|
argv = {"/sbin/ip", "link", "add", "link", nsjconf->iface_vs, "name", IFACE_NAME,
|
||||||
"name", IFACE_NAME, "netns", std::to_string(pid), "type", "macvlan", "mode", "bridge"};
|
"netns", std::to_string(pid), "type", "macvlan", "mode", "bridge"};
|
||||||
}
|
}
|
||||||
if (subproc::systemExe(argv, environ) != 0) {
|
if (subproc::systemExe(argv, environ) != 0) {
|
||||||
LOG_E("Couldn't create MACVTAP interface for '%s'", nsjconf->iface_vs.c_str());
|
LOG_E("Couldn't create MACVTAP interface for '%s'", nsjconf->iface_vs.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user