X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fodhcp6c.c;h=dce1e0ee7494a3893df9ebef0625d75b7c042bcb;hb=2bf5f3ad1ce6d386938c39d1569f2635300eca6e;hp=37128308f26666d8e75a7941bb758ff92635d9e9;hpb=46ba6f6aeb8055e872c57dc2b90a383fb280f440;p=odhcp6c.git diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 3712830..dce1e0e 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -395,6 +395,8 @@ int main(_unused int argc, char* const argv[]) break; } + odhcp6c_expire(); + size_t ia_pd_len, ia_na_len, server_id_len; odhcp6c_get_state(STATE_IA_PD, &ia_pd_len); odhcp6c_get_state(STATE_IA_NA, &ia_na_len); @@ -427,7 +429,7 @@ static int usage(void) " -F Force IPv6-Prefix\n" " -V Set vendor-class option (base-16 encoded)\n" " -u Set user-class option string\n" - " -c Override client-ID (base-16 encoded)\n" + " -c Override client-ID (base-16 encoded 16-bit type + value)\n" " -i Use a custom interface identifier for RA handling\n" " -r Options to be requested (comma-separated)\n" " -R Do not request any options except those specified with -r\n" @@ -443,7 +445,7 @@ static int usage(void) " -e Write logmessages to stderr\n" " -v Increase logging verbosity\n" " -h Show this help\n\n"; - write(STDERR_FILENO, buf, sizeof(buf)); + fputs(buf, stderr); return 1; } @@ -652,9 +654,9 @@ uint32_t odhcp6c_elapsed(void) } -void odhcp6c_random(void *buf, size_t len) +int odhcp6c_random(void *buf, size_t len) { - read(urandom_fd, buf, len); + return read(urandom_fd, buf, len); } bool odhcp6c_is_bound(void)