Skip to content

Commit 61a1030

Browse files
Paolo Abenidavem330
authored andcommitted
Revert "ipv4: keep skb->dst around in presence of IP options"
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>
1 parent 91ed1e6 commit 61a1030

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

net/ipv4/ip_sockglue.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,14 +1228,7 @@ void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb)
12281228
pktinfo->ipi_ifindex = 0;
12291229
pktinfo->ipi_spec_dst.s_addr = 0;
12301230
}
1231-
/* We need to keep the dst for __ip_options_echo()
1232-
* We could restrict the test to opt.ts_needtime || opt.srr,
1233-
* but the following is good enough as IP options are not often used.
1234-
*/
1235-
if (unlikely(IPCB(skb)->opt.optlen))
1236-
skb_dst_force(skb);
1237-
else
1238-
skb_dst_drop(skb);
1231+
skb_dst_drop(skb);
12391232
}
12401233

12411234
int ip_setsockopt(struct sock *sk, int level,

0 commit comments

Comments
 (0)