[IPV4]: ip_route_input panic fix

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>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Stephen Hemminger and committed by David S. Miller d2c962b8 c19f7a9e

+4 -1
+4 -1
net/ipv4/route.c
··· 2741 2741 /* Reserve room for dummy headers, this skb can pass 2742 2742 through good chunk of routing engine. 2743 2743 */ 2744 - skb->mac.raw = skb->data; 2744 + skb->mac.raw = skb->nh.raw = skb->data; 2745 + 2746 + /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */ 2747 + skb->nh.iph->protocol = IPPROTO_ICMP; 2745 2748 skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); 2746 2749 2747 2750 if (rta[RTA_SRC - 1])