From owner-freebsd-hackers Sun Sep 15 08:44:25 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA23909 for hackers-outgoing; Sun, 15 Sep 1996 08:44:25 -0700 (PDT) Received: from etinc.com (et-gw-fr1.etinc.com [204.141.244.98]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA23904 for ; Sun, 15 Sep 1996 08:44:22 -0700 (PDT) Received: from dialup-usr14.etinc.com (dialup-usr14.etinc.com [204.141.95.130]) by etinc.com (8.6.12/8.6.9) with SMTP id LAA08784; Sun, 15 Sep 1996 11:50:48 -0400 Date: Sun, 15 Sep 1996 11:50:48 -0400 Message-Id: <199609151550.LAA08784@etinc.com> X-Sender: dennis@etinc.com X-Mailer: Windows Eudora Version 2.0.3 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Sandy Kovshov From: dennis@etinc.com (dennis) Subject: Re: sppp with cisco hdlc bug fix Cc: hackers@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.