From: Stephen Hemminger <shemminger@osdl.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] ip_route_input panic fix
Date: Mon, 17 Apr 2006 17:12:53 -0700 [thread overview]
Message-ID: <20060417171253.4e988afc@localhost.localdomain> (raw)
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=6388
The bug is caused by ip_route_input dereferencing skb->nh.protocol of
the dummy skb passed dow from inet_rtm_getroute (Thanks Thomas for seeing
it). It only happens if the route requested is for a multicast IP
address.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- linux-2.6.16.6.orig/net/ipv4/route.c
+++ linux-2.6.16.6/net/ipv4/route.c
@@ -2750,7 +2750,10 @@ int inet_rtm_getroute(struct sk_buff *in
/* Reserve room for dummy headers, this skb can pass
through good chunk of routing engine.
*/
- skb->mac.raw = skb->data;
+ skb->mac.raw = skb->nh.raw = skb->data;
+
+ /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */
+ skb->nh.iph->protocol = IPPROTO_ICMP;
skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr));
if (rta[RTA_SRC - 1])
next reply other threads:[~2006-04-18 0:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 0:12 Stephen Hemminger [this message]
2006-04-18 2:28 ` [PATCH] ip_route_input panic fix Herbert Xu
2006-04-18 2:49 ` Stephen Hemminger
2006-04-18 2:54 ` Herbert Xu
2006-04-18 5:45 ` David S. Miller
2006-04-18 6:54 ` Herbert Xu
2006-04-18 21:54 ` David S. Miller
2006-04-18 22:08 ` Herbert Xu
2006-04-18 23:52 ` Alexey Kuznetsov
2006-04-19 0:17 ` Herbert Xu
2006-04-19 3:53 ` David S. Miller
2006-04-19 9:46 ` Alexey Kuznetsov
-- strict thread matches above, loose matches on Subject: below --
2006-04-19 0:59 Alexey Kuznetsov
2006-04-19 1:00 Alexey Kuznetsov
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=20060417171253.4e988afc@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.