diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-16 18:23:33 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-16 18:23:33 -0700 |
commit | 1bf1c38b30a12472d9cb2f36718ba69c9d43abe0 (patch) | |
tree | 9735dc6867b8964438794d6990d0bcf4f1f9b272 /osdep | |
parent | eb4a78bcc36de37a24a8f9de22f37a104895ff84 (diff) | |
download | infinitytier-1bf1c38b30a12472d9cb2f36718ba69c9d43abe0.tar.gz infinitytier-1bf1c38b30a12472d9cb2f36718ba69c9d43abe0.zip |
Default route population works on Mac!
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/ManagedRoute.cpp | 4 | ||||
-rw-r--r-- | osdep/ManagedRoute.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index 118fc7d5..62597a00 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -234,8 +234,8 @@ static void _routeCmd(const char *op,const InetAddress &target,const InetAddress int exitcode = -1; ::waitpid(p,&exitcode,0); } else if (p == 0) { - //::close(STDOUT_FILENO); - //::close(STDERR_FILENO); + ::close(STDOUT_FILENO); + ::close(STDERR_FILENO); if (via) { if ((ifscope)&&(ifscope[0])) { ::execl(ZT_BSD_ROUTE_CMD,ZT_BSD_ROUTE_CMD,op,"-ifscope",ifscope,((target.ss_family == AF_INET6) ? "-inet6" : "-inet"),target.toString().c_str(),via.toIpString().c_str(),(const char *)0); diff --git a/osdep/ManagedRoute.hpp b/osdep/ManagedRoute.hpp index ca71b18b..7000e3a4 100644 --- a/osdep/ManagedRoute.hpp +++ b/osdep/ManagedRoute.hpp @@ -57,7 +57,7 @@ public: */ inline bool set(const InetAddress &target,const InetAddress &via,const char *device) { - if ((!_via)&&(!_device[0])) + if ((!via)&&(!device[0])) return false; this->remove(); _target = target; |