netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dev_add_pack and hardware checksumming
@ 2003-08-18  3:37 Petr Vandrovec
  2003-08-18  5:38 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vandrovec @ 2003-08-18  3:37 UTC (permalink / raw)
  To: davem; +Cc: netdev

Hi Dave,
  VMware uses dev_add_pack() for capturing ethernet traffic generated
by the host and forwarding it to the guest. 

  Unfortunately skb at the packet filter input is still in CHECKSUM_HW
state, while skb->csum is relative to the skb->h.raw and 
dev_queue_xmit_nit overwrites skb->h.raw with skb->nh.raw. Due to this
I have to peek at packet body to detect protocol & its header length, 
reinitialize skb->h.raw with this knowledge and then finally do 
skb_checksum_help().

  For me it would be best if dev_queue_xmit_nit could just leave
skb->h.raw alone, usable for skb_checksum_help(), but I assume that it
is not possible due to backward compatibility? Other choice is doing
checksumming in dev_queue_xmit_nit itself, before passing skb down to
the registered packet handlers.

  BTW, it looks to me like that an uninitialized value is leaked in UDP's 
checksum field to the packets tcpdump on the host can capture...

					Thanks,
						Petr Vandrovec
						vandrove@vc.cvut.cz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-18 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-18  3:37 dev_add_pack and hardware checksumming Petr Vandrovec
2003-08-18  5:38 ` David S. Miller
2003-08-18 18:27   ` Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).