summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-17 17:44:47 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-17 17:44:47 -0700
commite14d95f773b7365b6ba2d2105522c92b007c6db1 (patch)
treef5055be71c66c8a6ec1779b9e6d7ac75d474b9ca
parentde542925fbf179fb4b39bab2c3235b4525f96794 (diff)
parentd2c962b8530b84f4e035df8ade7e35f353a57cbe (diff)
downloadlwn-e14d95f773b7365b6ba2d2105522c92b007c6db1.tar.gz
lwn-e14d95f773b7365b6ba2d2105522c92b007c6db1.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV4]: ip_route_input panic fix
-rw-r--r--net/ipv4/route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index ff434821909f..cc9423de7311 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2741,7 +2741,10 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
/* 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])