From: Martin Xu Date: Wed, 9 Mar 2011 08:16:49 +0000 (+0800) Subject: tethering: Using /proc/sys/net/bridge to detect the support of bridge X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~1660 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=660fe70ab835371028143bfee391eed941620fc3;p=profile%2Fivi%2Fconnman.git tethering: Using /proc/sys/net/bridge to detect the support of bridge If bridge is built in kernel, /sys/module/bridge can not be used to detect the support of bridge. --- diff --git a/src/tethering.c b/src/tethering.c index 705f5ee..27f4b0d 100644 --- a/src/tethering.c +++ b/src/tethering.c @@ -35,7 +35,7 @@ #include -#define BRIDGE_SYSFS_DIR "/sys/module/bridge" +#define BRIDGE_PROC_DIR "/proc/sys/net/bridge" #define BRIDGE_NAME "tether" #define BRIDGE_IP "192.168.218.1" @@ -53,7 +53,7 @@ const char *__connman_tethering_get_bridge(void) { struct stat st; - if (stat(BRIDGE_SYSFS_DIR, &st) < 0) { + if (stat(BRIDGE_PROC_DIR, &st) < 0) { connman_error("Missing support for 802.1d ethernet bridging"); return NULL; }