add handling of `rx connect speed' avp to ignore the bug of xl2tpd.
reported by sebastia@ on misc@.

ok?

Index: usr.sbin/npppd/l2tp/l2tp_call.c
===================================================================
RCS file: /cvs/src/usr.sbin/npppd/l2tp/l2tp_call.c,v
retrieving revision 1.9
diff -u -p -r1.9 l2tp_call.c
--- usr.sbin/npppd/l2tp/l2tp_call.c     18 Jan 2012 03:13:04 -0000      1.9
+++ usr.sbin/npppd/l2tp/l2tp_call.c     20 Jan 2012 06:57:38 -0000
@@ -504,6 +504,14 @@ l2tp_call_recv_ICCN(l2tp_call *_this, u_
                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);

Reply via email to