Skip to content

xfrm: policy: replace session decode with flow dissector

Florian Westphal netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 5 repliesIn review
  2. v23 patches 1 replySuperseded
  3. v12 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- first patch broke CONFIG_XFRM=n builds

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfrm: pass struct net to xfrm_decode_session wrappersinclude/net/xfrm.h net/ipv4/icmp.c net/ipv4/ip_vti.c +7 more+22 -221 reply
2/3xfrm: move mark and oif flowi decode into common codenet/xfrm/xfrm_policy.c+12 -120 replies
3/3xfrm: policy: replace session decode with flow dissectornet/xfrm/xfrm_policy.c+95 -1580 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSimon HormanAntony Antony
SeriesT-b Reported-and-tested-by Reported-and-tested-by
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH ipsec-next v3 0/3] xfrm: policy: replace session decode with flow dissector

Remove the ipv4+ipv6 session decode functions and use generic flow dissector to populate the flowi for the policy lookup.

Changes since v2:
- first patch broke CONFIG_XFRM=n builds

Changes since v1:
- Can't use skb_flow_dissect(), we might see skbs that have neither skb->sk nor skb->dev set. Flow dissector WARN()s in this case, it tries to check for a bpf program assigned in that net namespace.

Add a preparation patch to pass down 'struct net' in xfrm_decode_session so its available for use in patch 3.

Changes since RFC:

- Drop mobility header support. I don't think that anyone uses this. MOBIKE doesn't appear to need this either.
- Drop fl6->flowlabel assignment, original code leaves it as 0.

There is no reason for this change other than to remove code.

Florian Westphal (3):
xfrm: pass struct net to xfrm_decode_session wrappers
xfrm: move mark and oif flowi decode into common code
xfrm: policy: replace session decode with flow dissector

 include/net/xfrm.h             |  12 +-
 net/ipv4/icmp.c                |   2 +-
 net/ipv4/ip_vti.c              |   4 +-
 net/ipv4/netfilter.c           |   2 +-
 net/ipv6/icmp.c                |   2 +-
 net/ipv6/ip6_vti.c             |   4 +-
 net/ipv6/netfilter.c           |   2 +-
 net/netfilter/nf_nat_proto.c   |   2 +-
 net/xfrm/xfrm_interface_core.c |   4 +-
 net/xfrm/xfrm_policy.c         | 287 +++++++++++++--------------------
 10 files changed, 129 insertions(+), 192 deletions(-)
Signature · 1 line
2.41.0