From owner-freebsd-current Wed Apr 24 00:05:52 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA23455 for current-outgoing; Wed, 24 Apr 1996 00:05:52 -0700 (PDT) Received: from precipice.shockwave.com (precipice.shockwave.com [171.69.108.33]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id AAA23448 for ; Wed, 24 Apr 1996 00:05:49 -0700 (PDT) Received: from localhost.shockwave.com (localhost.shockwave.com [127.0.0.1]) by precipice.shockwave.com (8.7.5/8.7.3) with SMTP id AAA06833; Wed, 24 Apr 1996 00:05:11 -0700 (PDT) Message-Id: <199604240705.AAA06833@precipice.shockwave.com> To: Poul-Henning Kamp cc: current@FreeBSD.org, Jim Fleming Subject: Re: SLIP: Check IP Version (please test) In-reply-to: Your message of "Wed, 24 Apr 1996 06:35:29 -0000." <10415.830327729@critter.tfs.com> Date: Wed, 24 Apr 1996 00:05:10 -0700 From: Paul Traina Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk An IP v8 packet MUST never be forwarded to the slip driver. From: Poul-Henning Kamp Subject: Re: SLIP: Check IP Version (please test) > This patch seems to be irrelevant in any case. Only IPv4 packets should > be passed to the SLIP driver. SLIP is not a multiprotocol point-to-point > protocol, PPP is. > > IPvX x!=4 is a different protocol. SLIP is not supported in IPv6. Please > don't slow down the code path by adding this change. I agree, the point is that people play with IPv8 and it breaks slip. If SLIP is only for IPv4, it should discard other packets... And hey, how much overhead is this ??? Poul-Henning > > Paul > > From: Poul-Henning Kamp > Subject: SLIP: Check IP Version (please test) > > Somebody running slip with header compression please test this patch. > > Poul-Henning > > > I am starting to develop a substantialliy modified version of the IP pr >>ot oc > >>ol > . > > As specified in the IP protocol the ip_v (IP Version) field of the IP h >>ea de > >>r > > should be set to 4. (see /usr/src/sys/netinet/ip.h) > > > > It is not desirable for new versions of IP to "break" existing code. I >>ha ve > >> n > ot > > provide this but in studying the SLIP code I see that there is never re >>al ly > > a check done to see of the IP header is of version 4. > > Index: if_sl.c > =================================================================== > RCS file: /home/ncvs/src/sys/net/if_sl.c,v > retrieving revision 1.37 > diff -u -r1.37 if_sl.c > --- if_sl.c 1996/04/07 17:39:09 1.37 > +++ if_sl.c 1996/04/23 20:03:53 > @@ -561,7 +561,8 @@ > } while (m1 = m1->m_next); > } > #endif > - if ((ip = mtod(m, struct ip *))->ip_p == IPPROTO_TCP) { > + if ((ip = mtod(m, struct ip *))->ip_v == IPVERSION) && > + (ip = mtod(m, struct ip *))->ip_p == IPPROTO_TCP) { > if (sc->sc_if.if_flags & SC_COMPRESS) > *mtod(m, u_char *) |= sl_compress_tcp(m, ip, > &sc->sc_comp, 1); > -- > Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. > http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. > whois: [PHK] | phk@ref.tfs.com TRW Financial Systems >>, In > >>c. > Future will arrive by its own means, progress not so. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, In >>c. Future will arrive by its own means, progress not so.