summaryrefslogtreecommitdiff
path: root/net/ipv4/ip_options.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-03 11:50:10 -0800
committerDavid S. Miller <davem@davemloft.net>2008-03-03 11:50:10 -0800
commitda7ef338a2982a3a0c7e2b1cdfd55ba35b34471e (patch)
tree31ac7ee4977480c39b79cf9a552df7d024bdf2ed /net/ipv4/ip_options.c
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>
Diffstat (limited to 'net/ipv4/ip_options.c')
-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)
sptr = skb_network_header(skb);
dptr = dopt->__data;
- if (skb->dst)
- daddr = ((struct rtable*)skb->dst)->rt_spec_dst;
- else
- daddr = ip_hdr(skb)->daddr;
+ daddr = ((struct rtable*)skb->dst)->rt_spec_dst;
if (sopt->rr) {
optlen = sptr[sopt->rr+1];