From 55edb0d446a272907715b0825ff008557174d34a Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 11 Jan 2008 15:57:13 +0000 Subject: [link-detect] Improve BSD support. 2008-01-11 Andrew J. Schorr * lib/zebra.h: Revert previous change, no need to include here. * zebra/ioctl.c: If HAVE_BSD_LINK_DETECT is defined, include (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. --- zebra/kernel_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zebra/kernel_socket.c') 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); -- cgit v1.2.1