Make sure to add HDLC header when forwarding over L2TP

This commit is contained in:
Tassilo Schweyer 2025-04-29 00:43:00 +02:00
parent 7442bddd3d
commit 0c9338b03a

4
ppp.c
View file

@ -2628,13 +2628,13 @@ uint8_t *makeppp(uint8_t *b, int size, uint8_t *p, int l, sessionidt s, tunnelid
bid = 0; bid = 0;
} }
if (type == PPPLCP || !(session[s].flags & SESSION_ACFC)) if (type == PPPLCP || !(session[s].flags & SESSION_ACFC) || session[s].forwardtosession)
{ {
*(uint16_t *) b = htons(0xFF03); // HDLC header *(uint16_t *) b = htons(0xFF03); // HDLC header
b += 2; b += 2;
} }
if (type < 0x100 && session[s].flags & SESSION_PFC) if ((type < 0x100 && session[s].flags & SESSION_PFC) && !session[s].forwardtosession)
{ {
*b++ = type; *b++ = type;
} }