Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 1996 11:50:48 -0400
From:      dennis@etinc.com (dennis)
To:        Sandy Kovshov <sandy@Lapkin.RoSprint.ru>
Cc:        hackers@freebsd.org
Subject:   Re: sppp with cisco hdlc bug fix
Message-ID:  <199609151550.LAA08784@etinc.com>

next in thread | raw e-mail | index | archive | help
Why would you process a packet with an invalid header in the first
place?

Dennis

> Hello guys,
>
>
> Here is little patch for bug in sppp pseudo driver with cisco hdlc protocol.
> I've found it when test Riscom/N2 card with Cisco. At unknown reason,
> Cisco send 20 byte packet (without ppp header) instead of 18 ;)
> With old version it cause line hangup on keepalive timeout.
>
>
>Index: net/if_spppsubr.c
>===================================================================
>RCS file: /home/sandy/project/freebsd/cvs/src/sys/net/if_spppsubr.c,v
>retrieving revision 1.13
>diff -c -r1.13 if_spppsubr.c
>*** if_spppsubr.c	1996/08/30 16:44:36	1.13
>--- if_spppsubr.c	1996/09/15 01:46:31
>***************
>*** 848,854 ****
>  	struct ifaddr *ifa;
>  	struct ifnet *ifp = &sp->pp_if;
>  
>! 	if (m->m_pkthdr.len != CISCO_PACKET_LEN) {
>  		if (ifp->if_flags & IFF_DEBUG)
>  			printf ("%s%d: invalid cisco packet length: %d bytes\n",
>  				ifp->if_name, ifp->if_unit, m->m_pkthdr.len);
>--- 848,854 ----
>  	struct ifaddr *ifa;
>  	struct ifnet *ifp = &sp->pp_if;
>  
>! 	if (m->m_pkthdr.len < CISCO_PACKET_LEN) {
>  		if (ifp->if_flags & IFF_DEBUG)
>  			printf ("%s%d: invalid cisco packet length: %d bytes\n",
>  				ifp->if_name, ifp->if_unit, m->m_pkthdr.len);
>
>
> With best regards.
>---
>Sandy
>E-mail:  Internet: sandy@dream.demos.su    sandy@www.RoSprint.ru
>            X.400: (C:USSR,A:SOVMAIL,O:SNUSSR,UN:A.KOVSHOV)
>            X.400: (C:USA,A:TELEMAIL,O:SPRINTINTL,UN:A.KOVSHOV)
>
>
----------------------------------------------------------------------------
Emerging Technologies, Inc.      http://www.etinc.com

Synchronous PC Cards and Routers For Discriminating
Tastes. 56k to T1 and beyond. Frame Relay, PPP, HDLC, 
and X.25 for BSD/OS, FreeBSD and LINUX.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609151550.LAA08784>