]> git.decadent.org.uk Git - odhcp6c.git/commitdiff
Merge branch 'bugfix' into hnet
authorMarkus Stenberg <markus.stenberg@iki.fi>
Tue, 26 Mar 2013 13:16:24 +0000 (15:16 +0200)
committerMarkus Stenberg <markus.stenberg@iki.fi>
Tue, 26 Mar 2013 13:16:24 +0000 (15:16 +0200)
1  2 
src/odhcp6c.c

diff --combined src/odhcp6c.c
index 64d363f46b9d21210d12c40fa72104a04848c5e0,88f2ae5c7228c1b51e5781fdeb075c4ed4dc99a8..3e989a2d39c40031c59585d5b384fe146b37f3dc
@@@ -139,13 -139,6 +139,6 @@@ int main(_unused int argc, char* const 
        if (help || !ifname)
                return usage();
  
-       if ((urandom_fd = open("/dev/urandom", O_CLOEXEC | O_RDONLY)) < 0 ||
-                       init_dhcpv6(ifname, request_pd) || ra_init(ifname) ||
-                       script_init(script, ifname)) {
-               syslog(LOG_ERR, "failed to initialize: %s", strerror(errno));
-               return 3;
-       }
        signal(SIGIO, sighandler);
        signal(SIGHUP, sighandler);
        signal(SIGINT, sighandler);
        signal(SIGUSR1, sighandler);
        signal(SIGUSR2, sighandler);
  
+       if ((urandom_fd = open("/dev/urandom", O_CLOEXEC | O_RDONLY)) < 0 ||
+                       init_dhcpv6(ifname, request_pd) || ra_init(ifname) ||
+                       script_init(script, ifname)) {
+               syslog(LOG_ERR, "failed to initialize: %s", strerror(errno));
+               return 3;
+       }
        if (daemonize) {
                openlog("odhcp6c", LOG_PID, LOG_DAEMON); // Disable LOG_PERROR
                if (daemon(0, 0)) {
@@@ -427,7 -427,6 +427,7 @@@ void odhcp6c_update_entry_safe(enum odh
                if (x) {
                        x->valid = new->valid;
                        x->preferred = new->preferred;
 +                        x->prefix_class = new->prefix_class;
                } else {
                        odhcp6c_add_state(state, new, sizeof(*new));
                }