ref: 9a853e0d792a1e7fe218b43d373ea2760e3a2d34
parent: 10d74fec160b6a97c1c434dc35c48f176974fb55
author: cinap_lenrek <[email protected]>
date: Sat May 27 12:16:55 EDT 2023
ip/ipconfig: avoid refreshing /net/dns for non-primary interface when not updating /net/ndb, theres no new information for the dns resolver, so skip refreshing it. we still refresh /net/cs to notify it for added or removed interface.
--- a/sys/src/cmd/ip/ipconfig/main.c
+++ b/sys/src/cmd/ip/ipconfig/main.c
@@ -880,6 +880,11 @@
write(fd, "refresh", 7);
close(fd);
}
+
+ /* dns unaffected, no need to refresh dns */
+ if(!beprimary)
+ return;
+
snprint(file, sizeof file, "%s/dns", conf.mpoint);
if((fd = open(file, OWRITE)) >= 0){
write(fd, "refresh", 7);