Fix network DNS on macOS

It stopped working for ipv4 only networks in Monterey.
See #1696

We add some config like so to System Configuration

```
scutil
show State:/Network/Service/9bee8941b5xxxxxx/IPv4
<dictionary> {
  Addresses : <array> {
    0 : 10.2.1.36
  }
  InterfaceName : feth4823
  Router : 10.2.1.36
  ServerAddress : 127.0.0.1
}

```
This commit is contained in:
travisladuke 2023-07-25 16:03:29 -07:00
commit c4ef8a5632
4 changed files with 137 additions and 8 deletions

View file

@ -245,7 +245,8 @@ MacEthernetTap::~MacEthernetTap()
pid_t pid0,pid1;
MacDNSHelper::removeDNS(_nwid);
MacDNSHelper::removeIps(_nwid);
MacDNSHelper::removeIps4(_nwid);
MacDNSHelper::removeIps6(_nwid);
Mutex::Lock _gl(globalTapCreateLock);
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit