From aa987a9aea8a69d172bee003261abe7859a5ad7d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 26 Feb 2008 05:29:33 +0100 Subject: [PATCH] Detect bridge interfaces and ignore them --- plugins/80203.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/80203.c b/plugins/80203.c index d916c97..b4d6745 100644 --- a/plugins/80203.c +++ b/plugins/80203.c @@ -24,14 +24,24 @@ #endif #include +#include +#include #include #include static int iface_probe(struct connman_iface *iface) { + char sysfs_path[PATH_MAX]; + struct stat st; + printf("[802.03] probe interface index %d\n", iface->index); + snprintf(sysfs_path, PATH_MAX, "%s/bridge", iface->sysfs); + + if (stat(sysfs_path, &st) == 0 && (st.st_mode & S_IFDIR)) + return -ENODEV; + iface->type = CONNMAN_IFACE_TYPE_80203; iface->flags = CONNMAN_IFACE_FLAG_RTNL | -- 2.7.4