X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fipv6cp.c;h=000c863a3466a754d2f6d7b3125833b098d450d1;hb=739c7d957d0d5e86a9fecfd8b0bfc4250e910f9b;hp=2d062c52b34b2c18ad6ba11755f8f4804cf323e7;hpb=f53a48eb9d74db3c71938e114b7f489c339bc003;p=ppp.git diff --git a/pppd/ipv6cp.c b/pppd/ipv6cp.c index 2d062c5..000c863 100644 --- a/pppd/ipv6cp.c +++ b/pppd/ipv6cp.c @@ -135,10 +135,10 @@ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ipv6cp.c,v 1.17 2002/12/04 23:03:32 paulus Exp $ + * $Id: ipv6cp.c,v 1.19 2004/01/13 03:59:37 paulus Exp $ */ -#define RCSID "$Id: ipv6cp.c,v 1.17 2002/12/04 23:03:32 paulus Exp $" +#define RCSID "$Id: ipv6cp.c,v 1.19 2004/01/13 03:59:37 paulus Exp $" /* * TODO: @@ -752,10 +752,10 @@ ipv6cp_nakci(f, p, len) * If they want to negotiate about interface identifier, we comply. * If they want us to ask for compression, we refuse. */ - while (len > CILEN_VOID) { + while (len >= CILEN_VOID) { GETCHAR(citype, p); GETCHAR(cilen, p); - if( (len -= cilen) < 0 ) + if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) goto bad; next = p + cilen - 2; @@ -1522,7 +1522,6 @@ ipv6cp_printpkt(p, plen, printer, arg) */ #define IP6_HDRLEN 40 /* bytes */ #define IP6_NHDR_FRAG 44 /* fragment IPv6 header */ -#define IPPROTO_TCP 6 #define TCP_HDRLEN 20 #define TH_FIN 0x01