summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-08-07 07:51:29 +0200
committerSteven Barth <steven@midlink.org>2014-08-07 07:51:29 +0200
commitc0c1086c51e1abfc991de11e3d687a60240d2df8 (patch)
tree12f646d8323cac248b83027fa48e0ab2f544c56b
parentac448deb59fc9ed2f19a3549d521ab796ae6ca47 (diff)
ra: don't send MSR for /64 prefix if DP is /64 as well
-rw-r--r--src/router.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/router.c b/src/router.c
index f8ba5d7..a45a8cb 100644
--- a/src/router.c
+++ b/src/router.c
@@ -410,7 +410,8 @@ static void send_router_advert(struct uloop_timeout *event)
for (ssize_t i = 0; i < ipcnt; ++i) {
struct odhcpd_ipaddr *addr = &addrs[i];
- if (addr->dprefix > 64 || addr->dprefix == 0) {
+ if (addr->dprefix > 64 || addr->dprefix == 0 ||
+ (addr->dprefix == 64 && addr->prefix == 64)) {
continue; // Address not suitable
} else if (addr->dprefix > 32) {
addr->addr.s6_addr32[1] &= htonl(~((1U << (64 - addr->dprefix)) - 1));