summaryrefslogtreecommitdiff
path: root/lib/ipv6.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-09-24 11:06:42 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-09-24 11:06:42 +0200
commitbf6d91dc4edf3d08f0de41f71503159b1713fc9a (patch)
treeaaf769128412c4ad1c56f0f373b88f10e37a8ddf /lib/ipv6.c
parent4116db182d8d80d26902a8b33f82664bb5770066 (diff)
Use undefined scope for undefined IPv6 addresses.
Diffstat (limited to 'lib/ipv6.c')
-rw-r--r--lib/ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ipv6.c b/lib/ipv6.c
index 7c28c48a..623f6328 100644
--- a/lib/ipv6.c
+++ b/lib/ipv6.c
@@ -85,6 +85,7 @@ ipv6_classify(ip_addr *a)
case 5: return IADDR_MULTICAST | SCOPE_SITE;
case 8: return IADDR_MULTICAST | SCOPE_ORGANIZATION;
case 14: return IADDR_MULTICAST | SCOPE_UNIVERSE;
+ default: return IADDR_MULTICAST | SCOPE_UNDEFINED;
}
}
if (!x && !a->addr[1] && !a->addr[2])
@@ -102,7 +103,7 @@ ipv6_classify(ip_addr *a)
if (y >= 0x01000000 && y < 0xe0000000)
return IADDR_HOST | SCOPE_UNIVERSE;
}
- return IADDR_INVALID;
+ return IADDR_HOST | SCOPE_UNDEFINED;
}
void