- In client initiated message exchanges stop retransmission upon reaching
the MRD rather than at some point after it (#559153)
This commit is contained in:
parent
c5f5c347df
commit
ed7e418d35
75
dhcp-4.1.1-retransmission.patch
Normal file
75
dhcp-4.1.1-retransmission.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
|
||||||
|
--- dhcp-4.1.1/client/dhc6.c.retransmission 2010-03-25 18:32:17.000000000 +0100
|
||||||
|
+++ dhcp-4.1.1/client/dhc6.c 2010-03-25 18:33:54.000000000 +0100
|
||||||
|
@@ -354,7 +354,7 @@ dhc6_retrans_init(struct client_state *c
|
||||||
|
static void
|
||||||
|
dhc6_retrans_advance(struct client_state *client)
|
||||||
|
{
|
||||||
|
- struct timeval elapsed;
|
||||||
|
+ struct timeval elapsed, elapsed_after_RT;
|
||||||
|
|
||||||
|
/* elapsed = cur - start */
|
||||||
|
elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
|
||||||
|
@@ -371,6 +371,8 @@ dhc6_retrans_advance(struct client_state
|
||||||
|
elapsed.tv_sec += 1;
|
||||||
|
elapsed.tv_usec -= 1000000;
|
||||||
|
}
|
||||||
|
+ elapsed_after_RT.tv_sec = elapsed.tv_sec;
|
||||||
|
+ elapsed_after_RT.tv_usec = elapsed.tv_usec;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* RT for each subsequent message transmission is based on the previous
|
||||||
|
@@ -408,13 +410,10 @@ dhc6_retrans_advance(struct client_state
|
||||||
|
elapsed.tv_usec -= 1000000;
|
||||||
|
}
|
||||||
|
if (elapsed.tv_sec >= client->MRD) {
|
||||||
|
- /*
|
||||||
|
- * wake at RT + cur = start + MRD
|
||||||
|
- */
|
||||||
|
- client->RT = client->MRD +
|
||||||
|
- (client->start_time.tv_sec - cur_tv.tv_sec);
|
||||||
|
- client->RT = client->RT * 100 +
|
||||||
|
- (client->start_time.tv_usec - cur_tv.tv_usec) / 10000;
|
||||||
|
+ client->RT = client->MRD - elapsed_after_RT.tv_sec;
|
||||||
|
+ client->RT = client->RT * 100 - elapsed_after_RT.tv_usec / 10000;
|
||||||
|
+ if (client->RT < 0)
|
||||||
|
+ client->RT = 0;
|
||||||
|
}
|
||||||
|
client->txcount++;
|
||||||
|
}
|
||||||
|
@@ -1502,7 +1501,7 @@ do_init6(void *input)
|
||||||
|
elapsed.tv_usec += 1000000;
|
||||||
|
}
|
||||||
|
/* Check if finished (-1 argument). */
|
||||||
|
- if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
|
||||||
|
+ if ((client->MRD != 0) && (elapsed.tv_sec >= client->MRD)) {
|
||||||
|
log_info("Max retransmission duration exceeded.");
|
||||||
|
client->state = S_STOPPED;
|
||||||
|
if (client->active_lease != NULL) {
|
||||||
|
@@ -1922,7 +1921,7 @@ do_info_request6(void *input)
|
||||||
|
elapsed.tv_usec += 1000000;
|
||||||
|
}
|
||||||
|
/* Check if finished (-1 argument). */
|
||||||
|
- if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
|
||||||
|
+ if ((client->MRD != 0) && (elapsed.tv_sec >= client->MRD)) {
|
||||||
|
log_info("Max retransmission duration exceeded.");
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
@@ -2043,7 +2042,7 @@ do_confirm6(void *input)
|
||||||
|
elapsed.tv_sec -= 1;
|
||||||
|
elapsed.tv_usec += 1000000;
|
||||||
|
}
|
||||||
|
- if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
|
||||||
|
+ if ((client->MRD != 0) && (elapsed.tv_sec >= client->MRD)) {
|
||||||
|
log_info("Max retransmission duration exceeded.");
|
||||||
|
start_bound(client);
|
||||||
|
return;
|
||||||
|
@@ -3290,7 +3289,7 @@ do_select6(void *input)
|
||||||
|
elapsed.tv_sec -= 1;
|
||||||
|
elapsed.tv_usec += 1000000;
|
||||||
|
}
|
||||||
|
- if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
|
||||||
|
+ if ((client->MRD != 0) && (elapsed.tv_sec >= client->MRD)) {
|
||||||
|
log_info("Max retransmission duration exceeded.");
|
||||||
|
abort = ISC_TRUE;
|
||||||
|
}
|
11
dhcp.spec
11
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: 15%{?dist}
|
Release: 16%{?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.
|
||||||
@ -56,6 +56,7 @@ Patch20: %{name}-4.1.1-capability.patch
|
|||||||
Patch21: %{name}-4.1.1-logpid.patch
|
Patch21: %{name}-4.1.1-logpid.patch
|
||||||
Patch22: %{name}-4.1.1-UseMulticast.patch
|
Patch22: %{name}-4.1.1-UseMulticast.patch
|
||||||
Patch23: %{name}-4.1.1-sendDecline.patch
|
Patch23: %{name}-4.1.1-sendDecline.patch
|
||||||
|
Patch24: %{name}-4.1.1-retransmission.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -219,6 +220,10 @@ libdhcpctl and libomapi static libraries are also included in this package.
|
|||||||
# as described in section 18.1.7 of RFC-3315 (#559147)
|
# as described in section 18.1.7 of RFC-3315 (#559147)
|
||||||
%patch23 -p1 -b .sendDecline
|
%patch23 -p1 -b .sendDecline
|
||||||
|
|
||||||
|
# In client initiated message exchanges stop retransmission
|
||||||
|
# upon reaching the MRD rather than at some point after it (#559153)
|
||||||
|
%patch24 -p1 -b .retransmission
|
||||||
|
|
||||||
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
||||||
%{__install} -p -m 0755 ldap-for-dhcp-%{ldappatchver}/dhcpd-conf-to-ldap contrib/
|
%{__install} -p -m 0755 ldap-for-dhcp-%{ldappatchver}/dhcpd-conf-to-ldap contrib/
|
||||||
|
|
||||||
@ -501,6 +506,10 @@ fi
|
|||||||
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 25 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-16
|
||||||
|
- In client initiated message exchanges stop retransmission
|
||||||
|
upon reaching the MRD rather than at some point after it (#559153)
|
||||||
|
|
||||||
* Wed Mar 24 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-15
|
* Wed Mar 24 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-15
|
||||||
- In dhclient-script check whether bound address
|
- In dhclient-script check whether bound address
|
||||||
passed duplicate address detection (DAD) (#559147)
|
passed duplicate address detection (DAD) (#559147)
|
||||||
|
Loading…
Reference in New Issue
Block a user