summaryrefslogtreecommitdiffstats
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorajs <ajs>2008-01-11 15:57:13 +0000
committerajs <ajs>2008-01-11 15:57:13 +0000
commit033305144d57b98416df160adf3f050cd7c20b35 (patch)
treef0e0d2a68a5e8acddff3a89bc35c45a82d8a9005 /zebra/kernel_socket.c
parent1e70bfb680354e1ea007618851a16166d9397393 (diff)
downloadquagga-033305144d57b98416df160adf3f050cd7c20b35.tar.bz2
quagga-033305144d57b98416df160adf3f050cd7c20b35.tar.xz
[link-detect] Improve BSD support.
2008-01-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * lib/zebra.h: Revert previous change, no need to include <net/if_media.h> here. * zebra/ioctl.c: If HAVE_BSD_LINK_DETECT is defined, include <net/if_media.h> (if_get_flags) Remove debug messages about BSD link state. * zebra/kernel_socket.c: (bsd_linkdetect_translate) If link state is unknown, we should set the IFF_RUNNING flag.
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index cd30631b..2e04b031 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -300,7 +300,8 @@ ifan_read (struct if_announcemsghdr *ifan)
static void
bsd_linkdetect_translate (struct if_msghdr *ifm)
{
- if (ifm->ifm_data.ifi_link_state >= LINK_STATE_UP)
+ if ((ifm->ifm_data.ifi_link_state >= LINK_STATE_UP) ||
+ (ifm->ifm_data.ifi_link_state == LINK_STATE_UNKNOWN))
SET_FLAG(ifm->ifm_flags, IFF_RUNNING);
else
UNSET_FLAG(ifm->ifm_flags, IFF_RUNNING);