diff options
| author | Grant Limberg <glimberg@gmail.com> | 2016-07-14 19:29:10 -0700 |
|---|---|---|
| committer | Grant Limberg <glimberg@gmail.com> | 2016-07-14 19:29:10 -0700 |
| commit | 2afe3d89d00c0336db3e293d2e9dbd8d0e0083e7 (patch) | |
| tree | f07d029f5a76ac3cbea1ac92491e2cfa59391572 /osdep/ManagedRoute.cpp | |
| parent | 8a15b42dabbacd522bfc7c2042591fa71692136c (diff) | |
| parent | bdc3b0834bb8abc621ee6dbc9a92769b57376bee (diff) | |
| download | infinitytier-2afe3d89d00c0336db3e293d2e9dbd8d0e0083e7.tar.gz infinitytier-2afe3d89d00c0336db3e293d2e9dbd8d0e0083e7.zip | |
Merge branch 'master' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne
Diffstat (limited to 'osdep/ManagedRoute.cpp')
| -rw-r--r-- | osdep/ManagedRoute.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index 54990122..ae2f8943 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -57,6 +57,8 @@ #define ZT_LINUX_IP_COMMAND "/sbin/ip" #define ZT_LINUX_IP_COMMAND_2 "/usr/sbin/ip" +// NOTE: BSD is mostly tested on Apple/Mac but is likely to work on other BSD too + namespace ZeroTier { namespace { @@ -413,7 +415,7 @@ bool ManagedRoute::sync() // Shadow system route if it exists, also delete any obsolete shadows // and replace them with the new state. sync() is called periodically to // allow us to do that if underlying connectivity changes. - if ((_systemVia != newSystemVia)||(!strcmp(_systemDevice,newSystemDevice))) { + if ( ((_systemVia != newSystemVia)||(strcmp(_systemDevice,newSystemDevice))) && (strcmp(_device,newSystemDevice)) ) { if ((_systemVia)&&(_systemDevice[0])) { _routeCmd("delete",leftt,_systemVia,_systemDevice,(const char *)0); _routeCmd("delete",rightt,_systemVia,_systemDevice,(const char *)0); |
