ZeroTierOne/osdep
travis laduke 22ab673480 Apply default route a different way - macOS
The original way we applied default route, by forking
0.0.0.0/0 into 0/1 and 128/1 works, but if mac os has any networking
hiccups -if you change SSIDs or sleep/wake- macos erases the system default route.
And then all networking on the computer is broken.

to summarize the new way:
allowDefault=1
```
sudo route delete default 192.168.82.1
sudo route add default 10.2.0.2
sudo route add -ifscope en1 default 192.168.82.1
```

gives us this routing table
```
Destination        Gateway            RT_IFA             Flags        Refs      Use    Mtu          Netif Expire    rtt(ms) rttvar(ms)
default            10.2.0.2           10.2.0.18          UGScg          90        1   2800       feth4823
default            192.168.82.1       192.168.82.217     UGScIg
```

allowDefault=0
```
sudo route delete default
sudo route delete -ifscope en1 default
sudo route add default 192.168.82.1
```

Notice the I flag, for -ifscope, on the physical default route.

route change does not seem to work reliably.
2023-07-20 13:37:05 -07:00
..
Arp.cpp BSL date bump 2020-08-20 12:51:39 -07:00
Arp.hpp BSL date bump 2020-08-20 12:51:39 -07:00
Binder.hpp Fix ifdef that breaks libzt on iOS (#2050) 2023-07-17 16:49:58 -07:00
BlockingQueue.hpp central controller metrics & request path updates (#2012) 2023-05-23 12:11:26 -07:00
BSDEthernetTap.cpp cache getifaddrs - bsd 2023-05-25 11:21:35 -07:00
BSDEthernetTap.hpp cache getifaddrs - bsd 2023-05-25 11:21:35 -07:00
EthernetTap.cpp Automatically detect Ethernet tap friendly name in Windows shouldBind stuff. 2021-03-16 10:12:55 -04:00
EthernetTap.hpp add constant for getifaddrs cache time 2023-05-25 11:21:35 -07:00
freebsd_getifmaddrs.c cleanup 2016-12-27 11:57:05 +01:00
freebsd_getifmaddrs.h Updated licenses for 2019 2019-01-14 10:25:53 -08:00
Http.cpp BSL date bump 2020-08-20 12:51:39 -07:00
Http.hpp Use lowercase when including Windows headers 2021-12-29 16:29:08 -05:00
LinuxEthernetTap.cpp cache getifaddrs - linux 2023-05-25 11:21:35 -07:00
LinuxEthernetTap.hpp cache getifaddrs - linux 2023-05-25 11:21:35 -07:00
LinuxNetLink.cpp Merge pull request #1110 from neheb/patch-1 2022-03-07 13:53:14 -05:00
LinuxNetLink.hpp Linux build fixes. 2020-11-16 11:11:52 -08:00
MacDNSHelper.hpp Convince macOS to do ipv6 dns lookups 2021-12-13 12:34:41 -08:00
MacDNSHelper.mm fix memory leak in macos ipv6/dns helper (#2030) 2023-07-06 12:32:10 -07:00
MacEthernetTap.cpp cache getifaddrs - mac 2023-05-25 11:21:35 -07:00
MacEthernetTap.hpp cache getifaddrs - mac 2023-05-25 11:21:35 -07:00
MacEthernetTapAgent.c Remove deprecated vfork call on Mac, and make Mac route application more robust. 2021-10-26 22:15:06 -04:00
MacEthernetTapAgent.h BSL date bump 2020-08-20 12:51:39 -07:00
MacKextEthernetTap.cpp This code is obsolete but remove vfork anyway. 2021-11-15 14:09:52 -05:00
MacKextEthernetTap.hpp BSL date bump 2020-08-20 12:51:39 -07:00
ManagedRoute.cpp Apply default route a different way - macOS 2023-07-20 13:37:05 -07:00
ManagedRoute.hpp Simplify and fix managed route logic. 2020-11-02 19:02:07 -05:00
NeighborDiscovery.cpp BSL date bump 2020-08-20 12:51:39 -07:00
NeighborDiscovery.hpp BSL date bump 2020-08-20 12:51:39 -07:00
NetBSDEthernetTap.cpp BSL date bump 2020-08-20 12:51:39 -07:00
NetBSDEthernetTap.hpp BSL date bump 2020-08-20 12:51:39 -07:00
OSUtils.cpp Network-metrics (#1994) 2023-05-03 13:43:45 -07:00
OSUtils.hpp Network-metrics (#1994) 2023-05-03 13:43:45 -07:00
Phy.hpp Implement recvmmsg() for Linux to reduce syscalls. (#2046) 2023-07-20 11:36:37 -04:00
PortMapper.cpp Release memory previously allocated by UPNP_GetValidIGD 2023-07-13 16:34:14 -07:00
PortMapper.hpp BSL date bump 2020-08-20 12:51:39 -07:00
README.md docs 2015-03-31 14:12:33 -07:00
Thread.hpp Use lowercase when including Windows headers 2021-12-29 16:29:08 -05:00
WinDNSHelper.cpp clean up some debug logging 2020-08-12 09:16:18 -07:00
WinDNSHelper.hpp Windows DNS 2020-08-11 18:55:42 -07:00
WindowsEthernetTap.cpp cache getifaddrs - windows 2023-05-25 11:21:35 -07:00
WindowsEthernetTap.hpp cache getifaddrs - windows 2023-05-25 11:21:35 -07:00
WinFWHelper.cpp enable ICMP in windows firewall 2022-12-21 15:38:46 -08:00
WinFWHelper.hpp enable ICMP in windows firewall 2022-12-21 15:38:46 -08:00

OS-Dependent and OS-Interface Things

This folder contains stuff that interfaces with the base operating system like Phy for network access and the various OS-specific Ethernet tap drivers.