router: don't send O flag when no dhcpv6 is enabled
authorSteven Barth <steven@midlink.org>
Tue, 10 Dec 2013 14:56:16 +0000 (15:56 +0100)
committerSteven Barth <steven@midlink.org>
Tue, 10 Dec 2013 14:56:16 +0000 (15:56 +0100)
src/router.c

index 5abf1e6bff1d3682ae336a09f2ed88c08e1d5dd7..945151e52ee98568a601ebc1e46490123733cdb5 100644 (file)
@@ -219,7 +219,10 @@ static void send_router_advert(struct uloop_timeout *event)
                .lladdr = {ND_OPT_SOURCE_LINKADDR, 1, {0}},
                .mtu = {ND_OPT_MTU, 1, 0, htonl(mtu)},
        };
-       adv.h.nd_ra_flags_reserved = ND_RA_FLAG_OTHER;
+
+       if (iface->dhcpv6)
+               adv.h.nd_ra_flags_reserved = ND_RA_FLAG_OTHER;
+
        if (iface->managed >= RELAYD_MANAGED_MFLAG)
                adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_MANAGED;