NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: need to disable IPv6



    Date:        Wed, 27 Jun 2012 15:07:11 +0700
    From:        Robert Elz <kre%munnari.OZ.AU@localhost>
    Message-ID:  <21068.1340784431%epsilon.noi.kre.to@localhost>

A few minutes ago, I said ...

  | To actually remove all IPv6 completely, right now, I believe you'll
  | need to modify the line in /etc/rc.d/network that is ...
  | 
  |     if /sbin/ifconfig lo0 inet6 >/dev/null 2>&1; then

There are actually 2 instances of that in /etc/rc.d/network, and they'd
both need to be changed.   I append a patch below, that should allow
you to set
        ip6mode=off
(an another option to host, autohost or router) in rc.conf, to have
ipv6 disabled.

You also need to take care that you have not set an IPv6 default route
(either "defaultroute6" in rc.conf or in /etc/mygate6)

Sorry, right now I can't test this properly, but it looks as if it
should function the way I expect.

I'm slightly hesitant about suggesting that this should be applied to
netbsd's source tree (and aside from laziness on my part, this also
kind of explains why I've never sent in the "disable a protocol" patch)
because in general I believe that people would be much better served,
long term, by spending the time to actually make IPv6 work properly,
rather than constantly looking for ways to avoid it.

kre

You'll need to apply this patch by hand (patch /etc/rc.d/network < file)
vecause the path names it it aren't what patch will probably like...

--- /etc/rc.d/network   2010-09-27 01:52:04.000000000 +0700
+++ /tmp/network        2012-06-27 15:18:45.000000000 +0700
@@ -73,7 +73,7 @@
 
        # IPv6 routing setups, and host/router mode selection.
        #
-       if /sbin/ifconfig lo0 inet6 >/dev/null 2>&1; then
+       if [ $ip6mode != off ] && /sbin/ifconfig lo0 inet6 >/dev/null 2>&1; then
                # We have IPv6 support in kernel.
 
                # disallow link-local unicast dest without outgoing scope
@@ -376,7 +376,7 @@
 
        # IPv6 interface autoconfiguration.
        #
-       if /sbin/ifconfig lo0 inet6 >/dev/null 2>&1; then
+       if [ $ip6mode != off ] && /sbin/ifconfig lo0 inet6 >/dev/null 2>&1; then
                # wait till DAD is completed. always invoke it in case
                # if are configured manually by ifconfig
                #


Home | Main Index | Thread Index | Old Index