Hi, for a year or so i've had the following local patch to xl2tpd -without it, as soon as there's a 'large' packet over ppp, xl2tpd drops the cnx, while if this check is killed out its perfectly fine and sort of usable.
Reported upstream as https://github.com/xelerance/xl2tpd/issues/133 but so far no real reaction from upstream. What do xl2tpd users think about it ? Am i the only one using it with npppd on the serverside (which i dont control..) (Oh and im building with MAKE_FLAGS=DFLAGS="-DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_FLOW -DDEBUG_PAYLOAD -DDEBUG_CONTROL -DDEBUG_CONTROL_XMIT -DDEBUG_PPPD -DDEBUG_AAA -DDEBUG_FILE -DDEBUG_AUTH" because i love debugging l2tp code) Landry Index: control.c --- control.c.orig +++ control.c @@ -1500,10 +1500,11 @@ static inline int expand_payload (struct buffer *buf, c->pSr=new_hdr->Ns; } */ #ifdef DEBUG_PAYLOAD - l2tp_log (LOG_DEBUG, "%s: payload, cid = %d, Ns = %d, Nr = %d\n", __FUNCTION__, - c->cid, new_hdr->Ns, new_hdr->Nr); + l2tp_log (LOG_DEBUG, "%s: payload, cid = %d, Ns = %d, Nr = %d, expecting %d but not giving a fuck\n", __FUNCTION__, + c->cid, new_hdr->Ns, new_hdr->Nr, c->data_seq_num); #endif - if (new_hdr->Ns != c->data_seq_num) + if (0) +// if (new_hdr->Ns != c->data_seq_num) { /* RFC1982-esque comparison of serial numbers */ if (((new_hdr->Ns < c->data_rec_seq_num) && @@ -1525,8 +1526,8 @@ static inline int expand_payload (struct buffer *buf, #ifdef DEBUG_FLOW if (DEBUG) l2tp_log (LOG_DEBUG, - "%s: Oops, lost a packet or two (%d). continuing...\n", - __FUNCTION__, new_hdr->Ns); + "%s: Oops, lost a packet or two (got %d, expected %d). continuing...\n", + __FUNCTION__, new_hdr->Ns, c->data_rec_seq_num); #endif c->data_rec_seq_num = new_hdr->Ns; } @@ -1535,8 +1536,8 @@ static inline int expand_payload (struct buffer *buf, #ifdef DEBUG_FLOW if (DEBUG) l2tp_log (LOG_DEBUG, - "%s: Received out of order payload packet (%d)\n", - __FUNCTION__, new_hdr->Ns); + "%s: Received out of order payload packet (got %d, expected %d)\n", + __FUNCTION__, new_hdr->Ns, c->data_rec_seq_num); #endif return -EINVAL; }