summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/ospfe.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 04:34:15 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 04:34:15 +0000
commite03be1c13da2627f88815c4221fd7aea1ef8f515 (patch)
treea68cb661597a54bfac8799839218986aea79977e /usr.sbin/ospfd/ospfe.c
parent6558208a6b4fc7625013eefd861685b315297077 (diff)
LINK_STATE_IS_UP() cleanup userland part. There is no need to special
case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does the right job. OK deraadt@ henning@ This needs a -current kernel or link state may be not reported correctly.
Diffstat (limited to 'usr.sbin/ospfd/ospfe.c')
-rw-r--r--usr.sbin/ospfd/ospfe.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c
index 969c1b0e967..81d997cb4ba 100644
--- a/usr.sbin/ospfd/ospfe.c
+++ b/usr.sbin/ospfd/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.82 2011/05/09 12:24:41 claudio Exp $ */
+/* $OpenBSD: ospfe.c,v 1.83 2011/07/04 04:34:14 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -296,10 +296,7 @@ ospfe_dispatch_main(int fd, short event, void *bula)
fatalx("IFINFO imsg with wrong len");
kif = imsg.data;
link_ok = (kif->flags & IFF_UP) &&
- (LINK_STATE_IS_UP(kif->link_state) ||
- (kif->link_state == LINK_STATE_UNKNOWN &&
- kif->media_type != IFT_CARP));
-
+ LINK_STATE_IS_UP(kif->link_state);
LIST_FOREACH(area, &oeconf->area_list, entry) {
LIST_FOREACH(iface, &area->iface_list, entry) {
@@ -860,17 +857,10 @@ orig_rtr_lsa(struct area *area)
/*
* do not add a stub net LSA for interfaces that are:
* - down
- * - have a linkstate which is down and are not carp
- * - have a linkstate unknown and are carp
- * carp uses linkstate down for backup and unknown
- * in cases where a major fubar happend.
+ * - have a linkstate which is down
*/
if (!(iface->flags & IFF_UP) ||
- (iface->media_type != IFT_CARP &&
- !(LINK_STATE_IS_UP(iface->linkstate) ||
- iface->linkstate == LINK_STATE_UNKNOWN)) ||
- (iface->media_type == IFT_CARP &&
- iface->linkstate == LINK_STATE_UNKNOWN))
+ !LINK_STATE_IS_UP(iface->linkstate))
continue;
log_debug("orig_rtr_lsa: stub net, "
"interface %s", iface->name);