add netmask for macos

pull/1319/head
Jeff Becker 4 years ago
parent 49eb42d63f
commit 7e562a5b37
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -307,7 +307,7 @@ AddDefaultRouteViaInterface(std::string ifname)
#elif _WIN32
ss << "route ADD 0.0.0.0 MASK 0.0.0.0 " << ifname;
#elif __APPLE__
ss << "route -n add -net 0.0.0.0 " << ifname;
ss << "route -n add -net 0.0.0.0 " << ifname << " 0.0.0.0";
#else
#error unsupported platform
#endif
@ -324,7 +324,7 @@ DelDefaultRouteViaInterface(std::string ifname)
#elif _WIN32
ss << "route DELETE 0.0.0.0 MASK 0.0.0.0 " << ifname;
#elif __APPLE__
ss << "route -n delete -net 0.0.0.0 " << ifname;
ss << "route -n delete -net 0.0.0.0 " << ifname << " 0.0.0.0";
#else
#error unsupported platform
#endif

Loading…
Cancel
Save