in_cksum() for ip packets with multiple mbufs

kamal kc kamal_ckk at yahoo.com
Sun Oct 23 01:30:19 PDT 2005


i come across this unusual problem.

i changed the ip_tos field of the struct ip and
computed
the checksum by using in_cksum().

when the packet uses only one mbuf the computed 
checksum is ok but when the packet uses more than one 
mbuf then the computed checksum is wrong.

eg. pinging with payload less than 1470 bytes is ok
but with payload greater than 1480 bytes does not 
work. (the error being bad checksum --that i knew 
by capturing network packets by ethereal)

is it a real problem or i have made some mistake.

i put the code before the if_output() in the 
ip_output() function.

help !!

kamal







	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the freebsd-net mailing list