netfilter: simplify nf_defrag_ipv6
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | netfilter: ipv6: nf_defrag: avoid/free clone operationsinclude/ net/ net/ +1 more | +40 | 0 replies | |
| 2/2 | netfilter: ipv6: avoid nf_iterate recursioninclude/ net/ net/ +1 more | +42 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/2] netfilter: simplify nf_defrag_ipv6
commit 6aafeef03b9d9ecf
("netfilter: push reasm skb through instead of original frag skbs") changed ipv6 defrag to not use the original skbs anymore.
However, we still clone fragment skbs and retain original ones just to free them soon after. Since reassembled skb is newly allocated, we also need to recursively re-invoke the netfilter hooks so they can work on the reassembled skb.
This removes those clone/free operations and also avoids the hook reinvocation by morphing the reassembled skb into the last skb (i.e. the skb that completes the frag queue), just like ipv4 defrag.
include/net/netfilter/ipv6/nf_defrag_ipv6.h | 3 net/ipv6/netfilter/nf_conntrack_reasm.c | 168 +++++++++++----------------- net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 20 --- net/openvswitch/conntrack.c | 25 ---- 4 files changed, 78 insertions(+), 138 deletions(-)