Add mp_mrru option

Some equipments seem not able to actually put options in Configure-Reject
messages, so we then have to disable MRRU by hand.
This commit is contained in:
Samuel Thibault 2022-11-03 13:27:51 +01:00
parent b3b5fc5c59
commit 8e7bfa9a77
6 changed files with 29 additions and 4 deletions

View file

@ -661,8 +661,11 @@ static void pppoe_recv_PADR(uint8_t *pack, int size)
sess_local[sid].ppp_mru = MRU;
// Set multilink options before sending initial LCP packet
sess_local[sid].mp_mrru = 1614;
sess_local[sid].mp_epdis = ntohl(config->iftun_address ? config->iftun_address : my_address);
sess_local[sid].mp_mrru = config->mp_mrru;
if (config->mp_mrru)
sess_local[sid].mp_epdis = ntohl(config->iftun_address ? config->iftun_address : my_address);
else
sess_local[sid].mp_epdis = 0;
memcpy(session[sid].src_hwaddr, ethhdr->h_source, ETH_ALEN);
pppoe_send_PADS(sid, ethhdr->h_source, host_uniq_tag, relay_sid_tag, service_name_tag);