mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
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.
This commit is contained in:
parent
2076c934d0
commit
cbbce6b301
1 changed files with 2 additions and 3 deletions
|
@ -662,8 +662,7 @@ recvrahost(uchar buf[], int pktlen)
|
|||
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 @@ recvrahost(uchar buf[], int pktlen)
|
|||
}
|
||||
} else {
|
||||
seen = 0;
|
||||
if(conf.preflt == 0)
|
||||
if(conf.validlt == 0)
|
||||
continue;
|
||||
r = malloc(sizeof(*r));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue