summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/kroute.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/kroute.c
parentb123b31e1495c195105e162f3a4d99c9154cf190 (diff)
Sync the link state check code with others daemons.
ok claudio@
Diffstat (limited to 'usr.sbin/dvmrpd/kroute.c')
-rw-r--r--usr.sbin/dvmrpd/kroute.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/dvmrpd/kroute.c b/usr.sbin/dvmrpd/kroute.c
index 05a60fddadc..e0dcd1a391b 100644
--- a/usr.sbin/dvmrpd/kroute.c
+++ b/usr.sbin/dvmrpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.5 2009/06/25 15:55:32 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.6 2009/09/22 16:43:42 michele Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -241,7 +241,9 @@ if_change(u_short ifindex, int flags, struct if_data *ifd)
kif->k.baudrate = ifd->ifi_baudrate;
if ((reachable = (flags & IFF_UP) &&
- (ifd->ifi_link_state != LINK_STATE_DOWN)) == kif->k.nh_reachable)
+ (LINK_STATE_IS_UP(ifd->ifi_link_state) ||
+ (ifd->ifi_link_state == LINK_STATE_UNKNOWN &&
+ ifd->ifi_type != IFT_CARP))) == kif->k.nh_reachable)
return; /* nothing changed wrt nexthop validity */
kif->k.nh_reachable = reachable;