diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-11 10:03:02 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-11 10:03:02 +0100 |
commit | f25cb0ef9f6341648513e793a3162b32fc250d2b (patch) | |
tree | 393dbeeecd58fdb1cfcbafd26ce771f20376bf15 /sysdep/bsd | |
parent | 5cdf264f937687aff194574f5fe2badb087337b8 (diff) | |
download | bird-f25cb0ef9f6341648513e793a3162b32fc250d2b.tar bird-f25cb0ef9f6341648513e793a3162b32fc250d2b.zip |
Implements link state detection.
Also changes some symbol names (IFF_ADMIN_DOWN -> IFF_SHUTDOWN,
IFF_LINK_UP -> IFF_ADMIN_UP).
Diffstat (limited to 'sysdep/bsd')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 9ae658d..53b30ca 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -456,7 +456,9 @@ krt_read_ifinfo(struct ks_msg *msg) f.flags = 0; if (fl & IFF_UP) - f.flags |= IF_LINK_UP; + f.flags |= IF_ADMIN_UP; + if (ifm->ifm_data.ifi_link_state != LINK_STATE_DOWN) + f.flags |= IF_LINK_UP; /* up or unknown */ if (fl & IFF_LOOPBACK) /* Loopback */ f.flags |= IF_MULTIACCESS | IF_LOOPBACK | IF_IGNORE; else if (fl & IFF_POINTOPOINT) /* PtP */ |