[dhcp] don't use fallback_interface when releasing lease (#800561)

Jiří Popelka jpopelka at fedoraproject.org
Wed Mar 21 18:32:19 UTC 2012


commit cea970864e79224f37af645524fdd66df236f823
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Wed Mar 21 19:28:42 2012 +0100

    don't use fallback_interface when releasing lease (#800561)

 dhcp-4.2.3-P2-send_release.patch |   23 +++++++++++++++++++++++
 dhcp.spec                        |    9 ++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/dhcp-4.2.3-P2-send_release.patch b/dhcp-4.2.3-P2-send_release.patch
new file mode 100644
index 0000000..2aa18f1
--- /dev/null
+++ b/dhcp-4.2.3-P2-send_release.patch
@@ -0,0 +1,23 @@
+diff -up dhcp-4.2.3-P2/client/dhclient.c.send_release dhcp-4.2.3-P2/client/dhclient.c
+--- dhcp-4.2.3-P2/client/dhclient.c.send_release	2012-03-21 19:16:16.000000000 +0100
++++ dhcp-4.2.3-P2/client/dhclient.c	2012-03-21 19:21:39.920599903 +0100
+@@ -2749,8 +2749,8 @@ void send_release (cpp)
+ 	      inet_ntoa (destination.sin_addr),
+ 	      ntohs (destination.sin_port), client -> xid);
+ 
+-	if (fallback_interface)
+-		result = send_packet (fallback_interface,
++	if (client -> interface)
++		result = send_packet (client -> interface,
+ 				      (struct packet *)0,
+ 				      &client -> packet,
+ 				      client -> packet_length,
+@@ -2758,7 +2758,7 @@ void send_release (cpp)
+ 				      (struct hardware *)0);
+ 	else
+ 		/* Send out a packet. */
+-		result = send_packet (client -> interface, (struct packet *)0,
++		result = send_packet (fallback_interface, (struct packet *)0,
+ 				      &client -> packet,
+ 				      client -> packet_length,
+ 				      from, &destination,
diff --git a/dhcp.spec b/dhcp.spec
index 9fc4a00..3b0d15a 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -22,7 +22,7 @@
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
 Version:  4.2.3
-Release:  20.%{patchver}%{?dist}
+Release:  21.%{patchver}%{?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.
@@ -75,6 +75,7 @@ Patch36:  dhcp-4.2.2-systemtap.patch
 Patch37:  dhcp-4.2.3-dhclient-decline-onetry.patch
 Patch38:  dhcp-4.2.3-P2-log_perror.patch
 Patch39:  dhcp-4.2.3-P2-getifaddrs.patch
+Patch40:  dhcp-4.2.3-P2-send_release.patch
 
 BuildRequires: autoconf
 BuildRequires: automake
@@ -309,6 +310,9 @@ rm bind/bind.tar.gz
 # Use getifaddrs() to scan for interfaces on Linux (#449946)
 %patch39 -p1 -b .getifaddrs
 
+# Don't use fallback_interface when releasing lease (#800561)
+%patch40 -p1 -b .send_release
+
 # Copy in the Fedora/RHEL dhclient script
 %{__install} -p -m 0755 %{SOURCE1} client/scripts/linux
 %{__install} -p -m 0644 %{SOURCE2} .
@@ -616,6 +620,9 @@ fi
 
 
 %changelog
+* Wed Mar 21 2012 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.3-21.P2
+- don't use fallback_interface when releasing lease (#800561)
+
 * Wed Mar 21 2012 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.3-20.P2
 - use getifaddrs() to scan for interfaces on Linux (#449946)
 


More information about the scm-commits mailing list