Author: hrs
Date: Sat Oct 27 19:49:15 2012
New Revision: 242187
URL: http://svn.freebsd.org/changeset/base/242187

Log:
  MFC r242181:
  
  Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could
  prevent rtadvd(8) from working as intended.
  
  Spotted by:   brian
  Discussed with:       brian

Modified:
  stable/9/etc/network.subr
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/network.subr
==============================================================================
--- stable/9/etc/network.subr   Sat Oct 27 19:40:25 2012        (r242186)
+++ stable/9/etc/network.subr   Sat Oct 27 19:49:15 2012        (r242187)
@@ -109,7 +109,9 @@ ifconfig_up()
                # backward compatibility: $ipv6_enable
                case $ipv6_enable in
                [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-                       _ipv6_opts="${_ipv6_opts} accept_rtadv"
+                       if ! checkyesno ipv6_gateway_enable; then
+                               _ipv6_opts="${_ipv6_opts} accept_rtadv"
+                       fi
                        ;;
                esac
 
@@ -488,7 +490,11 @@ ipv6_autoconfif()
        # backward compatibility: $ipv6_enable
        case $ipv6_enable in
        [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-               return 0
+               if checkyesno ipv6_gateway_enable; then
+                       return 1
+               else
+                       return 0
+               fi
        ;;
        esac
 
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to