diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-11-28 19:21:17 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-11-28 19:21:17 +0000 |
commit | 42dc4672e2746e5183c5a29733c654f4a9644cce (patch) | |
tree | df76318348d55acb95fe86483447a0ed376640df /usr.sbin/ospfd/kroute.c | |
parent | 0e1919712e2589382b2029732a09c5ce9488a2cb (diff) |
add additional link states to report the half duplex / full duplex
state, if known by the driver. this is required to check the full
duplex state without depending on the ifmedia ioctl which can't be
called in the kernel without process context.
ok henning@, brad@
Diffstat (limited to 'usr.sbin/ospfd/kroute.c')
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index cb74def38fc..ee0ae0d9a9d 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.36 2006/11/28 16:36:58 henning Exp $ */ +/* $OpenBSD: kroute.c,v 1.37 2006/11/28 19:21:15 reyk Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -674,7 +674,7 @@ 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_UP || + (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 */ @@ -967,7 +967,7 @@ fetchifs(int ifindex) kif->k.baudrate = ifm->ifm_data.ifi_baudrate; kif->k.mtu = ifm->ifm_data.ifi_mtu; kif->k.nh_reachable = (kif->k.flags & IFF_UP) && - (ifm->ifm_data.ifi_link_state == LINK_STATE_UP || + (LINK_STATE_IS_UP(ifm->ifm_data.ifi_link_state) || (ifm->ifm_data.ifi_link_state == LINK_STATE_UNKNOWN && ifm->ifm_data.ifi_type != IFT_CARP)); |