Subject: Re: getting rid of NTOHS() in ip_input()
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-net
Date: 08/12/2002 20:14:08
On Tue, Aug 13, 2002 at 12:06:45PM +0900, enami tsugutomo wrote:

 > Jun-ichiro itojun Hagino <itojun@iijlab.net> writes:
 > 
 > > -			NTOHS(ip->ip_len);
 > > -			ip->ip_len += msiz;
 > > +			ip->ip_len = htons(ntohs(ip->ip_len) + msiz);
 > 
 > You are modifying mbuf anyway, aren't you?

I think in this particular case, it's okay.  The problem is that IP
expects things in host-order, so everything needs to be changed to
pass it in net-order.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>