Add periodic RA sends
The RFC indeed say that we should send them periodically. We were previously only sending them along LCP echo replies, but echo requests are typically sent only when there is no trafic, which RA need to be sent even when there is trafic.
This commit is contained in:
parent
3be9b1657a
commit
05772e2295
4 changed files with 16 additions and 5 deletions
6
ppp.c
6
ppp.c
|
|
@ -1103,9 +1103,6 @@ void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
|||
if (config->debug > 3) dumplcp(q, l);
|
||||
|
||||
tunnelsend(b, l + (q - b), t); // send it
|
||||
|
||||
if (session[s].ppp.phase == Network && session[s].ppp.ipv6cp == Opened)
|
||||
send_ipv6_ra(s, t, NULL); // send a RA
|
||||
}
|
||||
else if (*p == EchoReply)
|
||||
{
|
||||
|
|
@ -1498,8 +1495,9 @@ static void ipv6cp_open(sessionidt s, tunnelidt t)
|
|||
route6set(s, session[s].ipv6address, 128, 1);
|
||||
}
|
||||
|
||||
// Send an initial RA (TODO: Should we send these regularly?)
|
||||
// Send an initial RA
|
||||
send_ipv6_ra(s, t, NULL);
|
||||
sess_local[s].last_ra = time_now;
|
||||
}
|
||||
|
||||
// Process IPV6CP messages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue