diff --git a/osdep/MacEthernetTapAgent.c b/osdep/MacEthernetTapAgent.c index 43c4cf133..ca75ed054 100644 --- a/osdep/MacEthernetTapAgent.c +++ b/osdep/MacEthernetTapAgent.c @@ -157,7 +157,7 @@ static int run(const char *path,...) args[argNo++] = (char *)0; va_end(ap); - pid_t pid = vfork(); + pid_t pid = fork(); if (pid < 0) { return -1; } else if (pid == 0) { diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index 4c1214a66..4371edbea 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -507,15 +507,15 @@ bool ManagedRoute::sync() } } - if (!_applied.count(leftt)) { + //if (!_applied.count(leftt)) { _applied[leftt] = !_via; - _routeCmd("delete",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); + //_routeCmd("delete",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); _routeCmd("add",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); //_routeCmd("change",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); - } - if ((rightt)&&(!_applied.count(rightt))) { + //} + if (rightt) { _applied[rightt] = !_via; - _routeCmd("delete",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); + //_routeCmd("delete",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); _routeCmd("add",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); //_routeCmd("change",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); }