]> git.ipfire.org Git - thirdparty/iptables.git/commit
libxtables: Simplify xtables_ipmask_to_cidr() a bit
authorPhil Sutter <phil@nwl.cc>
Tue, 2 Mar 2021 14:07:13 +0000 (15:07 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 9 Mar 2021 08:27:40 +0000 (09:27 +0100)
commit831f57c7fbdc8d79e34b1d7d81ca6f6a8e6bae87
treef85fc91ef9f8a78ad0854c1546ef62ad12ddc844
parent46f9d3a9a61ee80fa94b7fa7b3b36045c92606ae
libxtables: Simplify xtables_ipmask_to_cidr() a bit

Reduce the whole mask matching into a single for-loop. No need for a
shortcut, /32 masks will match in the first iteration.

Signed-off-by: Phil Sutter <phil@nwl.cc>
libxtables/xtables.c