[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.2.2.dfsg.1-5-8-g1a169bc

Andrew Pollock apollock at debian.org
Sat Jun 30 21:12:19 UTC 2012


The following commit has been merged in the master branch:
commit 1a169bc2929ef9ba449cca80b271084d1b29f201
Author: Andrew Pollock <apollock at debian.org>
Date:   Sat Jun 30 14:10:44 2012 -0700

    Fix subnet mask and broadcast handling
    
    Closes: #677985

diff --git a/debian/changelog b/debian/changelog
index 5804be5..569c7cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ isc-dhcp (4.2.4-1) UNRELEASED; urgency=low
   * debian/dhclient-script.linux: comply with RFC 3442 and ignore
     the routers option if the rfc3442-classless-static-routes option is present
     (closes: #592735)
+  * debian/dhclient-script.kfreebsd: fix subnet mask handling (closes: #677985)
 
  -- Andrew Pollock <apollock at debian.org>  Sat, 09 Jun 2012 14:01:05 -0700
 
diff --git a/debian/dhclient-script.kfreebsd b/debian/dhclient-script.kfreebsd
index b74bb35..e691e06 100644
--- a/debian/dhclient-script.kfreebsd
+++ b/debian/dhclient-script.kfreebsd
@@ -173,8 +173,9 @@ case "$reason" in
         if [ -z "$old_ip_address" ] ||
            [ "$old_ip_address" != "$new_ip_address" ] ||
            [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
-            ifconfig $interface inet $new_ip_address $new_netmask_arg \
-                                $new_broadcast_arg $mtu_arg $metric_arg $medium
+	    # FIXME: metric_arg is not defined
+            ifconfig $interface inet $new_ip_address ${new_subnet_mask:+netmask $new_subnet_mask} \
+                                ${new_broadcast_address:+broadcast $new_broadcast_address} $mtu_arg $metric_arg $medium
             route add $new_ip_address 127.1 >/dev/null 2>&1
             for router in $new_routers; do
               # If the subnet is captive, eg the netmask is /32 but the default
@@ -249,6 +250,7 @@ case "$reason" in
         fi
 
         if [ -n "$alias_ip_address" ]; then
+	    # FIXME: alias_subnet_arg is not defined
             ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
             route add $alias_ip_address 127.0.0.1
         fi
@@ -261,8 +263,9 @@ case "$reason" in
             route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
         fi
 
-        ifconfig $interface inet $new_ip_address $new_netmask_arg \
-                              $new_broadcast_arg $mtu_arg $metric_arg $medium
+	# FIXME: metric_arg is not defined
+        ifconfig $interface inet $new_ip_address ${new_subnet_mask:+netmask $new_subnet_mask} \
+                              ${new_broadcast_address:+broadcast $new_broadcast_address} $mtu_arg $metric_arg $medium
         sleep 1
 
 
@@ -271,6 +274,7 @@ case "$reason" in
           if ping -q -c 1 $1; then
             if [ x$new_ip_address != x$alias_ip_address ] && \
                               [ x$alias_ip_address != x ]; then
+	      # FIXME: alias_subnet_arg is not defined
               ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
               route add $alias_ip_address 127.0.0.1
             fi

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list