netdev
[Top] [All Lists]

Re: PATCH: Path MTU discovery fix

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: PATCH: Path MTU discovery fix
From: Daiki Ueno <ueno@xxxxxxxxxxxx>
Date: 10 Jun 2001 16:54:27 +0900
Cc: netdev@xxxxxxxxxxx
In-reply-to: <15139.6804.985808.413675@xxxxxxxxxxxxxxx> (David S. Miller's message of "Sat, 9 Jun 2001 23:58:28 -0700 (PDT)")
References: <m2u21o7utq.fsf@xxxxxxxxxxxxxx> <15139.6804.985808.413675@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: T-gnus/6.15.4 (based on Oort Gnus v0.04) (revision 01)
>>>>> In <15139.6804.985808.413675@xxxxxxxxxxxxxxx> 
>>>>>   "David S. Miller" <davem@xxxxxxxxxx> wrote:

> It may revert to the behavior of 2.4.3 but it is a broken
> change.   pskb_may_pull() can change all of the header
> pointers of the skb on you, so it has to reload skb->h.raw
> or whatever to be correct.

> It also must jump to discard if pskb_may_pull() fails, none of
> the other code below that call is valid if it fails.

I understand.  I've applied the attached patch which simply regards the
value of skb->h.raw rather than skb->data and confirmed working.

Thank you for reviewing the patch.
-- 
Daiki Ueno

--- linux/net/ipv6/icmp.c~      Sun Jun 10 16:07:53 2001
+++ linux/net/ipv6/icmp.c       Sun Jun 10 16:08:44 2001
@@ -564,7 +564,7 @@
                 */
                if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
                        goto discard_it;
-               hdr = (struct icmp6hdr *) skb->data;
+               hdr = (struct icmp6hdr *) skb->h.raw;
                orig_hdr = (struct ipv6hdr *) (hdr + 1);
                rt6_pmtu_discovery(&orig_hdr->daddr, &orig_hdr->saddr, dev,
                                   ntohl(hdr->icmp6_mtu));

<Prev in Thread] Current Thread [Next in Thread>