From 6955a3ba9dc5d36487724878333a5745987e6656 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 Jan 2016 21:22:26 +0100 Subject: resolved: when checking whether a link is relevant, check kernel operstate This mimics what networkd is doing to detect a carrier. --- src/basic/missing.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/basic/missing.h') diff --git a/src/basic/missing.h b/src/basic/missing.h index c187afa287..6ed2133ed1 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1149,3 +1149,14 @@ static inline key_serial_t request_key(const char *type, const char *description #ifndef PR_CAP_AMBIENT_CLEAR_ALL #define PR_CAP_AMBIENT_CLEAR_ALL 4 #endif + +/* The following two defines are actually available in the kernel headers for longer, but we define them here anyway, + * since that makes it easier to use them in conjunction with the glibc net/if.h header which conflicts with + * linux/if.h. */ +#ifndef IF_OPER_UNKNOWN +#define IF_OPER_UNKNOWN 0 +#endif + +#ifndef IF_OPER_UP +#define IF_OPER_UP 6 +#endif -- cgit v1.2.3-54-g00ecf