diff options
Diffstat (limited to 'nest')
-rw-r--r-- | nest/neighbor.c | 8 |
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; } } |