*BSD News Article 30312


Return to BSD News archive

Xref: sserve comp.os.386bsd.bugs:2213 comp.protocols.ppp:4065
Newsgroups: comp.os.386bsd.bugs,comp.protocols.ppp
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!cass.ma02.bull.com!as02.bull.oz.au!melb.bull.oz.au!zen!sjg
From: sjg@zen.void.oz.au (Simon J. Gerraty)
Subject: Re: priority queuing bug in *BSD ppp (if_ppp.c)
Keywords: ppp BSD
Message-ID: <1994May13.083740.13535@zen.void.oz.au>
Organization: Zen programming...
Date: Fri, 13 May 1994 08:37:40 GMT
References: <1994May7.004353.695@fasterix.frmug.fr.net> <1994May10.130723.28188@zen.void.oz.au> <2qqjq0$iim@newhub.xylogics.com>
Lines: 28

carlson@Xylogics.COM (James Carlson) writes:
>In article <1994May10.130723.28188@zen.void.oz.au>, sjg@zen.void.oz.au (Simon J. Gerraty) writes:
>|> pb@fasterix.frmug.fr.net (Pierre Beyssac) writes:
>|> > Mail copy to the FreeBSD/NetBSD mailing-lists and Paul Mackerras
>|> >(paulus@cs.anu.edu.au) 
>|> >	    if (INTERACTIVE(ntohs(p & 0xffff)) || INTERACTIVE(ntohs(p >> 16)))
>|> 
>|> I suspect that
>|> 
>|> 	if (INTERACTIVE(ntohs(p) & 0xffff) || INTERACTIVE(ntohs(p) >> 16))
>|> 
>|> is more likely to resolve the ntohs() problem without changing the
>|> meaning of the code.  ntohs(p >> 16) and ntohs(p) >> 16 can
>|> produce _very_ different results.

>I'm sure it does.  "ntohs(p)>>16" is meaningless -- it should return a
>constant zero by definition.

You are quite right!  I foolishly looked at the ntohs(p >> 16) and
said ``ooh, an assumption about host order'' but of course its net
order which is constant, and therefor he _can_ know what the upper part
contains. 

I have no idea what ntohs(p >> 16) is trying to achieve btw :-)
-- 
Simon J. Gerraty        <sjg@zen.void.oz.au>

#include <disclaimer>   /* imagine something _very_ witty here */