Skip to content

IP: cleanup LSRR option processing

Paolo Abeni netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4IP: do not modify ingress packet IP option in ip_options_echo()net/ipv4/ip_options.c+0 -30 replies
2/4ip/options: explicitly provide net ns to __ip_options_echo()include/net/ip.h include/net/tcp.h net/ipv4/icmp.c +5 more+20 -174 replies
3/4Revert "ipv4: keep skb->dst around in presence of IP options"net/ipv4/ip_sockglue.c+1 -80 replies
4/4udp: no need to preserve skb->dstnet/ipv4/udp.c+5 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/4] IP: cleanup LSRR option processing

The __ip_options_echo() function expect a valid dst entry in skb->dst; as result we sometimes need to preserve the dst entry for the whole IP RX path.

The current usage of skb->dst looks more a relic from ancient past that a real functional constraint. This patchset tries to remove such usage, and than drops some hacks currently in place in the IP code to keep skb->dst around.

__ip_options_echo() uses of skb->dst for two different purposes: retrieving the netns assicated with the skb, and modify the ingress packet LSRR address list.

The first patch removes the code modifying the ingress packet, and the second one provides an explicit netns argument to __ip_options_echo(). The following patches cleanup the current code keeping arund skb->dst for __ip_options_echo's sake.

Updating the __ip_options_echo() function has been previously discussed here:

http://marc.info/?l=linux-netdev&m=150064533516348&w=2

Paolo Abeni (4):
IP: do not modify ingress packet IP option in ip_options_echo() ip/options: explicitly provide net ns to __ip_options_echo() Revert "ipv4: keep skb->dst around in presence of IP options"
udp: no need to preserve skb->dst

 include/net/ip.h       |  9 +++++----
 include/net/tcp.h      |  5 +++--
 net/ipv4/icmp.c        |  4 ++--
 net/ipv4/ip_options.c  |  9 +++------
 net/ipv4/ip_output.c   |  2 +-
 net/ipv4/ip_sockglue.c | 16 +++++-----------
 net/ipv4/syncookies.c  |  2 +-
 net/ipv4/tcp_ipv4.c    |  2 +-
 net/ipv4/udp.c         | 13 +++++--------
 9 files changed, 26 insertions(+), 36 deletions(-)
Signature · 1 line
2.13.3