diff options
author | Phil Sutter <phil@nwl.cc> | 2024-01-24 23:29:46 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-02-02 18:26:14 +0100 |
commit | 30a7f11234a81bd2389c7e7224769b1fdd192239 (patch) | |
tree | 7b4a1674937105e49e531f06e49b7309596759a9 /extensions/libxt_connbytes.c | |
parent | 285406b1d22e3ed0aec30ea0a534ea76211156a9 (diff) |
libxtables: xtoptions: Assert ranges are monotonic increasing
Extensions commonly require the upper range value to be larger or equal
to the lower one. Performing this check in the parser is easier and
covers all extensions at once.
One notable exception is NFQUEUE which requires strict monotonicity.
Hence leave its checks in place.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libxt_connbytes.c')
-rw-r--r-- | extensions/libxt_connbytes.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/extensions/libxt_connbytes.c b/extensions/libxt_connbytes.c index b57f0fc0..2f110857 100644 --- a/extensions/libxt_connbytes.c +++ b/extensions/libxt_connbytes.c @@ -41,10 +41,6 @@ static void connbytes_parse(struct xt_option_call *cb) if (cb->nvals == 2) sinfo->count.to = cb->val.u64_range[1]; - if (sinfo->count.to < sinfo->count.from) - xtables_error(PARAMETER_PROBLEM, "%llu should be less than %llu", - (unsigned long long)sinfo->count.from, - (unsigned long long)sinfo->count.to); if (cb->invert) { i = sinfo->count.from; sinfo->count.from = sinfo->count.to; |