firewall.nix: Don't make missing rpfilter support a fatal error
This makes upgrading from Linux 3.2 to 3.4 a bit nicer.
This commit is contained in:
parent
71365b7478
commit
94bb48be78
@ -298,7 +298,9 @@ in
|
|||||||
# Perform a reverse-path test to refuse spoofers
|
# Perform a reverse-path test to refuse spoofers
|
||||||
# For now, we just drop, as the raw table doesn't have a log-refuse yet
|
# For now, we just drop, as the raw table doesn't have a log-refuse yet
|
||||||
${optionalString (kernelHasRPFilter && cfg.checkReversePath) ''
|
${optionalString (kernelHasRPFilter && cfg.checkReversePath) ''
|
||||||
ip46tables -A PREROUTING -t raw -m rpfilter --invert -j DROP
|
if ! ip46tables -A PREROUTING -t raw -m rpfilter --invert -j DROP; then
|
||||||
|
echo "<2>failed to initialise rpfilter support" >&2
|
||||||
|
fi
|
||||||
''}
|
''}
|
||||||
|
|
||||||
# Accept all traffic on the trusted interfaces.
|
# Accept all traffic on the trusted interfaces.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user