fail IPCP negotiation only on ConfigRej of IP-Address

This commit is contained in:
bodea 2005-08-17 03:56:27 +00:00
parent d95367dce9
commit 447f820899
4 changed files with 11 additions and 7 deletions

View file

@ -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 * 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. - Clear cluster_master on election so that slaves will accept a new master.
- Provide more comments/defaults in etc/startup-config.default. - Provide more comments/defaults in etc/startup-config.default.

View file

@ -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__ #ifndef __L2TPNS_H__
#define __L2TPNS_H__ #define __L2TPNS_H__
@ -15,7 +15,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <libcli.h> #include <libcli.h>
#define VERSION "2.1.2" #define VERSION "2.1.3"
// Limits // Limits
#define MAXTUNNEL 500 // could be up to 65535 #define MAXTUNNEL 500 // could be up to 65535

View file

@ -1,6 +1,6 @@
Summary: A high-speed clustered L2TP LNS Summary: A high-speed clustered L2TP LNS
Name: l2tpns Name: l2tpns
Version: 2.1.2 Version: 2.1.3
Release: 1 Release: 1
Copyright: GPL Copyright: GPL
Group: System Environment/Daemons Group: System Environment/Daemons
@ -43,5 +43,5 @@ rm -rf %{buildroot}
%attr(644,root,root) /usr/share/man/man[58]/* %attr(644,root,root) /usr/share/man/man[58]/*
%changelog %changelog
* Wed Aug 10 2005 Brendan O'Dea <bod@optus.net> 2.1.2-1 * Wed Aug 17 2005 Brendan O'Dea <bod@optus.net> 2.1.3-1
- 2.1.2 release, see /usr/share/doc/l2tpns-2.1.2/Changes - 2.1.3 release, see /usr/share/doc/l2tpns-2.1.3/Changes

5
ppp.c
View file

@ -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 <stdio.h>
#include <string.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); addr = htonl(session[s].ip);
if (memcmp(o + 2, &addr, (sizeof addr))) 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); sessionshutdown(s, "Can't negotiate IPCP.", 3, 0);
return; return;