This is based on an orphaned patch provided by Tim FitzGeorge and
_finally_ fixes incorrect network membership calculations. Those were
are usability pain in the ass deluxe, as they rendered some combinations
of configuring OpenVPN and IPsec services unusable.
Fixes: #11235
Fixes: #12263
Cc: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Cc: Michael Tremer <michael.tremer@ipfire.org>
Cc: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
return undef;
}
- if ($bin1[0] eq $bin2[0] && $bin1[1] eq $bin2[1]) {
+ if ($bin1[0] == $bin2[0] && $bin1[1] == $bin2[1]) {
return 1;
}
# Find end address
my $broadcast_bin = $network_bin ^ (~$netmask_bin % 2 ** 32);
- return (($address_bin ge $network_bin) && ($address_bin le $broadcast_bin));
+ return (($address_bin >= $network_bin) && ($address_bin <= $broadcast_bin));
}
sub setup_upstream_proxy() {