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

@ -56,6 +56,8 @@
#define ECHO_TIMEOUT 10 // Time between last packet sent and LCP ECHO generation
#define IDLE_ECHO_TIMEOUT 240 // Time between last packet seen and session shutdown
#define BUSY_WAIT_TIME 3000 // 5 minutes in 1/10th seconds to wait for radius to cleanup on shutdown
#define AdvDefaultLifetime 9000
#define RtrAdvInterval 1800
#define MP_BEGIN 0x80 // This value is used when (b)egin bit is set in MP header
#define MP_END 0x40 // This value is used when (e)nd bit is set in MP header
@ -434,6 +436,9 @@ typedef struct
// last LCP Echo
time_t last_echo;
// last unsolicited RA sent to user
time_t last_ra;
// Last Multilink frame sequence number received
uint32_t last_seq;