From: "Mitsuru KANDA / 神田 充" <mk@linux-ipv6.org>
To: jmorris@intercode.com.au, davem@redhat.com, kuznet@ms2.inr.ac.ru
Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org
Subject: [PATCH] IPv4 IPComp
Date: Thu, 08 May 2003 02:52:05 +0900 [thread overview]
Message-ID: <87znlymypm.wl@karaba.org> (raw)
Hello,
In ipcomp_input():
The original IP header(iph) is stored(copied) in tmp_iph.
But after skb_pull(), tmp_iph is copied back to
same place where the original IP header exists in skb->nh.raw.
I believe the attached diff is to fix it for correct behavior
which you intend.
Could you check it?
Regards,
-mk
===== ipcomp.c 1.4 vs edited =====
--- 1.4/net/ipv4/ipcomp.c Sun May 4 22:26:55 2003
+++ edited/ipcomp.c Thu May 8 02:41:47 2003
@@ -94,7 +94,9 @@
memcpy(&tmp_iph, iph, iph->ihl * 4);
nexthdr = *(u8 *)skb->data;
skb_pull(skb, sizeof(struct ipcomp_hdr));
+ skb->nh.raw += sizeof(struct ipcomp_hdr);
memcpy(skb->nh.raw, &tmp_iph, tmp_iph.iph.ihl * 4);
+ iph = skb->nh.iph;
iph->tot_len = htons(ntohs(iph->tot_len) - sizeof(struct ipcomp_hdr));
iph->protocol = nexthdr;
skb->h.raw = skb->data;
next reply other threads:[~2003-05-07 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-07 17:52 Mitsuru KANDA / 神田 充 [this message]
2003-05-08 0:53 ` [PATCH] IPv4 IPComp James Morris
2003-05-08 15:03 ` David S. Miller
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=87znlymypm.wl@karaba.org \
--to=mk@linux-ipv6.org \
--cc=davem@redhat.com \
--cc=jmorris@intercode.com.au \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=usagi-core@linux-ipv6.org \
/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).