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:
3efd4f8
)
fix parsing of protocol rej
author
bodea
<bodea>
Mon, 29 Aug 2005 03:21:14 +0000
(
03:21
+0000)
committer
bodea
<bodea>
Mon, 29 Aug 2005 03:21:14 +0000
(
03:21
+0000)
Changes
patch
|
blob
|
history
l2tpns.spec
patch
|
blob
|
history
ppp.c
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
ddf7e3c
..
d54c990
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,5
+1,6
@@
-*
Thu Aug 25
2005 Brendan O'Dea <bod@optus.net> 2.1.4
+*
Mon Aug 29
2005 Brendan O'Dea <bod@optus.net> 2.1.4
- Drop level of "Unexpected CHAP message" log.
- Drop level of "Unexpected CHAP message" log.
+- Fix parsing of ProtocolRej (allow 1 or two byte protocols).
* Wed Aug 17 2005 Brendan O'Dea <bod@optus.net> 2.1.3
- Fail IPCP negotiation only on ConfigRej of IP-Address.
* Wed Aug 17 2005 Brendan O'Dea <bod@optus.net> 2.1.3
- Fail IPCP negotiation only on ConfigRej of IP-Address.
diff --git
a/l2tpns.spec
b/l2tpns.spec
index
19cdbdc
..
29dd2cc
100644
(file)
--- a/
l2tpns.spec
+++ b/
l2tpns.spec
@@
-43,5
+43,5
@@
rm -rf %{buildroot}
%attr(644,root,root) /usr/share/man/man[58]/*
%changelog
%attr(644,root,root) /usr/share/man/man[58]/*
%changelog
-*
Thu Aug 25
2005 Brendan O'Dea <bod@optus.net> 2.1.4-1
+*
Mon Aug 29
2005 Brendan O'Dea <bod@optus.net> 2.1.4-1
- 2.1.4 release, see /usr/share/doc/l2tpns-2.1.4/Changes
- 2.1.4 release, see /usr/share/doc/l2tpns-2.1.4/Changes
diff --git
a/ppp.c
b/ppp.c
index
dead47f
..
005d42a
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.7
5 2005/08/24 23:44:08
bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.7
6 2005/08/29 03:21:14
bodea Exp $";
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
@@
-813,16
+813,26
@@
void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
}
else if (*p == ProtocolRej)
{
}
else if (*p == ProtocolRej)
{
- if (*(uint16_t *) (p+4) == htons(PPPIPV6CP))
+ uint16_t proto = 0;
+
+ if (l > 4)
+ {
+ proto = *(p+4);
+ if (l > 5 && !(proto & 1))
+ {
+ proto <<= 8;
+ proto |= *(p+5);
+ }
+ }
+
+ if (proto == PPPIPV6CP)
{
LOG(3, s, t, "IPv6 rejected\n");
change_state(s, ipv6cp, Closed);
}
else
{
{
LOG(3, s, t, "IPv6 rejected\n");
change_state(s, ipv6cp, Closed);
}
else
{
- LOG(1, s, t, "Unexpected LCP protocol reject 0x%X\n",
- ntohs(*(uint16_t *) (p+4)));
- STAT(tunnel_rx_errors);
+ LOG(3, s, t, "LCP protocol reject: 0x%04X\n", proto);
}
}
else if (*p == EchoReq)
}
}
else if (*p == EchoReq)