babeld: fix bug due to v4mapped addresses.
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 6487bbe..0cf8c8a 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -708,7 +708,7 @@
struct interface *ifp = NULL;
struct prefix p;
p.family = v4mapped(prefix) ? AF_INET : AF_INET6;
- p.prefixlen = plen;
+ p.prefixlen = v4mapped(prefix) ? plen - 96 : plen;
if (p.family == AF_INET) {
uchar_to_inaddr(&p.u.prefix4, prefix);
} else {
@@ -730,7 +730,7 @@
struct interface *ifp = NULL;
struct prefix p;
p.family = v4mapped(prefix) ? AF_INET : AF_INET6;
- p.prefixlen = plen;
+ p.prefixlen = v4mapped(prefix) ? plen - 96 : plen;
if (p.family == AF_INET) {
uchar_to_inaddr(&p.u.prefix4, prefix);
} else {
@@ -752,7 +752,7 @@
struct interface *ifp = NULL;
struct prefix p;
p.family = v4mapped(prefix) ? AF_INET : AF_INET6;
- p.prefixlen = plen;
+ p.prefixlen = v4mapped(prefix) ? plen - 96 : plen;
if (p.family == AF_INET) {
uchar_to_inaddr(&p.u.prefix4, prefix);
} else {