about summary refs log tree commit diff
path: root/pkgs/tools/networking/dhcp
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-01-08 10:33:59 -0600
committerWill Dietz <w@wdtz.org>2018-03-01 08:40:30 -0600
commit559c79d7b7810308762aa525e05dcfb1115d929c (patch)
tree6b35c10e84b0a8c9f6e92fe0db2e57a74732f44e /pkgs/tools/networking/dhcp
parentb8b2225f6b2f9416b18906e28b294ed8b099095a (diff)
downloadnixlib-559c79d7b7810308762aa525e05dcfb1115d929c.tar
nixlib-559c79d7b7810308762aa525e05dcfb1115d929c.tar.gz
nixlib-559c79d7b7810308762aa525e05dcfb1115d929c.tar.bz2
nixlib-559c79d7b7810308762aa525e05dcfb1115d929c.tar.lz
nixlib-559c79d7b7810308762aa525e05dcfb1115d929c.tar.xz
nixlib-559c79d7b7810308762aa525e05dcfb1115d929c.tar.zst
nixlib-559c79d7b7810308762aa525e05dcfb1115d929c.zip
dhcp: 4.3.4 -> 4.3.6
Diffstat (limited to 'pkgs/tools/networking/dhcp')
-rw-r--r--pkgs/tools/networking/dhcp/default.nix10
-rw-r--r--pkgs/tools/networking/dhcp/flush-if.patch76
-rw-r--r--pkgs/tools/networking/dhcp/set-hostname.patch24
3 files changed, 14 insertions, 96 deletions
diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix
index 1812e95dcbb7..c6ad737ce1ff 100644
--- a/pkgs/tools/networking/dhcp/default.nix
+++ b/pkgs/tools/networking/dhcp/default.nix
@@ -4,19 +4,15 @@
 
 stdenv.mkDerivation rec {
   name = "dhcp-${version}";
-  version = "4.3.4";
+  version = "4.3.6";
 
   src = fetchurl {
     url = "http://ftp.isc.org/isc/dhcp/${version}/${name}.tar.gz";
-    sha256 = "0zk0imll6bfyp9p4ndn8h6s4ifijnw5bhixswifr5rnk7pp5l4gm";
+    sha256 = "06vgxhm6agzkp6r1jy10467vrfw2rzcp2mnkcph7ydziciisy7m4";
   };
 
   patches =
-    [ # Don't bring down interfaces, because wpa_supplicant doesn't
-      # recover when the wlan interface goes down.  Instead just flush
-      # all addresses, routes and neighbours of the interface.
-      ./flush-if.patch
-
+    [
       # Make sure that the hostname gets set on reboot.  Without this
       # patch, the hostname doesn't get set properly if the old
       # hostname (i.e. before reboot) is equal to the new hostname.
diff --git a/pkgs/tools/networking/dhcp/flush-if.patch b/pkgs/tools/networking/dhcp/flush-if.patch
deleted file mode 100644
index ff72248b0abb..000000000000
--- a/pkgs/tools/networking/dhcp/flush-if.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --exclude '*~' -rc dhcp-4.1.0p1-orig/client/scripts/linux dhcp-4.1.0p1/client/scripts/linux
-*** dhcp-4.1.0p1-orig/client/scripts/linux	2008-05-23 15:56:07.000000000 +0200
---- dhcp-4.1.0p1/client/scripts/linux	2009-09-29 17:56:57.000000000 +0200
-***************
-*** 67,72 ****
---- 67,80 ----
-    exit $exit_status
-  }
-  
-+ # Delete the old addresses, routes and ARP information for this
-+ # interface.
-+ flush_if() {
-+   ${ip} -4 address flush dev $interface
-+   ${ip} -4 route flush dev $interface
-+   ${ip} -4 neighbour flush dev $interface
-+ }
-+ 
-  # Invoke the local dhcp client enter hooks, if they exist.
-  if [ -f /etc/dhclient-enter-hooks ]; then
-    exit_status=0
-***************
-*** 150,159 ****
-      ifconfig $interface:0- inet 0
-    fi
-    if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
-!     # IP address changed. Bringing down the interface will delete all routes,
-!     # and clear the ARP cache.
-!     ifconfig $interface inet 0 down
-! 
-    fi
-    if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
-       [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
---- 158,165 ----
-      ifconfig $interface:0- inet 0
-    fi
-    if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
-!     # IP address changed.
-!     flush_if
-    fi
-    if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
-       [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
-***************
-*** 189,196 ****
-      ifconfig $interface:0- inet 0
-    fi
-    if [ x$old_ip_address != x ]; then
-!     # Shut down interface, which will delete routes and clear arp cache.
-!     ifconfig $interface inet 0 down
-    fi
-    if [ x$alias_ip_address != x ]; then
-      ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
---- 195,201 ----
-      ifconfig $interface:0- inet 0
-    fi
-    if [ x$old_ip_address != x ]; then
-!     flush_if
-    fi
-    if [ x$alias_ip_address != x ]; then
-      ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-***************
-*** 225,231 ****
-      make_resolv_conf
-      exit_with_hooks 0
-    fi
-!   ifconfig $interface inet 0 down
-    exit_with_hooks 1
-  fi
-  
---- 230,236 ----
-      make_resolv_conf
-      exit_with_hooks 0
-    fi
-!   flush_if
-    exit_with_hooks 1
-  fi
-  
diff --git a/pkgs/tools/networking/dhcp/set-hostname.patch b/pkgs/tools/networking/dhcp/set-hostname.patch
index 495a8a124be3..7aa9d0814514 100644
--- a/pkgs/tools/networking/dhcp/set-hostname.patch
+++ b/pkgs/tools/networking/dhcp/set-hostname.patch
@@ -1,14 +1,12 @@
-diff -ru -x '*~' dhcp-4.1.2-P1-orig//client/scripts/linux dhcp-4.1.2-P1//client/scripts/linux
---- dhcp-4.1.2-P1-orig//client/scripts/linux	2010-09-15 00:49:48.000000000 +0200
-+++ dhcp-4.1.2-P1//client/scripts/linux	2011-04-01 16:08:10.984372269 +0200
+--- a/client/scripts/linux	2010-09-15 00:49:48.000000000 +0200
++++ b/client/scripts/linux	2011-04-01 16:08:10.984372269 +0200
 @@ -133,9 +133,7 @@
-      [ x$current_hostname = "x(none)" ] || \
-      [ x$current_hostname = xlocalhost ] || \
-      [ x$current_hostname = x$old_host_name ]; then
--    if [ x$new_host_name != x$old_host_name ]; then
--      hostname "$new_host_name"
--    fi
-+    hostname "$new_host_name"
-   fi
-     
-   if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+            [ "$current_hostname" = '(none)' ] ||
+            [ "$current_hostname" = 'localhost' ] ||
+            [ "$current_hostname" = "$old_host_name" ]; then
+-           if [ "$new_host_name" != "$old_host_name" ]; then
+-               hostname "$new_host_name"
+-           fi
++           hostname "$new_host_name"
+         fi
+     fi