X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fodhcp6c.c;h=d70546b366ed4c7ebd47c554922d9ea27cd6860c;hb=feec1ad5767b977ce47e6738930c99c22ba0ce9c;hp=6ce9adf33ce344548b72ed700d40f9c3934066b0;hpb=d09e94fff82440cedf04f2e0cfe1ede8a0ab0600;p=odhcp6c.git diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 6ce9adf..d70546b 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -40,7 +40,7 @@ static uint8_t *state_data[_STATE_MAX] = {NULL}; static size_t state_len[_STATE_MAX] = {0}; static volatile int do_signal = 0; -static int urandom_fd = -1, allow_slaac_only = 15; +static int urandom_fd = -1, allow_slaac_only = 0; static bool bound = false, release = true; @@ -76,6 +76,9 @@ int main(_unused int argc, char* const argv[]) break; case 'P': + if (allow_slaac_only >= 0 && allow_slaac_only < 10) + allow_slaac_only = 10; + request_pd = strtoul(optarg, NULL, 10); if (request_pd == 0) request_pd = -1; @@ -306,7 +309,7 @@ static int usage(void) const char buf[] = "Usage: odhcp6c [options] \n" "\nFeature options:\n" - " -S