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

IPv6 configuration



Hi,


I found some problems with IPv6. First is /sbin/ifup, which needs to add family type inet6 to ifconfig, and second is /sbin/route which doesn't set family type properly and knows only about ipv6 addresses.

I have attached a patch for both. Shall I submit bugs for these?



Robin
diff -ur ifupdown-0.6.8+nmu1.orig/ifupdown.nw ifupdown-0.6.8+nmu1/ifupdown.nw
--- ifupdown-0.6.8+nmu1.orig/ifupdown.nw	2006-09-28 19:12:18.000000000 +0200
+++ ifupdown-0.6.8+nmu1/ifupdown.nw	2009-09-02 14:05:10.000000000 +0200
@@ -4082,7 +4082,7 @@
     mtu size               -- MTU size
   up
     ifconfig %iface% [[media %media%]] [[hw %hwaddress%]] [[mtu %mtu%]] up
-    ifconfig %iface% add %address%/%netmask%
+    ifconfig %iface% inet6 add %address%/%netmask%
     [[ route -A inet6 add ::/0 gw %gateway% %iface% ]] 
 
   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-09-02 14:06:43.000000000 +0200
@@ -25,7 +25,7 @@
     mtu size               -- MTU size
   up
     ifconfig %iface% [[media %media%]] [[hw %hwaddress%]] [[mtu %mtu%]] up
-    ifconfig %iface% add %address%/%netmask%
+    ifconfig %iface% inet6 add %address%/%netmask%
     [[ route -A inet6 add ::/0 gw %gateway% %iface% ]] 
 
   down
--- /sbin/route.orig	2009-09-02 14:17:26.000000000 +0200
+++ /sbin/route	2009-09-02 14:41:44.000000000 +0200
@@ -7,16 +7,25 @@
 
 args=""
 
+if [ "$1" = "-A" ] ; then
+  shift
+  args="${args} -$1"
+  shift
+fi
+
 cmd="$1"
 shift
 
 while [ $# -gt 0 ]; do
+  echo "> $1"
   case "$1" in
     default)
       shift
       if [ "$1" = "gw" ] ; then shift ; fi
       args="${args} -net 0.0.0.0 $1"
     ;;
+    gw) ;;
+    *:*) args="${args} $1" ;;
     *.*.*.*) args="${args} $1" ;;
     *[0-9]) ;;
     *) args="${args} $1" ;;

Reply to: