Author: eugen
Date: Tue Apr  7 16:57:23 2020
New Revision: 359701
URL: https://svnweb.freebsd.org/changeset/base/359701

Log:
  MFC r356943,356944: Correct "service ipfw status" for INET6-only systems.

Modified:
  stable/11/etc/rc.d/ipfw
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.d/ipfw
==============================================================================
--- stable/11/etc/rc.d/ipfw     Tue Apr  7 16:56:34 2020        (r359700)
+++ stable/11/etc/rc.d/ipfw     Tue Apr  7 16:57:23 2020        (r359701)
@@ -127,7 +127,11 @@ ipfw_stop()
 ipfw_status()
 {
     status=$(sysctl -n net.inet.ip.fw.enable)
-    if [ ${status} -eq 0 ]; then
+       : ${status:=0}
+       if afexists inet6; then
+               status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable)))
+       fi
+       if [ ${status} -eq 0 ]; then
        echo "ipfw is not enabled"
        exit 1
     else
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to