From: Denis V. Lunev Date: Mon, 3 Mar 2008 19:50:10 +0000 (-0800) Subject: [IPV4]: skb->dst can't be NULL in ip_options_echo. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=da7ef338a2982a3a0c7e2b1cdfd55ba35b34471e;p=deliverable%2Flinux.git [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 Signed-off-by: David S. Miller --- 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];