l2tp: Expose a control receive window > 4
The default 4 is really small, and imposes very sequential processing of reconnections in case we lose all sessions. Nowadays we easily have memory for a lot more.
This commit is contained in:
parent
c12eab7a9c
commit
499677627f
2 changed files with 3 additions and 0 deletions
2
l2tpns.c
2
l2tpns.c
|
|
@ -4759,6 +4759,7 @@ void processudp(uint8_t *buf, int len, struct sockaddr_in *addr, uint16_t indexu
|
|||
controls(c, 7, config->multi_n_hostname[tunnel[t].indexudp][0]?config->multi_n_hostname[tunnel[t].indexudp]:hostname, 1); // host name
|
||||
if (sendchalresponse) controlb(c, 13, sendchalresponse, 16, 1); // Send Challenge response
|
||||
control16(c, 9, t, 1); // assigned tunnel
|
||||
control16(c, 10, CONTROLWIN, 1); // receive window size
|
||||
controladd(c, 0, t); // send the resply
|
||||
}
|
||||
else
|
||||
|
|
@ -8589,6 +8590,7 @@ void lac_send_SCCRQ(tunnelidt t, uint8_t * auth, unsigned int auth_len)
|
|||
control16(c, 2, version, 1); // protocol version
|
||||
control32(c, 3, 3, 1); // framing Capabilities
|
||||
control16(c, 9, t, 1); // assigned tunnel
|
||||
control16(c, 10, CONTROLWIN, 1); // receive window size
|
||||
controlb(c, 11, (uint8_t *) auth, auth_len, 1); // CHAP Challenge
|
||||
LOG(3, 0, t, "Sent SCCRQ to REMOTE LNS\n");
|
||||
controladd(c, 0, t); // send
|
||||
|
|
|
|||
1
l2tpns.h
1
l2tpns.h
|
|
@ -42,6 +42,7 @@
|
|||
#define T_FREE (0) // A tunnel ID that won't ever be used. Mark session as free.
|
||||
|
||||
#define MAXCONTROL 1000 // max length control message we ever send...
|
||||
#define CONTROLWIN 128 // receive window size, controls the maximum size of controlr
|
||||
#define MINMTU 576 // minimum recommended MTU (rfc1063)
|
||||
#define MAXMTU 2600 // arbitrary maximum MTU
|
||||
#define PPPoE_MRU 1492 // maximum PPPoE MRU (rfc2516: 1500 less PPPoE header (6) and PPP protocol ID (2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue