From 7d82194866aa011fad5a0504eaa744ef55acc7e8 Mon Sep 17 00:00:00 2001 From: Eugene Grosbein Date: Tue, 21 Jan 2020 17:02:57 +0000 Subject: [PATCH] Correct "service ipfw status" for INET6-only systems. MFC after: 1 month --- libexec/rc/rc.d/ipfw | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index 64643f0438e..ef8ce796b41 100755 --- a/libexec/rc/rc.d/ipfw +++ b/libexec/rc/rc.d/ipfw @@ -127,6 +127,9 @@ ipfw_stop() ipfw_status() { status=$(sysctl -i -n net.inet.ip.fw.enable) + if afexists inet6; then + status=$(( $status + $(sysctl -i -n net.inet6.ip6.fw.enable) )) + fi if [ ${status:-0} -eq 0 ]; then echo "ipfw is not enabled" exit 1