Hello, 

I have the same problem.
Attached is a patch which fix it. 
You can find package with the patch for i386 at
http://people.videolan.org/~xtophe/debian/

It only set the metric for the gateway route. i don't know if the metric
should be set for the local network. but anyway that's a dhcp
bug/feature not ifupdown.



-- 
Xtophe


diff -u ifupdown-0.6.7/addrfam.c ifupdown-0.6.7-new/addrfam.c
--- ifupdown-0.6.7/addrfam.c    2005-05-02 14:58:06.000000000 +0100
+++ ifupdown-0.6.7-new/addrfam.c        2006-05-13 23:52:19.000000000 +0100
@@ -4,9 +4,9 @@
 
 #line 3825 "ifupdown.nw"
 extern address_family addr_inet;
-#line 4005 "ifupdown.nw"
+#line 4007 "ifupdown.nw"
 extern address_family addr_inet6;
-#line 4076 "ifupdown.nw"
+#line 4078 "ifupdown.nw"
 extern address_family addr_ipx;
 
 #line 455 "ifupdown.nw"
@@ -14,9 +14,9 @@
        
 #line 3829 "ifupdown.nw"
 &addr_inet, 
-#line 4009 "ifupdown.nw"
+#line 4011 "ifupdown.nw"
 &addr_inet6,
-#line 4080 "ifupdown.nw"
+#line 4082 "ifupdown.nw"
 &addr_ipx,
 #line 457 "ifupdown.nw"
        NULL
diff -u ifupdown-0.6.7/ifupdown.nw ifupdown-0.6.7-new/ifupdown.nw
--- ifupdown-0.6.7/ifupdown.nw  2005-04-05 18:31:29.000000000 +0100
+++ ifupdown-0.6.7-new/ifupdown.nw      2006-05-13 23:52:00.000000000 +0100
@@ -3910,6 +3910,7 @@
 
   options
     hostname hostname       -- Hostname to be requested (pump, dhcpcd, udhcpc)
+    metric metric          -- Metric for added routes
     leasehours leastime     -- Preferred lease time in hours (pump)
     leasetime leasetime     -- Preferred lease time in seconds (dhcpcd)
     vendor vendor           -- Vendor class identifier (dhcpcd)
@@ -3921,6 +3922,7 @@
   up
     [[ifconfig %iface% hw %hwaddress%]]
     dhclient3 -pf /var/run/dhclient.%iface%.pid -lf 
/var/run/dhclient.%iface%.leases %iface% \
+        [[-e IF_METRIC=%metric%]] \
         if (execable("/sbin/dhclient3"))
     dhclient -e -pf /var/run/dhclient.%iface%.pid -lf 
/var/run/dhclient.%iface%.leases %iface% \
         elsif (execable("/sbin/dhclient"))
diff -u ifupdown-0.6.7/inet.defn ifupdown-0.6.7-new/inet.defn
--- ifupdown-0.6.7/inet.defn    2005-05-02 14:58:08.000000000 +0100
+++ ifupdown-0.6.7-new/inet.defn        2006-05-13 23:52:22.000000000 +0100
@@ -65,6 +65,7 @@
 
   options
     hostname hostname       -- Hostname to be requested (pump, dhcpcd, udhcpc)
+    metric metric          -- Metric for added routes
     leasehours leastime     -- Preferred lease time in hours (pump)
     leasetime leasetime     -- Preferred lease time in seconds (dhcpcd)
     vendor vendor           -- Vendor class identifier (dhcpcd)
@@ -76,6 +77,7 @@
   up
     [[ifconfig %iface% hw %hwaddress%]]
     dhclient3 -pf /var/run/dhclient.%iface%.pid -lf 
/var/run/dhclient.%iface%.leases %iface% \
+        [[-e IF_METRIC=%metric%]] \
         if (execable("/sbin/dhclient3"))
     dhclient -e -pf /var/run/dhclient.%iface%.pid -lf 
/var/run/dhclient.%iface%.leases %iface% \
         elsif (execable("/sbin/dhclient"))

Attachment: signature.asc
Description: Digital signature

Reply via email to