summaryrefslogtreecommitdiff
path: root/usr.sbin/npppd/l2tp
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-01-23 03:41:22 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-01-23 03:41:22 +0000
commit9167b078d58ed71865df477979a78820f6a24cca (patch)
tree825d631a2fee1f8752e7bf6381b2a26716ff6c80 /usr.sbin/npppd/l2tp
parent3e553057324c1547600182b3f732cfacb168ce1f (diff)
Add handling of `rx connect speed' avp to avoid the bug of xl2tpd.
Reported and tested by sebastia@ ok sthen sebastia giovanni
Diffstat (limited to 'usr.sbin/npppd/l2tp')
-rw-r--r--usr.sbin/npppd/l2tp/l2tp_call.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/npppd/l2tp/l2tp_call.c b/usr.sbin/npppd/l2tp/l2tp_call.c
index 810997e756f..97cdcb91b3e 100644
--- a/usr.sbin/npppd/l2tp/l2tp_call.c
+++ b/usr.sbin/npppd/l2tp/l2tp_call.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: l2tp_call.c,v 1.9 2012/01/18 03:13:04 yasuoka Exp $ */
+/* $OpenBSD: l2tp_call.c,v 1.10 2012/01/23 03:41:21 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: l2tp_call.c,v 1.9 2012/01/18 03:13:04 yasuoka Exp $ */
+/* $Id: l2tp_call.c,v 1.10 2012/01/23 03:41:21 yasuoka Exp $ */
/**@file L2TP LNS call */
#include <sys/types.h>
#include <sys/param.h>
@@ -504,6 +504,14 @@ l2tp_call_recv_ICCN(l2tp_call *_this, u_char *pkt, int pktlen,
case L2TP_AVP_TYPE_MESSAGE_TYPE:
AVP_SIZE_CHECK(avp, ==, 8);
continue;
+ case L2TP_AVP_TYPE_RX_CONNECT_SPEED:
+ /*
+ * As RFC 2661 this AVP is not mandatory. But `xl2tpd'
+ * sends this as a mandatory AVP. Handle this to
+ * ignore the xl2tpd' bug.
+ */
+ AVP_SIZE_CHECK(avp, ==, 10);
+ continue;
case L2TP_AVP_TYPE_TX_CONNECT_SPEED:
AVP_SIZE_CHECK(avp, ==, 10);
tx_conn_speed = avp_get_val32(avp);