Subject: Re: getting rid of NTOHS() in ip_input()
To: enami tsugutomo <email@example.com>
From: None <firstname.lastname@example.org>
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.