Package: ifupdown
Version: 0.6.8
Tags: patch
Followup-For: Bug #413428

I extracted the attached patches from the full Ubuntu patch referenced
by Andreas Henriksson in an earlier report.
The attached patch just adds modprobing of net-pf-10 (alias ipv6) to
basically all "up" methods. This allows users to blacklist ipv6 by
adding
alias net-pf-10 none 
to their modprobe/modutils configuration.
alias net-pf-10 ipv6
(the default TTBOMK) enables ipv6.

This should fix #413428 sufficiently well, especially when the above
note is taken into some place of the documentation.

regards,
Sven

PS: If I find the time, I will also add documentation of this tweak
somewhere.

Suggested Changelog entry:

Modprobe net-pf-10 before configuring interfaces (inspired by Ubuntu
patch from https://patches.ubuntu.com/i/ifupdown and comments by Andreas
Henriksson). Patch by Sven Mueller <s...@debian.org> (Closes #413428)

Suggested note for README or some other suitable doc:

ifup now runs modprobe on net-pf-10 before bringing up an interface.
This enables IPv6. If you don't want IPv6 support, add the following
line to your modprobe/modutils configuration, such as
/etc/modutils/aliases:

alias net-pf-10 none


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'proposed-updates'), (400, 
'experimental'), (90, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]  1.5.22~bpo40+1    Debian configuration management sy
ii  libc6                  2.3.6.ds1-13etch8 GNU C Library: Shared libraries
ii  lsb-base               3.1-23.2etch1     Linux Standard Base 3.1 init scrip
ii  net-tools              1.60-17           The NET-3 networking toolkit

ifupdown recommends no packages.

-- debconf information excluded
diff -ur ifupdown-0.6.8+nmu1.orig/inet.defn ifupdown-0.6.8+nmu1/inet.defn
--- ifupdown-0.6.8+nmu1.orig/inet.defn  2006-09-28 19:10:29.000000000 +0200
+++ ifupdown-0.6.8+nmu1/inet.defn       2009-02-02 17:15:04.000000000 +0100
@@ -6,6 +6,7 @@
     This method may be used to define the IPv4 loopback interface.
 
   up
+    modprobe -q net-pf-10
     ifconfig %iface% 127.0.0.1 up
     route add -net 127.0.0.0       if ( mylinuxver() < mylinux(2,1,100) )
 
@@ -34,6 +35,7 @@
     mtu size                    -- MTU size
 
   up
+    modprobe -q net-pf-10
     [[ ifconfig %iface% hw %hwaddress%]]
     ifconfig %iface% %address% netmask %netmask% [[broadcast %broadcast%]] \
        [[pointopoint %pointopoint%]] [[media %media%]] [[mtu %mtu%]] \
@@ -52,6 +54,7 @@
     means of *up* and *down* commands or /etc/network/if-*.d scripts.
 
   up
+    modprobe -q net-pf-10
 
   down
 method dhcp
@@ -74,6 +77,7 @@
                                 /address/ is dependent on this choice.
 
   up
+    modprobe -q net-pf-10
     [[ifconfig %iface% hw %hwaddress%]]
     dhclient3 -pf /var/run/dhclient.%iface%.pid -lf 
/var/lib/dhcp3/dhclient.%iface%.leases %iface% \
         if (execable("/sbin/dhclient3"))
@@ -113,6 +117,7 @@
                       whatever it really is.
 
   up
+    modprobe -q net-pf-10
     bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
            [[--hwaddr %hwaddr%]] --returniffail --serverbcast
 
@@ -125,6 +130,7 @@
   options
     provider name  -- Use /name/ as the provider (from /etc/ppp/peers).
   up
+    modprobe -q net-pf-10
     pon [[%provider%]]
   down
     poff [[%provider%]]
@@ -135,6 +141,7 @@
   options
     provider name  -- Use /name/ as the provider (from /etc/ppp/peers).
   up
+    modprobe -q net-pf-10
     /sbin/start-stop-daemon --start -x /usr/bin/wvdial \
                       -p /var/run/wvdial.%iface% -b -m -- [[ %provider% ]]
   down
diff -ur ifupdown-0.6.8+nmu1.orig/inet6.defn ifupdown-0.6.8+nmu1/inet6.defn
--- ifupdown-0.6.8+nmu1.orig/inet6.defn 2006-09-28 19:10:29.000000000 +0200
+++ ifupdown-0.6.8+nmu1/inet6.defn      2009-02-02 17:15:18.000000000 +0100
@@ -5,6 +5,7 @@
   description
     This method may be used to define the IPv6 loopback interface.
   up
+    modprobe -q net-pf-10
     ifconfig %iface% add ::1
   down
     ifconfig %iface% del ::1
@@ -24,6 +25,7 @@
                                  /address/ is dependent on this choice.
     mtu size               -- MTU size
   up
+    modprobe -q net-pf-10
     ifconfig %iface% [[media %media%]] [[hw %hwaddress%]] [[mtu %mtu%]] up
     ifconfig %iface% add %address%/%netmask%
     [[ route -A inet6 add ::/0 gw %gateway% %iface% ]] 
@@ -38,6 +40,7 @@
     means of *up* and *down* commands or /etc/network/if-*.d scripts.
 
   up
+    modprobe -q net-pf-10
 
   down
 
@@ -57,6 +60,7 @@
     ttl time              -- TTL setting
 
   up
+    modprobe -q net-pf-10
     ip tunnel add %iface% mode sit remote %endpoint% [[local %local%]] \
        [[ttl %ttl%]]
     ip link set %iface% up
