From: Herbert Xu <herbert@gondor.apana.org.au>
To: "David S. Miller" <davem@redhat.com>, netdev@oss.sgi.com
Subject: [NATT] Fix uh->len with IP options
Date: Fri, 9 Jul 2004 21:48:02 +1000 [thread overview]
Message-ID: <20040709114802.GA13344@gondor.apana.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
Hi Dave:
I just noticed that the UDP header length in esp4_output() is incorrect
when IP options are present (in transport mode). This patch fixes exactly
that.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 440 bytes --]
===== net/ipv4/esp4.c 1.50 vs edited =====
--- 1.50/net/ipv4/esp4.c 2004-07-09 20:19:08 +10:00
+++ edited/net/ipv4/esp4.c 2004-07-09 21:45:46 +10:00
@@ -124,7 +124,7 @@
uh = (struct udphdr *)esph;
uh->source = encap->encap_sport;
uh->dest = encap->encap_dport;
- uh->len = htons((*pskb)->len + alen - sizeof(struct iphdr));
+ uh->len = htons((*pskb)->len + alen - iph->ihl*4);
uh->check = 0;
switch (encap->encap_type) {
next reply other threads:[~2004-07-09 11:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-09 11:48 Herbert Xu [this message]
2004-07-10 0:05 ` [NATT] Fix uh->len with IP options David S. Miller
2004-07-10 1:21 ` Herbert Xu
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=20040709114802.GA13344@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--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).