Re: wrong checksum when receiving ip rr option through raw socket

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

 



On Sun, Dec 08, 2002 at 04:16:24AM -0800, RuiJH wrote:

> hi,
>   I did one test in my localhost with ping -R. And you 
> are right.
>   But maybe some points are ignored.
>   when a packet arrives,it will enter iplayer next 
> ip_options be processed and srr pointer will be backward 
> "4 bytes". After all these have be done, packet will be 
> submited to upper layer,like tcp,udp.Any socket created by 
> SOCK_RAW will get "updated" packet.So if now you want to 
> recheck the whole packet,the checksum should undoubtfully 
> be wrong and not be equal to the old one.

At a first glance, this behavior seems wrong to me.  It would
undoubtfully be more consistent if the kernel either left the packet
alone or, if it really wants to update the RR option, it did the job
right and recomputed the checksum, too.  Of course, there might be some
deeper reasons for this behavior that I cannot see.

>   In a word , ip srr options has been processed before 
> you capture packet.I suggest you can try "SOCK_PACKET". 
> Maybe it will can work suitable.

Well, I would rather avoid SOCK_PACKET as it is marked "Obsolete  and
should  not be used in new programs" in the docs.

	pvl

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux