aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-03 14:50:10 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-03 14:50:10 -0500
commitda7ef338a2982a3a0c7e2b1cdfd55ba35b34471e (patch)
tree31ac7ee4977480c39b79cf9a552df7d024bdf2ed
parent1d1c8d13c4f7690d382bca5de2f9dc88f22a4aab (diff)
[IPV4]: skb->dst can't be NULL in ip_options_echo.
ip_options_echo is called on the packet input path after the initial routing. The dst entry on the packet is cleared only in the several very specific places and immidiately assigned back (may be new). Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/ip_options.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index 4d315158fd3c..baaedd9689a0 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -107,10 +107,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb)
107 sptr = skb_network_header(skb); 107 sptr = skb_network_header(skb);
108 dptr = dopt->__data; 108 dptr = dopt->__data;
109 109
110 if (skb->dst) 110 daddr = ((struct rtable*)skb->dst)->rt_spec_dst;
111 daddr = ((struct rtable*)skb->dst)->rt_spec_dst;
112 else
113 daddr = ip_hdr(skb)->daddr;
114 111
115 if (sopt->rr) { 112 if (sopt->rr) {
116 optlen = sptr[sopt->rr+1]; 113 optlen = sptr[sopt->rr+1];