projects
/
oweals
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e6eebb
)
Fix initial delay of SOLICIT message
author
Steven Barth
<steven@midlink.org>
Fri, 28 Nov 2014 00:29:59 +0000
(
01:29
+0100)
committer
Steven Barth
<steven@midlink.org>
Fri, 28 Nov 2014 00:29:59 +0000
(
01:29
+0100)
Signed-off-by: Steven Barth <steven@midlink.org>
src/dhcpv6.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index 1af5c9aeafc9d4216ba369bd9cefb85b1dbbb098..e857823608b79a315843c0b094907aee1a8205f3 100644
(file)
--- a/
src/dhcpv6.c
+++ b/
src/dhcpv6.c
@@
-487,8
+487,8
@@
int dhcpv6_request(enum dhcpv6_msg type)
if (retx->delay) {
struct timespec ts = {0, 0};
- ts.tv_nsec =
dhcpv6_rand_delay(10 * DHCPV6_REQ_DELAY)
;
-
nanosleep(&ts, NULL
);
+ ts.tv_nsec =
(dhcpv6_rand_delay((10000 * DHCPV6_REQ_DELAY) / 2) + (1000 * DHCPV6_REQ_DELAY) / 2) * 1000000
;
+
while (nanosleep(&ts, &ts) < 0 && errno == EINTR
);
}
if (type == DHCPV6_MSG_UNKNOWN)