From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: davem@redhat.com
Cc: netdev@oss.sgi.com
Subject: dev_add_pack and hardware checksumming
Date: Mon, 18 Aug 2003 05:37:11 +0200 [thread overview]
Message-ID: <20030818033711.GA21360@vana.vc.cvut.cz> (raw)
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
next reply other threads:[~2003-08-18 3:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-18 3:37 Petr Vandrovec [this message]
2003-08-18 5:38 ` dev_add_pack and hardware checksumming David S. Miller
2003-08-18 18:27 ` Petr Vandrovec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030818033711.GA21360@vana.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).