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

This commit is contained in:
Jiri Popelka 2012-03-21 19:28:42 +01:00
parent c40b021d75
commit cea970864e
2 changed files with 31 additions and 1 deletions

View File

@ -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,

View File

@ -22,7 +22,7 @@
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Name: dhcp Name: dhcp
Version: 4.2.3 Version: 4.2.3
Release: 20.%{patchver}%{?dist} Release: 21.%{patchver}%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and # 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. # 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 Patch37: dhcp-4.2.3-dhclient-decline-onetry.patch
Patch38: dhcp-4.2.3-P2-log_perror.patch Patch38: dhcp-4.2.3-P2-log_perror.patch
Patch39: dhcp-4.2.3-P2-getifaddrs.patch Patch39: dhcp-4.2.3-P2-getifaddrs.patch
Patch40: dhcp-4.2.3-P2-send_release.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -309,6 +310,9 @@ rm bind/bind.tar.gz
# Use getifaddrs() to scan for interfaces on Linux (#449946) # Use getifaddrs() to scan for interfaces on Linux (#449946)
%patch39 -p1 -b .getifaddrs %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 # Copy in the Fedora/RHEL dhclient script
%{__install} -p -m 0755 %{SOURCE1} client/scripts/linux %{__install} -p -m 0755 %{SOURCE1} client/scripts/linux
%{__install} -p -m 0644 %{SOURCE2} . %{__install} -p -m 0644 %{SOURCE2} .
@ -616,6 +620,9 @@ fi
%changelog %changelog
* Wed Mar 21 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.3-21.P2
- don't use fallback_interface when releasing lease (#800561)
* Wed Mar 21 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.3-20.P2 * Wed Mar 21 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.3-20.P2
- use getifaddrs() to scan for interfaces on Linux (#449946) - use getifaddrs() to scan for interfaces on Linux (#449946)