ref: cbbce6b30133cbc8bf286cee6b71d3e08e5a7faa
parent: 2076c934d05f43869876ed2c6ac283c6d36683b8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Jul 23 17:35:51 EDT 2024
ip/ipconfig: fix logic bug (thanks cgnarne) We must not skip conf.preflt == 0 (only conf.validlt == 0) so that we can change the kernels preflt timeout.
--- a/sys/src/cmd/ip/ipconfig/ipv6.c
+++ b/sys/src/cmd/ip/ipconfig/ipv6.c
@@ -662,8 +662,7 @@
for(rr = &routelist; (r = *rr) != nil;){
if(m > 100
|| r->prefixlt != ~0UL && r->prefixlt < now-r->time
- || r->routerlt != ~0UL && r->routerlt < now-r->time
- || ipcmp(r->src, ra->src) == 0 && r->routerlt != 0 && conf.routerlt == 0){
+ || r->routerlt != ~0UL && r->routerlt < now-r->time){
DEBUG("purging RA from %I on %s; pfx %I %M",
r->src, conf.dev, r->laddr, r->mask);
if(!noconfig && validip(r->gaddr))
@@ -758,7 +757,7 @@
}
} else {
seen = 0;
- if(conf.preflt == 0)
+ if(conf.validlt == 0)
continue;
r = malloc(sizeof(*r));
}
--
⑨