netfilter: handle ipv6 jumbo packets properly for bridge ovs and tc
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 1 replyIn review
- v16 patches 18 repliesSuperseded
Changes in v2 from the cover letter
- use the proper cast type in Patch 1, as Simon suggested.
- simplify the return path in Patch 2, as Simon suggested.
- move pkt_len definition into a smaller scope in Patch 3, as Simon suggested.
- move err definition into a smaller scope in Patch 5, as Simon suggested.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | netfilter: bridge: call pskb_may_pull in br_nf_check_hbh_lennet/ | +9 | 0 replies | |
| 2/6 | netfilter: bridge: check len before accessing more nh datanet/ | +20 | 0 replies | |
| 3/6 | netfilter: bridge: move pskb_trim_rcsum out of br_nf_check_hbh_lennet/ | +14 | 0 replies | |
| 4/6 | netfilter: move br_nf_check_hbh_len to utilsinclude/ net/ net/ | +55 | 0 replies | |
| 5/6 | netfilter: use nf_ip6_check_hbh_len in nf_ct_skb_network_trimnet/ | +9 | 0 replies | |
| 6/6 | selftests: add a selftest for big tcptools/ tools/ | +181 | 1 reply |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Simon Horman | Nikolay Aleksandrov | Aaron Conole |
|---|---|---|---|
| 1/6 | R-b | A-b | R-b |
| 2/6 | R-b | A-b | R-b |
| 3/6 | R-b | A-b | R-b |
| 4/6 | R-b | R-b | R-b |
| 5/6 | R-b | R-b | R-b |
| 6/6 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCHv2 nf-next 0/6] netfilter: handle ipv6 jumbo packets properly for bridge ovs and tc
Currently pskb_trim_rcsum() is always done on the RX path. However, IPv6 jumbo packets hide the real packet len in the Hop-by-hop option header, which should be parsed before doing the trim.
In ip6_rcv_core() it calls ipv6_parse_hopopts() to handle the Hop-by-hop option header then do pskb_trim_rcsum(). The similar process should also be done properly before pskb_trim_rcsum() on the RX path of bridge and openvswitch and tc.
This patchset improves the function handling the Hop-by-hop option header in bridge, and moves this function into netfilter utils, and then uses it in nf_conntrack_ovs for openvswitch and and tc.
Note that this patch is especially needed after the IPv6 BIG TCP was supported in kernel, which is using IPv6 Jumbo packets, and the last patch adds a big tcp selftest, which also covers it.
v1->v2:
- use the proper cast type in Patch 1, as Simon suggested.
- simplify the return path in Patch 2, as Simon suggested.
- move pkt_len definition into a smaller scope in Patch 3, as Simon suggested.
- move err definition into a smaller scope in Patch 5, as Simon suggested.
Xin Long (6):
netfilter: bridge: call pskb_may_pull in br_nf_check_hbh_len
netfilter: bridge: check len before accessing more nh data
netfilter: bridge: move pskb_trim_rcsum out of br_nf_check_hbh_len
netfilter: move br_nf_check_hbh_len to utils
netfilter: use nf_ip6_check_hbh_len in nf_ct_skb_network_trim
selftests: add a selftest for big tcp
include/linux/netfilter_ipv6.h | 2 + net/bridge/br_netfilter_ipv6.c | 79 ++--------- net/netfilter/nf_conntrack_ovs.c | 11 +- net/netfilter/utils.c | 52 +++++++ tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/big_tcp.sh | 180 +++++++++++++++++++++++++ 6 files changed, 254 insertions(+), 71 deletions(-) create mode 100755 tools/testing/selftests/net/big_tcp.sh
Signature · 1 line
2.39.1