summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-04-28 00:39:57 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-04-28 00:39:57 +0200
commitba321706578de8402d50214a9e79a65835cdd821 (patch)
treea76b5e241ed7f7c698890f2f9fd26a3c35ed07b2 /nest
parent48b0814ace2d05f9fef093d9f309bfa186a6f365 (diff)
downloadbird-ba321706578de8402d50214a9e79a65835cdd821.tar
bird-ba321706578de8402d50214a9e79a65835cdd821.zip
Better support for /31 networks.
Diffstat (limited to 'nest')
-rw-r--r--nest/neighbor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nest/neighbor.c b/nest/neighbor.c
index 25b98db..7e7cc49 100644
--- a/nest/neighbor.c
+++ b/nest/neighbor.c
@@ -75,9 +75,13 @@ if_connected(ip_addr *a, struct iface *i) /* -1=error, 1=match, 0=no match */
{
if (ipa_in_net(*a, b->prefix, b->pxlen))
{
- if (ipa_equal(*a, b->prefix) || /* Network address */
- ipa_equal(*a, b->brd)) /* Broadcast */
+#ifndef IPV6
+ if ((b->pxlen < (BITS_PER_IP_ADDRESS - 1)) &&
+ (ipa_equal(*a, b->prefix) || /* Network address */
+ ipa_equal(*a, b->brd))) /* Broadcast */
return -1;
+#endif
+
return b->scope;
}
}