summaryrefslogtreecommitdiffstats
path: root/sysdep/unix
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-11-11 10:03:02 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-11-11 10:03:02 +0100
commitf25cb0ef9f6341648513e793a3162b32fc250d2b (patch)
tree393dbeeecd58fdb1cfcbafd26ce771f20376bf15 /sysdep/unix
parent5cdf264f937687aff194574f5fe2badb087337b8 (diff)
downloadbird-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/unix')
-rw-r--r--sysdep/unix/krt-iface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/krt-iface.c b/sysdep/unix/krt-iface.c
index 5fda0d1..c305d27 100644
--- a/sysdep/unix/krt-iface.c
+++ b/sysdep/unix/krt-iface.c
@@ -78,12 +78,12 @@ scan_ifs(struct ifreq *r, int cnt)
faulty:
log(L_ERR "%s(%s): %m", err, i.name);
bad:
- i.flags = (i.flags & ~IF_LINK_UP) | IF_ADMIN_DOWN;
+ i.flags = (i.flags & ~IF_ADMIN_UP) | IF_SHUTDOWN;
continue;
}
fl = r->ifr_flags;
if (fl & IFF_UP)
- i.flags |= IF_LINK_UP;
+ i.flags |= IF_ADMIN_UP;
if (ioctl(if_scan_sock, SIOCGIFNETMASK, r) < 0)
{ err = "SIOCGIFNETMASK"; goto faulty; }