projects
/
l2tpns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e1f961e
)
ensure MRU is sane
author
Brendan O'Dea
<bod@optus.net>
Thu, 17 Nov 2005 05:24:17 +0000
(
05:24
+0000)
committer
Brendan O'Dea
<bod@optus.net>
Thu, 17 Nov 2005 05:24:17 +0000
(
05:24
+0000)
ppp.c
patch
|
blob
|
history
diff --git
a/ppp.c
b/ppp.c
index
358b90b
..
0b63596
100644
(file)
--- a/
ppp.c
+++ b/
ppp.c
@@
-1,6
+1,6
@@
// L2TPNS PPP Stuff
// L2TPNS PPP Stuff
-char const *cvs_id_ppp = "$Id: ppp.c,v 1.8
5 2005-11-04 14:41:50
bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.8
6 2005-11-17 05:24:17
bodea Exp $";
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
@@
-575,7
+575,18
@@
void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
switch (type)
{
case 1: // Maximum-Receive-Unit
switch (type)
{
case 1: // Maximum-Receive-Unit
- session[s].mru = ntohs(*(uint16_t *)(o + 2));
+ {
+ uint16_t mru = ntohs(*(uint16_t *)(o + 2));
+ if (mru >= 576)
+ {
+ session[s].mru = mru;
+ break;
+ }
+
+ LOG(3, s, t, " Remote requesting MRU of %u. Rejecting.\n", mru);
+ mru = htons(MRU);
+ q = ppp_conf_nak(s, b, sizeof(b), PPPLCP, &response, q, p, o, (uint8_t *) &mru, sizeof(mru));
+ }
break;
case 2: // Async-Control-Character-Map
break;
case 2: // Async-Control-Character-Map