fail IPCP negotiation only on ConfigRej of IP-Address
authorBrendan O'Dea <bod@optus.net>
Wed, 17 Aug 2005 03:56:27 +0000 (03:56 +0000)
committerBrendan O'Dea <bod@optus.net>
Wed, 17 Aug 2005 03:56:27 +0000 (03:56 +0000)
Changes
l2tpns.h
l2tpns.spec
ppp.c

diff --git a/Changes b/Changes
index 2d79dc2..1965e88 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+* Wed Aug 17 2005 Brendan O'Dea <bod@optus.net> 2.1.3
+- Fail IPCP negotiation only on ConfigRej of IP-Address.
+
 * Wed Aug 10 2005 Brendan O'Dea <bod@optus.net> 2.1.2
 - Clear cluster_master on election so that slaves will accept a new master.
 - Provide more comments/defaults in etc/startup-config.default.
 * Wed Aug 10 2005 Brendan O'Dea <bod@optus.net> 2.1.2
 - Clear cluster_master on election so that slaves will accept a new master.
 - Provide more comments/defaults in etc/startup-config.default.
index 8a16c3c..7895937 100644 (file)
--- a/l2tpns.h
+++ b/l2tpns.h
@@ -1,5 +1,5 @@
 // L2TPNS Global Stuff
 // L2TPNS Global Stuff
-// $Id: l2tpns.h,v 1.82 2005-08-10 11:25:56 bodea Exp $
+// $Id: l2tpns.h,v 1.83 2005-08-17 03:56:27 bodea Exp $
 
 #ifndef __L2TPNS_H__
 #define __L2TPNS_H__
 
 #ifndef __L2TPNS_H__
 #define __L2TPNS_H__
@@ -15,7 +15,7 @@
 #include <sys/types.h>
 #include <libcli.h>
 
 #include <sys/types.h>
 #include <libcli.h>
 
-#define VERSION        "2.1.2"
+#define VERSION        "2.1.3"
 
 // Limits
 #define MAXTUNNEL      500             // could be up to 65535
 
 // Limits
 #define MAXTUNNEL      500             // could be up to 65535
index c236bdd..afe3393 100644 (file)
@@ -1,6 +1,6 @@
 Summary: A high-speed clustered L2TP LNS
 Name: l2tpns
 Summary: A high-speed clustered L2TP LNS
 Name: l2tpns
-Version: 2.1.2
+Version: 2.1.3
 Release: 1
 Copyright: GPL
 Group: System Environment/Daemons
 Release: 1
 Copyright: GPL
 Group: System Environment/Daemons
@@ -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
-* Wed Aug 10 2005 Brendan O'Dea <bod@optus.net> 2.1.2-1
-- 2.1.2 release, see /usr/share/doc/l2tpns-2.1.2/Changes
+* Wed Aug 17 2005 Brendan O'Dea <bod@optus.net> 2.1.3-1
+- 2.1.3 release, see /usr/share/doc/l2tpns-2.1.3/Changes
diff --git a/ppp.c b/ppp.c
index 340151b..05e0134 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.73 2005-08-12 14:12:28 bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.74 2005-08-17 03:56:27 bodea Exp $";
 
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -959,8 +959,9 @@ void processipcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
                                addr = htonl(session[s].ip);
                                if (memcmp(o + 2, &addr, (sizeof addr)))
                                {
                                addr = htonl(session[s].ip);
                                if (memcmp(o + 2, &addr, (sizeof addr)))
                                {
+                                       uint8_t *oq = q;
                                        q = ppp_nak(s, b, sizeof(b), PPPIPCP, &response, q, p, o, (uint8_t *) &addr, sizeof(addr));
                                        q = ppp_nak(s, b, sizeof(b), PPPIPCP, &response, q, p, o, (uint8_t *) &addr, sizeof(addr));
-                                       if (!q || *response == ConfigRej)
+                                       if (!q || (q != oq && *response == ConfigRej))
                                        {
                                                sessionshutdown(s, "Can't negotiate IPCP.", 3, 0);
                                                return;
                                        {
                                                sessionshutdown(s, "Can't negotiate IPCP.", 3, 0);
                                                return;