Subject: Re: getting rid of NTOHS() in ip_input()
To: enami tsugutomo <firstname.lastname@example.org>
From: None <email@example.com>
Date: 08/13/2002 14:31:50
>> - 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?
>m_pullup if mbuf is readonly is better, isn't it?
for this particular case (sys/net/if_gre.c) this portion is adjusting
length field of encapsulating IP header, which was allocated by
MGETHDR. therefore it is totally safe.