summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/kroute.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/kroute.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/kroute.c')
-rw-r--r--usr.sbin/ospfd/kroute.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c
index 5449ea46704..67c4414f140 100644
--- a/usr.sbin/ospfd/kroute.c
+++ b/usr.sbin/ospfd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.89 2011/01/12 15:07:46 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.90 2011/07/04 04:34:14 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -842,9 +842,7 @@ kif_update(u_short ifindex, int flags, struct if_data *ifd,
if ((kif = kif_insert(ifindex)) == NULL)
return (NULL);
kif->k.nh_reachable = (flags & IFF_UP) &&
- (LINK_STATE_IS_UP(ifd->ifi_link_state) ||
- (ifd->ifi_link_state == LINK_STATE_UNKNOWN &&
- ifd->ifi_type != IFT_CARP));
+ LINK_STATE_IS_UP(ifd->ifi_link_state);
}
kif->k.flags = flags;
@@ -986,9 +984,7 @@ if_change(u_short ifindex, int flags, struct if_data *ifd,
}
reachable = (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);
if (reachable == kif->nh_reachable)
return; /* nothing changed wrt nexthop validity */