From f25cb0ef9f6341648513e793a3162b32fc250d2b Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 11 Nov 2010 10:03:02 +0100 Subject: Implements link state detection. Also changes some symbol names (IFF_ADMIN_DOWN -> IFF_SHUTDOWN, IFF_LINK_UP -> IFF_ADMIN_UP). --- sysdep/unix/krt-iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdep/unix') 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; } -- cgit v1.2.3