Skip to content

Commit

Permalink
Revert "ipv4: keep skb->dst around in presence of IP options"
Browse files Browse the repository at this point in the history
ip_options_echo() does not use anymore the skb->dst and don't
need to keep the dst around for options's sake only.
This reverts commit 34b2cef.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paolo Abeni authored and David S. Miller committed Aug 7, 2017
1 parent 91ed1e6 commit 61a1030
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions net/ipv4/ip_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,14 +1228,7 @@ void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb)
pktinfo->ipi_ifindex = 0;
pktinfo->ipi_spec_dst.s_addr = 0;
}
/* We need to keep the dst for __ip_options_echo()
* We could restrict the test to opt.ts_needtime || opt.srr,
* but the following is good enough as IP options are not often used.
*/
if (unlikely(IPCB(skb)->opt.optlen))
skb_dst_force(skb);
else
skb_dst_drop(skb);
skb_dst_drop(skb);
}

int ip_setsockopt(struct sock *sk, int level,
Expand Down

0 comments on commit 61a1030

Please sign in to comment.