projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix RADIUS authentication on DAE responses.
[l2tpns.git]
/
ppp.c
diff --git
a/ppp.c
b/ppp.c
index
fd5f460
..
4215cb8
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
2 2005-09-16 05:04:2
9 bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.8
4 2005-09-16 13:20:3
9 bodea Exp $";
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
@@
-459,7
+459,7
@@
static void ppp_code_rej(sessionidt s, tunnelidt t, uint16_t proto,
*q = CodeRej;
*(q + 1) = ++sess_local[s].lcp_ident;
*q = CodeRej;
*(q + 1) = ++sess_local[s].lcp_ident;
- *(uint16_t *)(q + 2) =
l
;
+ *(uint16_t *)(q + 2) =
htons(l)
;
memcpy(q + 4, p, l - 4);
LOG(2, s, t, "Unexpected %s code %s\n", pname, ppp_code(*p));
memcpy(q + 4, p, l - 4);
LOG(2, s, t, "Unexpected %s code %s\n", pname, ppp_code(*p));
@@
-1335,7
+1335,7
@@
void processipin(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
LOG_HEX(5, "IP", p, l);
LOG_HEX(5, "IP", p, l);
- if (l < 20
|| l < ntohl(*(uint32_t *)(p + 2))
)
+ if (l < 20)
{
LOG(1, s, t, "IP packet too short %d\n", l);
STAT(tunnel_rx_errors);
{
LOG(1, s, t, "IP packet too short %d\n", l);
STAT(tunnel_rx_errors);