From da7ef338a2982a3a0c7e2b1cdfd55ba35b34471e Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Mon, 3 Mar 2008 11:50:10 -0800 Subject: [PATCH] [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 --- net/ipv4/ip_options.c | 5 +---- 1 file changed, 1 insertion(+), 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]; -- 2.20.1