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/unix/krt-iface.c | |
parent | 5cdf264f937687aff194574f5fe2badb087337b8 (diff) |
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/krt-iface.c')
-rw-r--r-- | sysdep/unix/krt-iface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/krt-iface.c b/sysdep/unix/krt-iface.c index 5fda0d1d..c305d27a 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; } |