]> git.ipfire.org Git - location/libloc.git/commit
network: Speed up subnet check
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Nov 2020 18:39:13 +0000 (18:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Nov 2020 18:39:13 +0000 (18:39 +0000)
commitcf8d3c6454843943e3bc81eb85522779d1c11f9b
tree71e44df34f931c962ca9d45afed30ff511f7ab12
parent7fe6a21845edf6692d239f228117bc95620d0419
network: Speed up subnet check

There is no point in checking different address families
with each other and we do not need to compare addresses
when the prefix of the subnet does not fit into the
network to check.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c