mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
More OSX IPv6 fixes.
This commit is contained in:
parent
3f2b21ce71
commit
23391ff9da
2 changed files with 3 additions and 3 deletions
|
@ -415,7 +415,7 @@ bool ManagedRoute::sync()
|
||||||
// Shadow system route if it exists, also delete any obsolete shadows
|
// Shadow system route if it exists, also delete any obsolete shadows
|
||||||
// and replace them with the new state. sync() is called periodically to
|
// and replace them with the new state. sync() is called periodically to
|
||||||
// allow us to do that if underlying connectivity changes.
|
// allow us to do that if underlying connectivity changes.
|
||||||
if ( ((_systemVia != newSystemVia)||(!strcmp(_systemDevice,newSystemDevice))) && (strcmp(_device,newSystemDevice)) ) {
|
if ( ((_systemVia != newSystemVia)||(strcmp(_systemDevice,newSystemDevice))) && (strcmp(_device,newSystemDevice)) ) {
|
||||||
if ((_systemVia)&&(_systemDevice[0])) {
|
if ((_systemVia)&&(_systemDevice[0])) {
|
||||||
_routeCmd("delete",leftt,_systemVia,_systemDevice,(const char *)0);
|
_routeCmd("delete",leftt,_systemVia,_systemDevice,(const char *)0);
|
||||||
_routeCmd("delete",rightt,_systemVia,_systemDevice,(const char *)0);
|
_routeCmd("delete",rightt,_systemVia,_systemDevice,(const char *)0);
|
||||||
|
|
|
@ -474,7 +474,7 @@ bool OSXEthernetTap::addIp(const InetAddress &ip)
|
||||||
|
|
||||||
long cpid = (long)vfork();
|
long cpid = (long)vfork();
|
||||||
if (cpid == 0) {
|
if (cpid == 0) {
|
||||||
::execl("/sbin/ifconfig","/sbin/ifconfig",_dev.c_str(),ip.isV4() ? "inet" : "inet6",ip.toString().c_str(),"alias",(const char *)0);
|
::execl("/sbin/ifconfig","/sbin/ifconfig",_dev.c_str(),(ip.ss_family == AF_INET6) ? "inet6" : "inet",ip.toString().c_str(),"alias",(const char *)0);
|
||||||
::_exit(-1);
|
::_exit(-1);
|
||||||
} else if (cpid > 0) {
|
} else if (cpid > 0) {
|
||||||
int exitcode = -1;
|
int exitcode = -1;
|
||||||
|
@ -494,7 +494,7 @@ bool OSXEthernetTap::removeIp(const InetAddress &ip)
|
||||||
if (*i == ip) {
|
if (*i == ip) {
|
||||||
long cpid = (long)vfork();
|
long cpid = (long)vfork();
|
||||||
if (cpid == 0) {
|
if (cpid == 0) {
|
||||||
execl("/sbin/ifconfig","/sbin/ifconfig",_dev.c_str(),"inet",ip.toIpString().c_str(),"-alias",(const char *)0);
|
execl("/sbin/ifconfig","/sbin/ifconfig",_dev.c_str(),(ip.ss_family == AF_INET6) ? "inet6" : "inet",ip.toIpString().c_str(),"-alias",(const char *)0);
|
||||||
_exit(-1);
|
_exit(-1);
|
||||||
} else if (cpid > 0) {
|
} else if (cpid > 0) {
|
||||||
int exitcode = -1;
|
int exitcode = -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue