diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2015-04-25 20:52:57 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2015-04-25 21:00:46 +0500 |
commit | 0f72844fc537413df8595ad07ad6ce2b86989521 (patch) | |
tree | 4f7dd2663d5268dab06885fab3d0f9c247afb529 /src/odhcp6c.c | |
parent | b5f6ace7148fda6bf336758d2544a23a90d845bf (diff) | |
download | odhcp6c-0f72844fc537413df8595ad07ad6ce2b86989521.tar.gz |
Avoid of waiting for Advertise in stateless-only mode
Start with Information-request when configured not to ask
IA_NA/IA_PD. It allows to complete the exchange using only
two messages, instead of four, and fixes infinite Advertise
waiting loop with servers that just ignore Solicit messages.
Diffstat (limited to 'src/odhcp6c.c')
-rw-r--r-- | src/odhcp6c.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 4605792..a71218c 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -278,13 +278,14 @@ int main(_unused int argc, char* const argv[]) odhcp6c_clear_state(STATE_NTP_FQDN); odhcp6c_clear_state(STATE_SIP_IP); odhcp6c_clear_state(STATE_SIP_FQDN); - dhcpv6_set_ia_mode(ia_na_mode, ia_pd_mode); bound = false; syslog(LOG_NOTICE, "(re)starting transaction on %s", ifname); signal_usr1 = signal_usr2 = false; - int mode = dhcpv6_request(DHCPV6_MSG_SOLICIT); + int mode = dhcpv6_set_ia_mode(ia_na_mode, ia_pd_mode); + if (mode != DHCPV6_STATELESS) + mode = dhcpv6_request(DHCPV6_MSG_SOLICIT); odhcp6c_signal_process(); if (mode < 0) |