Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da7ef338 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller
Browse files

[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: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d1c8d13
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -107,10 +107,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb)
	sptr = skb_network_header(skb);
	sptr = skb_network_header(skb);
	dptr = dopt->__data;
	dptr = dopt->__data;


	if (skb->dst)
	daddr = ((struct rtable*)skb->dst)->rt_spec_dst;
	daddr = ((struct rtable*)skb->dst)->rt_spec_dst;
	else
		daddr = ip_hdr(skb)->daddr;


	if (sopt->rr) {
	if (sopt->rr) {
		optlen  = sptr[sopt->rr+1];
		optlen  = sptr[sopt->rr+1];