diff -ur ifupdown-0.6.8+nmu1.orig/ipx.defn ifupdown-0.6.8+nmu1/ipx.defn
--- ifupdown-0.6.8+nmu1.orig/ipx.defn   2006-09-28 19:10:29.000000000 +0200
+++ ifupdown-0.6.8+nmu1/ipx.defn        2009-02-02 17:15:25.000000000 +0100
@@ -11,6 +11,7 @@
     netnum id              -- Network number
 
   up
+    modprobe -q net-pf-10
     ipx_interface add %iface% %frame% %netnum%
 
   down
@@ -24,6 +25,7 @@
     frame type             -- /type/ of ethernet frames to use (e.g. *802.2*)
 
   up
+    modprobe -q net-pf-10
     ipx_interface add %iface% %frame%
 
   down
diff -ur ifupdown-0.7~alpha3.orig/inet.defn ifupdown-0.7~alpha3/inet.defn
--- ifupdown-0.7~alpha3.orig/inet.defn  2007-12-21 15:29:50.000000000 +0100
+++ ifupdown-0.7~alpha3/inet.defn       2009-02-02 17:16:12.000000000 +0100
@@ -6,6 +6,7 @@
     This method may be used to define the IPv4 loopback interface.
 
   up
+    modprobe -q net-pf-10
     ip link set dev %iface% up
 
   down
@@ -30,6 +31,7 @@
     hwaddress cleanup_hwaddress_for_iproute
 
   up
+    modprobe -q net-pf-10
     ip addr add %address%[[/%netmask%]] [[broadcast %broadcast%]] \
        [[peer %pointtopoint%]] dev %iface%
     ip link set dev %iface% [[mtu %mtu%]] [[address %hwaddress%]] up
@@ -47,6 +49,7 @@
     means of *up* and *down* commands or /etc/network/if-*.d scripts.
 
   up
+    modprobe -q net-pf-10
 
   down
 method dhcp
@@ -70,6 +73,7 @@
     hwaddress cleanup_hwaddress_for_iproute
 
   up
+    modprobe -q net-pf-10
     [[ip link set dev %iface% address %hwaddress%]]
     dhclient3 -pf /var/run/dhclient.%iface%.pid -lf 
/var/lib/dhcp3/dhclient.%iface%.leases %iface% \
         if (execable("/sbin/dhclient3"))
@@ -109,6 +113,7 @@
                       whatever it really is.
 
   up
+    modprobe -q net-pf-10
     bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
            [[--hwaddr %hwaddr%]] --returniffail --serverbcast
 
@@ -121,6 +126,7 @@
   options
     provider name  -- Use /name/ as the provider (from /etc/ppp/peers).
   up
+    modprobe -q net-pf-10
     pon [[%provider%]]
   down
     poff [[%provider%]]
@@ -131,6 +137,7 @@
   options
     provider name  -- Use /name/ as the provider (from /etc/ppp/peers).
   up
+    modprobe -q net-pf-10
     /sbin/start-stop-daemon --start -x /usr/bin/wvdial \
                       -p /var/run/wvdial.%iface% -b -m -- [[ %provider% ]]
   down
diff -ur ifupdown-0.7~alpha3.orig/inet6.defn ifupdown-0.7~alpha3/inet6.defn
--- ifupdown-0.7~alpha3.orig/inet6.defn 2007-12-21 15:29:51.000000000 +0100
+++ ifupdown-0.7~alpha3/inet6.defn      2009-02-02 17:16:18.000000000 +0100
@@ -5,6 +5,7 @@
   description
     This method may be used to define the IPv6 loopback interface.
   up
+    modprobe -q net-pf-10
     ip link set dev %iface% up
     ip addr add dev %iface% ::1
   down
@@ -28,6 +29,7 @@
     hwaddress cleanup_hwaddress_for_iproute
 
   up
+    modprobe -q net-pf-10
     ip link set dev %iface% [[mtu %mtu%]] [[address %hwaddress%]] up
     ip -6 addr add %address%[[/%netmask%]] dev %iface%
     [[ ip -6 route add default via %gateway% dev %iface% ]]
@@ -43,6 +45,7 @@
     means of *up* and *down* commands or /etc/network/if-*.d scripts.
 
   up
+    modprobe -q net-pf-10
 
   down
 
@@ -62,6 +65,7 @@
     ttl time              -- TTL setting
 
   up
+    modprobe -q net-pf-10
     ip tunnel add %iface% mode sit remote %endpoint% [[local %local%]] \
        [[ttl %ttl%]]
     ip link set %iface% up
diff -ur ifupdown-0.7~alpha3.orig/ipx.defn ifupdown-0.7~alpha3/ipx.defn
--- ifupdown-0.7~alpha3.orig/ipx.defn   2007-12-21 15:29:51.000000000 +0100
+++ ifupdown-0.7~alpha3/ipx.defn        2009-02-02 17:16:23.000000000 +0100
@@ -11,6 +11,7 @@
     netnum id              -- Network number
 
   up
+    modprobe -q net-pf-10
     ipx_interface add %iface% %frame% %netnum%
 
   down
@@ -24,6 +25,7 @@
     frame type             -- /type/ of ethernet frames to use (e.g. *802.2*)
 
   up
+    modprobe -q net-pf-10
     ipx_interface add %iface% %frame%
 
   down
Only in ifupdown-0.7~alpha3: main.d

Reply via email to