summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-04-18 14:09:47 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-04-18 14:16:24 +0200
commitdcfc06a7cf32e21ae575ea491ba0206844596516 (patch)
tree1a0905e981218eafa5dd0a7f5919a70f8114c07b /src/router.c
parent31f217fc9ddfaf9de04e2ee75fbbac421c0db4f2 (diff)
router: fix managed address configuration setting
Don't announce managed address configuration in case DHCPv6 is disabled Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/router.c b/src/router.c
index e9919b2..79b688a 100644
--- a/src/router.c
+++ b/src/router.c
@@ -314,11 +314,12 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
if (hlim > 0)
adv.h.nd_ra_curhoplimit = hlim;
- if (iface->dhcpv6)
+ if (iface->dhcpv6) {
adv.h.nd_ra_flags_reserved = ND_RA_FLAG_OTHER;
- if (iface->ra_managed >= RA_MANAGED_MFLAG)
- adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_MANAGED;
+ if (iface->ra_managed >= RA_MANAGED_MFLAG)
+ adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_MANAGED;
+ }
if (iface->route_preference < 0)
adv.h.nd_ra_flags_reserved |= ND_RA_PREF_LOW;