summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/interface.c
diff options
context:
space:
mode:
authorMichele Marchetto <michele@cvs.openbsd.org>2009-09-22 16:43:43 +0000
committerMichele Marchetto <michele@cvs.openbsd.org>2009-09-22 16:43:43 +0000
commit29b5fe1f11dd66f7aa21d666baa9eb162e6ded0b (patch)
tree96c2cefc4ba94af43e251c7f979104b0b396561a /usr.sbin/dvmrpd/interface.c
parentb123b31e1495c195105e162f3a4d99c9154cf190 (diff)
Sync the link state check code with others daemons.
ok claudio@
Diffstat (limited to 'usr.sbin/dvmrpd/interface.c')
-rw-r--r--usr.sbin/dvmrpd/interface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/dvmrpd/interface.c b/usr.sbin/dvmrpd/interface.c
index 28331ec8b73..55d00027de3 100644
--- a/usr.sbin/dvmrpd/interface.c
+++ b/usr.sbin/dvmrpd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.8 2009/03/06 18:39:13 michele Exp $ */
+/* $OpenBSD: interface.c,v 1.9 2009/09/22 16:43:42 michele Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -26,6 +26,7 @@
#include <netinet/ip_mroute.h>
#include <arpa/inet.h>
#include <net/if.h>
+#include <net/if_types.h>
#include <ctype.h>
#include <err.h>
@@ -384,7 +385,9 @@ if_act_start(struct iface *iface)
}
if (!((iface->flags & IFF_UP) &&
- (iface->linkstate != LINK_STATE_DOWN))) {
+ (LINK_STATE_IS_UP(iface->linkstate) ||
+ (iface->linkstate == LINK_STATE_UNKNOWN &&
+ iface->media_type != IFT_CARP)))) {
log_debug("if_act_start: interface %s link down",
iface->name);
return (0);