return __connman_error_in_progress(msg);
bridge = __connman_tethering_get_bridge();
+ if (bridge == NULL)
+ return __connman_error_not_supported(msg);
err = set_tethering(technology, bridge, tethering);
if (err < 0)
#include <config.h>
#endif
+#include <sys/types.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <gdhcp/gdhcp.h>
+#define BRIDGE_SYSFS_DIR "/sys/module/bridge"
+
#define BRIDGE_NAME "tether"
#define BRIDGE_IP "192.168.218.1"
#define BRIDGE_BCAST "192.168.218.255"
const char *__connman_tethering_get_bridge(void)
{
+ struct stat st;
+
+ if (stat(BRIDGE_SYSFS_DIR, &st) < 0) {
+ connman_error("Missing support for 802.1d ethernet bridging");
+ return NULL;
+ }
+
return BRIDGE_NAME;
}