diff options
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/hello.c | 32 |
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) { |