From 634087ae6d1b75f387bf556684ad01f94624eca5 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Apr 26 2012 12:58:19 +0000 Subject: remove inherit-leases.patch - it's probably not needed anymore (#815355) --- diff --git a/dhclient-script b/dhclient-script index b542082..3425e4b 100644 --- a/dhclient-script +++ b/dhclient-script @@ -349,7 +349,7 @@ dhconfig() { [ ! "${old_broadcast_address}" = "${new_broadcast_address}" ] || [ ! "${old_routers}" = "${new_routers}" ] || [ ! "${old_interface_mtu}" = "${new_interface_mtu}" ]; then - ip -4 addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} + ip -4 addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} >/dev/null 2>&1 ip link set dev ${interface} up # The 576 MTU is only used for X.25 and dialup connections @@ -358,7 +358,7 @@ dhconfig() { # disallow MTUs from 576 and below by default, so that broken # MTUs are ignored, but higher stuff is allowed (1492, 1500, etc). if [ -n "${new_interface_mtu}" ] && [ ${new_interface_mtu} -gt 576 ]; then - ip link set ${interface} mtu ${new_interface_mtu} + ip link set dev ${interface} mtu ${new_interface_mtu} fi if [ -x ${ETCDIR}/dhclient-${interface}-up-hooks ]; then @@ -661,14 +661,9 @@ case "${reason}" in ip -4 addr flush dev ${interface} label ${interface}:0 >/dev/null 2>&1 fi - if [ "${keep_old_ip}" = "yes" ]; then - ip link set ${interface} up - else - ip -4 addr flush dev ${interface} >/dev/null 2>&1 - ip link set ${interface} up - fi - + ip link set dev ${interface} up if [ -n "${DHCLIENT_DELAY}" ] && [ ${DHCLIENT_DELAY} -gt 0 ]; then + # We need to give the kernel some time to get the interface up. sleep ${DHCLIENT_DELAY} fi @@ -677,7 +672,7 @@ case "${reason}" in PREINIT6) # ensure interface is up - ip link set ${interface} up + ip link set dev ${interface} up # remove any stale addresses from aborted clients ip -6 addr flush dev ${interface} scope global permanent diff --git a/dhcp-4.2.0-inherit-leases.patch b/dhcp-4.2.0-inherit-leases.patch deleted file mode 100644 index 052f642..0000000 --- a/dhcp-4.2.0-inherit-leases.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up dhcp-4.2.0/client/dhclient.c.inherit dhcp-4.2.0/client/dhclient.c ---- dhcp-4.2.0/client/dhclient.c.inherit 2010-07-21 14:33:44.000000000 +0200 -+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 14:40:05.000000000 +0200 -@@ -2322,6 +2322,7 @@ void send_request (cpp) - { - struct client_state *client = cpp; - -+ int i; - int result; - int interval; - struct sockaddr_in destination; -@@ -2381,6 +2382,22 @@ void send_request (cpp) - /* Now do a preinit on the interface so that we can - discover a new address. */ - script_init (client, "PREINIT", (struct string_list *)0); -+ -+ /* Has an active lease */ -+ if (client -> interface -> addresses != NULL) { -+ for (i = 0; i < client -> interface -> address_count; i++) { -+ if (client -> active && -+ client -> active -> is_bootp && -+ client -> active -> expiry > cur_time && -+ client -> interface -> addresses[i].s_addr != 0 && -+ client -> active -> address.len == 4 && -+ memcpy (client -> active -> address.iabuf, &(client -> interface -> addresses[i]), 4) == 0) { -+ client_envadd (client, "", "keep_old_ip", "%s", "yes"); -+ break; -+ } -+ } -+ } -+ - if (client -> alias) - script_write_params (client, "alias_", - client -> alias); diff --git a/dhcp.spec b/dhcp.spec index 19f4899..68c6f80 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -19,7 +19,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.2.4 -Release: 0.2.%{prever}%{?dist} +Release: 0.3.%{prever}%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -48,7 +48,6 @@ Patch8: dhcp-4.2.2-xen-checksum.patch Patch10: dhcp-4.2.1-manpages.patch Patch11: dhcp-4.2.4-paths.patch Patch12: dhcp-4.2.2-CLOEXEC.patch -Patch13: dhcp-4.2.0-inherit-leases.patch Patch14: dhcp-4.2.0-garbage-chars.patch Patch15: dhcp-4.2.0-missing-ipv6-not-fatal.patch Patch17: dhcp-4.2.0-add_timeout_when_NULL.patch @@ -213,9 +212,6 @@ rm bind/bind.tar.gz # (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19148]) %patch12 -p1 -b .cloexec -# If we have an active lease, do not down the interface (#453982) -%patch13 -p1 -b .inherit - # Fix 'garbage in format string' error (#450042) %patch14 -p1 -b .garbage @@ -604,6 +600,9 @@ fi %changelog +* Thu Apr 26 2012 Jiri Popelka - 12:4.2.4-0.3.b1 +- remove inherit-leases.patch - it's probably not needed anymore (#815355) + * Wed Apr 18 2012 Jiri Popelka - 12:4.2.4-0.2.b1 - update paths.patch and source URL