[IPV4]: skb->dst can't be NULL in ip_options_echo.
authorDenis V. Lunev <den@openvz.org>
Mon, 3 Mar 2008 19:50:10 +0000 (11:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Mar 2008 19:50:10 +0000 (11:50 -0800)
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>
net/ipv4/ip_options.c

index 4d315158fd3cde41b827dc3424fbedbe114437a4..baaedd9689a0ae159596bf0ae7e938e1678bb619 100644 (file)
@@ -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];