summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpe.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/ldpd/ldpe.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/ldpd/ldpe.c')
-rw-r--r--usr.sbin/ldpd/ldpe.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index c913d6e6d19..a65d1bef376 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.14 2011/01/10 12:28:25 claudio Exp $ */
+/* $OpenBSD: ldpe.c,v 1.15 2011/07/04 04:34:14 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -304,17 +304,12 @@ ldpe_dispatch_main(int fd, short event, void *bula)
fatalx("IFINFO imsg with wrong len");
kif = imsg.data;
link_new = (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(iface, &leconf->iface_list, entry) {
if (kif->ifindex == iface->ifindex) {
link_old = (iface->flags & IFF_UP) &&
- (LINK_STATE_IS_UP(iface->linkstate)
- || (iface->linkstate ==
- LINK_STATE_UNKNOWN &&
- iface->media_type != IFT_CARP));
+ LINK_STATE_IS_UP(iface->linkstate);
iface->flags = kif->flags;
iface->linkstate = kif->link_state;