git: 32b85fbcf1f0 - stable/12 - Fix the ipfw service status output when ipfw.ko isn't loaded

Mark Johnston markj at FreeBSD.org
Sat Dec 26 21:35:09 UTC 2020


The branch stable/12 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=32b85fbcf1f02041dbf827eda570447a3ac42597

commit 32b85fbcf1f02041dbf827eda570447a3ac42597
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2020-12-18 16:02:28 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2020-12-26 21:29:32 +0000

    Fix the ipfw service status output when ipfw.ko isn't loaded
    
    (cherry picked from commit 5120612664fbc54d69ee1a21d0abcbab58712709)
---
 libexec/rc/rc.d/ipfw | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw
index df14b7eaa0d4..ced473a5aac4 100755
--- a/libexec/rc/rc.d/ipfw
+++ b/libexec/rc/rc.d/ipfw
@@ -129,7 +129,9 @@ ipfw_status()
 	status=$(sysctl -i -n net.inet.ip.fw.enable)
 	: ${status:=0}
 	if afexists inet6; then
-		status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable)))
+		status6=$(sysctl -i -n net.inet6.ip6.fw.enable)
+		: ${status6:=0}
+		status=$((${status} + ${status6}))
 	fi
 	if [ ${status} -eq 0 ]; then
 		echo "ipfw is not enabled"


More information about the dev-commits-src-all mailing list