]> git.ipfire.org Git - thirdparty/iptables.git/commit
Revert "libxtables: Promote xtopt_esize_by_type() as xtopt_psize getter"
authorPhil Sutter <phil@nwl.cc>
Tue, 22 Jul 2025 13:59:51 +0000 (15:59 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 22 Jul 2025 14:48:11 +0000 (16:48 +0200)
commitf66687b6cb5fd0bb36107c30339aa7f4ff75e98e
tree8deda216ba20e891f70f39d5cc3e44aa1161b384
parent786b75f7c9b9feaa294da097c2e9727747162c79
Revert "libxtables: Promote xtopt_esize_by_type() as xtopt_psize getter"

This reverts commit 786b75f7c9b9feaa294da097c2e9727747162c79.

The internal routine xtopt_esize_by_type() is *not* just a fancy wrapper
around direct xtop_psize array access, as clearly indicated by the
comment right above it: It will return the single field size for
range-value types (XTTYPE_UINT*RC).

Using it in xtables_option_metavalidate() leads to spurious "memory
block of wrong size" complaints.

Fixes: 786b75f7c9b9f ("libxtables: Promote xtopt_esize_by_type() as xtopt_psize getter")
Signed-off-by: Phil Sutter <phil@nwl.cc>
libxtables/xtoptions.c