Skip to content

Fix SECMARK target comparison

Phil Sutter netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xshared: Share make_delete_mask() between ip{,6}tablesiptables/ip6tables.c iptables/iptables.c iptables/xshared.c +1 more+42 -720 replies
2/3libxtables: Introduce 'matchmask' target callbackconfigure.ac include/xtables.h iptables/nft-shared.c +1 more+26 -60 replies
3/3libxt_SECMARK: Fix for failing target comparisonextensions/libxt_SECMARK.c extensions/libxt_SECMARK.t+14 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [iptables PATCH 0/3] Fix SECMARK target comparison

The kernel sets struct secmark_target_info->secid, so target comparison in user space failed every time. Given that target data comparison happens in libiptc, fixing this is a bit harder than just adding a cmp() callback to struct xtables_target. Instead, allow for targets to write the matchmask bits for their private data themselves and account for that in both legacy and nft code. Then make use of the new infrastructure to fix libxt_SECMARK.

Phil Sutter (3):
xshared: Share make_delete_mask() between ip{,6}tables
libxtables: Introduce 'matchmask' target callback
libxt_SECMARK: Fix for failing target comparison

 configure.ac               |  4 ++--
 extensions/libxt_SECMARK.c | 10 ++++++++++
 extensions/libxt_SECMARK.t |  4 ++++
 include/xtables.h          |  3 +++
 iptables/ip6tables.c       | 38 ++------------------------------------
 iptables/iptables.c        | 38 ++------------------------------------
 iptables/nft-shared.c      | 15 ++++++++++++++-
 iptables/xshared.c         | 38 ++++++++++++++++++++++++++++++++++++++
 iptables/xshared.h         |  4 ++++
 9 files changed, 79 insertions(+), 75 deletions(-)
 create mode 100644 extensions/libxt_SECMARK.t
Signature · 1 line
2.25.1