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:
Samuel Thibault 2023-12-03 22:32:07 +01:00
parent 3be9b1657a
commit 05772e2295
4 changed files with 16 additions and 5 deletions

View file

@ -3833,6 +3833,14 @@ static void regular_cleanups(double period)
s_actions++;
}
// Send periodic RA
if (session[s].ppp.phase == Network && session[s].ppp.ipv6cp == Opened &&
(time_now - sess_local[s].last_ra >= RtrAdvInterval))
{
send_ipv6_ra(s, t, NULL);
sess_local[s].last_ra = time_now;
}
// Drop sessions who have reached session_timeout seconds
if (session[s].session_timeout)
{