router: fix logic inversion
authorSteven Barth <steven@midlink.org>
Tue, 14 Jul 2015 19:44:08 +0000 (21:44 +0200)
committerSteven Barth <steven@midlink.org>
Tue, 14 Jul 2015 19:44:08 +0000 (21:44 +0200)
src/router.c

index e3a9aa9747ba44c6e93d4c6ee1d6c3b3a47d7815..fada62b8486da9328b11e20d0a2c7e50ef4715dc 100644 (file)
@@ -321,7 +321,7 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
                }
        }
 
-       if (maxvalid && !iface->default_router && adv.h.nd_ra_router_lifetime) {
+       if (!maxvalid && !iface->default_router && adv.h.nd_ra_router_lifetime) {
                syslog(LOG_WARNING, "A default route is present but there is no public prefix "
                                "on %s thus we don't announce a default route!", iface->ifname);
                adv.h.nd_ra_router_lifetime = 0;