diff options
author | Phil Sutter <phil@nwl.cc> | 2023-11-28 20:21:49 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-11-29 02:33:06 +0100 |
commit | 41139aee5e53304182a25f1e573f034b313f7232 (patch) | |
tree | f102fe9cb362e3a6ba3c9a5adf48af3e8cc2b5a7 /include/linux/netfilter/x_tables.h | |
parent | 584569727dc0fc52f401db628059807030138a99 (diff) |
In order to parse the mask, xtopt_parse_hostmask() calls
xtopt_parse_plenmask() thereby limiting netmask support to prefix
lengths (alternatively specified in IP address notation).
In order to lift this impractical restriction, make
xtopt_parse_plenmask() aware of the fact that xtopt_parse_plen() may
fall back to xtopt_parse_mask() which correctly initializes val.hmask
itself and indicates non-CIDR-compatible masks by setting val.hlen to
-1.
So in order to support these odd masks, it is sufficient for
xtopt_parse_plenmask() to skip its mask building from val.hlen value and
take whatever val.hmask contains.
Fixes: 66266abd17adc ("libxtables: XTTYPE_HOSTMASK support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include/linux/netfilter/x_tables.h')
0 files changed, 0 insertions, 0 deletions