From: Steven Barth Date: Tue, 28 Jan 2014 16:40:46 +0000 (+0100) Subject: Fix stateless mode X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3f3f2531deacf11afbc4f96f6dfbf8c47753215d;p=oweals%2Fodhcp6c.git Fix stateless mode --- diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 1e8e2bc..4a9267d 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -62,7 +62,7 @@ int main(_unused int argc, char* const argv[]) char *optpos; uint16_t opttype; enum odhcp6c_ia_mode ia_na_mode = IA_MODE_TRY; - enum odhcp6c_ia_mode ia_pd_mode = IA_MODE_TRY; + enum odhcp6c_ia_mode ia_pd_mode = IA_MODE_NONE; int ia_pd_iaid_index = 0; static struct in6_addr ifid = IN6ADDR_ANY_INIT; int sol_timeout = DHCPV6_SOL_MAX_RT; @@ -104,6 +104,9 @@ int main(_unused int argc, char* const argv[]) break; case 'P': + if (ia_pd_mode == IA_MODE_NONE) + ia_pd_mode = IA_MODE_TRY; + if (allow_slaac_only >= 0 && allow_slaac_only < 10) allow_slaac_only = 10;