- Fix the initialization-delay.patch (#587070)
This commit is contained in:
parent
2f26ada950
commit
ea06b93b2d
@ -1,21 +1,45 @@
|
|||||||
diff -up dhcp-4.1.1/client/dhclient.c.initialization-delay dhcp-4.1.1/client/dhclient.c
|
diff -up dhcp-4.1.1/client/dhclient.c.initialization-delay dhcp-4.1.1/client/dhclient.c
|
||||||
--- dhcp-4.1.1/client/dhclient.c.initialization-delay 2010-04-29 17:02:09.000000000 +0200
|
--- dhcp-4.1.1/client/dhclient.c.initialization-delay 2010-05-03 15:16:43.000000000 +0200
|
||||||
+++ dhcp-4.1.1/client/dhclient.c 2010-04-29 17:03:27.000000000 +0200
|
+++ dhcp-4.1.1/client/dhclient.c 2010-05-03 15:23:05.000000000 +0200
|
||||||
@@ -930,7 +930,7 @@ main(int argc, char **argv) {
|
@@ -927,11 +927,16 @@ main(int argc, char **argv) {
|
||||||
/* Set up a timeout to start the
|
do_release(client);
|
||||||
* initialization process.
|
else {
|
||||||
|
client->state = S_INIT;
|
||||||
|
- /* Set up a timeout to start the
|
||||||
|
- * initialization process.
|
||||||
|
+ /* Set up a timeout (0-1 second) to
|
||||||
|
+ * start the initialization process.
|
||||||
*/
|
*/
|
||||||
- tv.tv_sec = cur_time + random() % 5;
|
- tv.tv_sec = cur_time + random() % 5;
|
||||||
+ tv.tv_sec = cur_time + random() % 1;
|
- tv.tv_usec = 0;
|
||||||
tv.tv_usec = 0;
|
+ tv.tv_sec = cur_tv.tv_sec;
|
||||||
|
+ tv.tv_usec = cur_tv.tv_usec;
|
||||||
|
+ tv.tv_usec += (random() % 100) * 10000;
|
||||||
|
+ if (tv.tv_usec >= 1000000) {
|
||||||
|
+ tv.tv_sec += 1;
|
||||||
|
+ tv.tv_usec -= 1000000;
|
||||||
|
+ }
|
||||||
add_timeout(&tv, state_reboot,
|
add_timeout(&tv, state_reboot,
|
||||||
client, 0, 0);
|
client, 0, 0);
|
||||||
@@ -3913,7 +3913,7 @@ isc_result_t dhclient_interface_startup_
|
}
|
||||||
|
@@ -3911,10 +3916,16 @@ isc_result_t dhclient_interface_startup_
|
||||||
|
ip -> flags |= INTERFACE_RUNNING;
|
||||||
|
for (client = ip -> client; client; client = client -> next) {
|
||||||
client -> state = S_INIT;
|
client -> state = S_INIT;
|
||||||
/* Set up a timeout to start the initialization
|
- /* Set up a timeout to start the initialization
|
||||||
process. */
|
- process. */
|
||||||
- tv . tv_sec = cur_time + random () % 5;
|
- tv . tv_sec = cur_time + random () % 5;
|
||||||
+ tv . tv_sec = cur_time + random () % 1;
|
- tv . tv_usec = 0;
|
||||||
tv . tv_usec = 0;
|
+ /* Set up a timeout (0-1 second) to
|
||||||
|
+ * start the initialization process.
|
||||||
|
+ */
|
||||||
|
+ tv.tv_sec = cur_tv.tv_sec;
|
||||||
|
+ tv.tv_usec = cur_tv.tv_usec;
|
||||||
|
+ tv.tv_usec += (random() % 100) * 10000;
|
||||||
|
+ if (tv.tv_usec >= 1000000) {
|
||||||
|
+ tv.tv_sec += 1;
|
||||||
|
+ tv.tv_usec -= 1000000;
|
||||||
|
+ }
|
||||||
add_timeout (&tv, state_reboot, client, 0, 0);
|
add_timeout (&tv, state_reboot, client, 0, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
20
dhcp.spec
20
dhcp.spec
@ -13,7 +13,7 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: %{basever}
|
Version: %{basever}
|
||||||
Release: 21%{?dist}
|
Release: 22%{?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.
|
||||||
@ -215,23 +215,25 @@ libdhcpctl and libomapi static libraries are also included in this package.
|
|||||||
# Discard unicast Request/Renew/Release/Decline message
|
# Discard unicast Request/Renew/Release/Decline message
|
||||||
# (unless we set unicast option) and respond with Reply
|
# (unless we set unicast option) and respond with Reply
|
||||||
# with UseMulticast Status Code option (#573090)
|
# with UseMulticast Status Code option (#573090)
|
||||||
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21235])
|
||||||
%patch22 -p1 -b .UseMulticast
|
%patch22 -p1 -b .UseMulticast
|
||||||
|
|
||||||
# If any of the bound addresses are found to be in use on the link,
|
# If any of the bound addresses are found to be in use on the link,
|
||||||
# the dhcpv6 client sends a Decline message to the server
|
# the dhcpv6 client sends a Decline message to the server
|
||||||
# as described in section 18.1.7 of RFC-3315 (#559147)
|
# as described in section 18.1.7 of RFC-3315 (#559147)
|
||||||
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21237])
|
||||||
%patch23 -p1 -b .sendDecline
|
%patch23 -p1 -b .sendDecline
|
||||||
|
|
||||||
# In client initiated message exchanges stop retransmission
|
# In client initiated message exchanges stop retransmission
|
||||||
# upon reaching the MRD rather than at some point after it (#559153)
|
# upon reaching the MRD rather than at some point after it (#559153)
|
||||||
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21238])
|
||||||
%patch24 -p1 -b .retransmission
|
%patch24 -p1 -b .retransmission
|
||||||
|
|
||||||
# Fill in Elapsed Time Option in Release message (#582939)
|
# Fill in Elapsed Time Option in Release message (#582939)
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21171])
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21171])
|
||||||
%patch25 -p1 -b .release6-elapsed
|
%patch25 -p1 -b .release6-elapsed
|
||||||
|
|
||||||
# There was a useless 0-4 second delay before sending first DHCPDISCOVER.
|
# Cut down the 0-4 second delay before sending first DHCPDISCOVER (#587070)
|
||||||
# I didn't remove it at all, but made it 0-1 second. (#587070)
|
|
||||||
%patch26 -p1 -b .initialization-delay
|
%patch26 -p1 -b .initialization-delay
|
||||||
|
|
||||||
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
||||||
@ -286,11 +288,7 @@ for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8 ; do
|
|||||||
-e 's|ETCDIR|%{dhcpconfdir}|g' $page
|
-e 's|ETCDIR|%{dhcpconfdir}|g' $page
|
||||||
done
|
done
|
||||||
|
|
||||||
aclocal
|
autoreconf --verbose --force --install
|
||||||
libtoolize --copy --force
|
|
||||||
autoconf
|
|
||||||
autoheader
|
|
||||||
automake --foreign --add-missing --copy
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE" \
|
CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE" \
|
||||||
@ -516,9 +514,11 @@ fi
|
|||||||
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 03 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-22
|
||||||
|
- Fix the initialization-delay.patch (#587070)
|
||||||
|
|
||||||
* Thu Apr 29 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-21
|
* Thu Apr 29 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-21
|
||||||
- There was a useless 0-4 second delay before sending first DHCPDISCOVER.
|
- Cut down the 0-4 second delay before sending first DHCPDISCOVER (#587070)
|
||||||
I didn't remove it at all, but made it 0-1 second. (#587070)
|
|
||||||
|
|
||||||
* Wed Apr 28 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-20
|
* Wed Apr 28 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-20
|
||||||
- Move /etc/NetworkManager/dispatcher.d/10-dhclient script
|
- Move /etc/NetworkManager/dispatcher.d/10-dhclient script
|
||||||
|
Loading…
Reference in New Issue
Block a user