Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Dec 2020 21:35:09 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 32b85fbcf1f0 - stable/12 - Fix the ipfw service status output when ipfw.ko isn't loaded
Message-ID:  <202012262135.0BQLZ9H6049428@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by markj:

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

commit 32b85fbcf1f02041dbf827eda570447a3ac42597
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2020-12-18 16:02:28 +0000
Commit:     Mark Johnston <markj@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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012262135.0BQLZ9H6049428>