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:
parent
41f9bdc5db
commit
fb6af1971b
4 changed files with 137 additions and 8 deletions
|
@ -2531,8 +2531,13 @@ public:
|
|||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (!MacDNSHelper::addIps(n.config().nwid, n.config().mac, n.tap()->deviceName().c_str(), newManagedIps))
|
||||
if (!MacDNSHelper::addIps6(n.config().nwid, n.config().mac, n.tap()->deviceName().c_str(), newManagedIps)) {
|
||||
fprintf(stderr, "ERROR: unable to add v6 addresses to system configuration" ZT_EOL_S);
|
||||
}
|
||||
|
||||
if (!MacDNSHelper::addIps4(n.config().nwid, n.config().mac, n.tap()->deviceName().c_str(), newManagedIps)) {
|
||||
fprintf(stderr, "ERROR: unable to add v4 addresses to system configuration" ZT_EOL_S);
|
||||
}
|
||||
#endif
|
||||
n.setManagedIps(newManagedIps);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue