From c4c1ce10933423f5378cd68972ee12137152ad1f Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 12 Jan 2025 04:16:03 +0000 Subject: [PATCH] ip/ipconfig: unconditionally refresh when adding addresses manually (thanks chilledfrogs) The issue is that ndb/cs refuses to serve ipv6 only protocols (such as icmpv6) when it doesnt know we have ipv6 addresses (link local). So refreshing here is mandatory when we add/remove our link-local addresses. As link-local addresses are not added to ndb, so there is no change, but ndb/cs still needs to get refreshed. --- sys/src/cmd/ip/ipconfig/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/src/cmd/ip/ipconfig/main.c b/sys/src/cmd/ip/ipconfig/main.c index 75d4213e1..e726ecb82 100644 --- a/sys/src/cmd/ip/ipconfig/main.c +++ b/sys/src/cmd/ip/ipconfig/main.c @@ -556,8 +556,8 @@ doadd(void) } /* leave everything we've learned somewhere other procs can find it */ - if(putndb(1)) - refresh(); + putndb(1); + refresh(); } static void @@ -578,8 +578,8 @@ dodel(void) warning("can't delete %I %M: %r", conf.laddr, conf.mask); /* remove ndb entries matching our ip address */ - if(putndb(0)) - refresh(); + putndb(0); + refresh(); } static void