Skip to content

Commit

Permalink
[IPV4]: skb->dst can't be NULL in ip_options_echo.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Mar 3, 2008
1 parent 1d1c8d1 commit da7ef33
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/ipv4/ip_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit da7ef33

Please sign in to comment.