diff options
author | Patrick McHardy <kaber@trash.net> | 2008-02-07 20:58:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-07 20:58:20 -0500 |
commit | 4136cd523eb0c0bd53173e16fd7406d31d05824f (patch) | |
tree | 8a6b73d066e88eff6736e32863fdad4501717d6c /net | |
parent | 5da621f1c514b8a39c6f7112becb97262ae76900 (diff) |
[IPV4]: route: fix crash ip_route_input
ip_route_me_harder() may call ip_route_input() with skbs that don't
have skb->dev set for skbs rerouted in LOCAL_OUT and TCP resets
generated by the REJECT target, resulting in a crash when dereferencing
skb->dev->nd_net. Since ip_route_input() has an input device argument,
it seems correct to use that one anyway.
Bug introduced in b5921910a1 (Routing cache virtualization).
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 8842ecb9be48..525787b52b72 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2041,7 +2041,7 @@ int ip_route_input(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
2041 | int iif = dev->ifindex; | 2041 | int iif = dev->ifindex; |
2042 | struct net *net; | 2042 | struct net *net; |
2043 | 2043 | ||
2044 | net = skb->dev->nd_net; | 2044 | net = dev->nd_net; |
2045 | tos &= IPTOS_RT_MASK; | 2045 | tos &= IPTOS_RT_MASK; |
2046 | hash = rt_hash(daddr, saddr, iif); | 2046 | hash = rt_hash(daddr, saddr, iif); |
2047 | 2047 | ||