lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] IP checksum on outbound pkts


From: art r
Subject: [lwip-devel] IP checksum on outbound pkts
Date: Tue, 22 Apr 2008 19:13:09 -0500

Looking through ipv4/ip.c, I noticed that incoming packets’ checksums are checked using

227:   if (inet_chksum(iphdr, iphdr_hlen) != 0) …

 

but outbound checksums are computed

515:      IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));

 

(Line numbers are for 1.3.0 rc1 that I grabbed a while back…)

 

The question is: why does the outbound using the constant IP_HNEN but the inbound is using the actual header length (iphdr_hlen). The spec (AFAIK) says that the IP options are supposed to be included in the checksum. The outbound appears to me to erroneously exclude options.

 

Is this a problem, or am I misunderstanding what’s happening?

 

Thanks,

Art R.

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]