summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2009-01-26 23:27:00 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2009-01-26 23:27:00 +0000
commit0540ecc42e2d573b1116b2fbe8b384ba45161b3f (patch)
treefaca8bb264b09e34f2e77a8560e7ecf6b6228d69 /usr.sbin
parentec8ad61fb05a49158f0436fcb997aac727b23a2b (diff)
RFC5340 says neighbours are identified solely by their router ID in OSPFv3,
regardless of link type. So don't ever use source addresses from the IP header to match known neighbours when receiving hello packets. ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospf6d/hello.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/usr.sbin/ospf6d/hello.c b/usr.sbin/ospf6d/hello.c
index 56fd8c8dd3f..39c16f79e87 100644
--- a/usr.sbin/ospf6d/hello.c
+++ b/usr.sbin/ospf6d/hello.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hello.c,v 1.11 2008/12/28 20:08:31 claudio Exp $ */
+/* $OpenBSD: hello.c,v 1.12 2009/01/26 23:26:59 stsp Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -160,30 +160,12 @@ recv_hello(struct iface *iface, struct in6_addr *src, u_int32_t rtr_id,
return;
}
- switch (iface->type) {
- case IF_TYPE_POINTOPOINT:
- case IF_TYPE_VIRTUALLINK:
- /* match router-id */
- LIST_FOREACH(nbr, &iface->nbr_list, entry) {
- if (nbr == iface->self)
- continue;
- if (nbr->id.s_addr == rtr_id)
- break;
- }
- break;
- case IF_TYPE_BROADCAST:
- case IF_TYPE_NBMA:
- case IF_TYPE_POINTOMULTIPOINT:
- /* match src IP */
- LIST_FOREACH(nbr, &iface->nbr_list, entry) {
- if (nbr == iface->self)
- continue;
- if (IN6_ARE_ADDR_EQUAL(&nbr->addr, src))
- break;
- }
- break;
- default:
- fatalx("recv_hello: unknown interface type");
+ /* match router-id */
+ LIST_FOREACH(nbr, &iface->nbr_list, entry) {
+ if (nbr == iface->self)
+ continue;
+ if (nbr->id.s_addr == rtr_id)
+ break;
}
if (!nbr) {