[PATCH 2/3] doc: Update connman.conf.5 about PassiveWiFiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 doc/connman.conf.5 | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/doc/connman.conf.5 b/doc/connman.conf.5
index 626edfd..c2adbec 100644
--- a/doc/connman.conf.5
+++ b/doc/connman.conf.5
@@ -126,5 +126,12 @@ really know what you are doing.
 Restore earlier tethering status when returning from offline mode,
 re-enabling a technology, and after restarts and reboots.
 Default value is false.
+.TP
+.B PassiveWiFiScan=\fPtrue|false\fP
+Enable passive only scanning for WiFi in case of
+one does not want to reveal SSIDs for currently configured 
+services. Only exception being that with hidden networks 
+the initial connection will still do an active scan.
+Default value is false.
 .SH SEE ALSO
 .BR Connman (8)
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH v2 0/4] Introduce PassiveWifiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

Here are the patches promised long time ago to make
it possible to use passive scanning instead of 
the active. 

The actual change is pretty simple one. :)

Pasi Sjöholm (4):
  main: Add support for PassiveWifiScan configuration variable
  wifi: Do passive scanning when PassiveWiFiScan is true
  doc: Update connman.conf.5 about PassiveWiFiScan
  main.conf: Add example PassiveWiFiScan

 doc/connman.conf.5 |  7 +++
 plugins/wifi.c |  2 +-
 src/main.c | 15 +++
 src/main.conf  |  6 ++
 4 files changed, 29 insertions(+), 1 deletion(-)

-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 4/4] main.conf: Add example PassiveWiFiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 src/main.conf | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/main.conf b/src/main.conf
index 93c7a50..b553523 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -95,3 +95,9 @@
 # re-enabling a technology, and after restarts and reboots.
 # Default value is false.
 # PersistentTetheringMode = false
+
+# Enable passive only scanning for WiFi in case of
+# one does not want to reveal SSIDs for currently configured 
+# services. Only exception being that with hidden networks 
+# the initial connection will still do an active scan.
+# PassiveWiFiScan = false
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 3/4] doc: Update connman.conf.5 about PassiveWiFiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 doc/connman.conf.5 | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/doc/connman.conf.5 b/doc/connman.conf.5
index 626edfd..c2adbec 100644
--- a/doc/connman.conf.5
+++ b/doc/connman.conf.5
@@ -126,5 +126,12 @@ really know what you are doing.
 Restore earlier tethering status when returning from offline mode,
 re-enabling a technology, and after restarts and reboots.
 Default value is false.
+.TP
+.B PassiveWiFiScan=\fPtrue|false\fP
+Enable passive only scanning for WiFi in case of
+one does not want to reveal SSIDs for currently configured 
+services. Only exception being that with hidden networks 
+the initial connection will still do an active scan.
+Default value is false.
 .SH SEE ALSO
 .BR Connman (8)
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 2/4] wifi: Do passive scanning when PassiveWiFiScan is true

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

Do passive scanning instead of active to avoid revealing
the SSID's of services have been configured.
---
 plugins/wifi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 42dd407..0fecee7 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1820,7 +1820,7 @@ static int wifi_scan(enum connman_service_type type,
 
return 0;
}
-   } else if (wifi-connected) {
+   } else if (wifi-connected || 
connman_setting_get_bool(PassiveWiFiScan)) {
g_supplicant_free_scan_params(scan_params);
return wifi_scan_simple(device);
} else {
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 1/4] main: Add support for PassiveWifiScan configuration variable

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 src/main.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/src/main.c b/src/main.c
index 1c17991..21c6121 100644
--- a/src/main.c
+++ b/src/main.c
@@ -73,6 +73,7 @@ static struct {
bool single_tech;
char **tethering_technologies;
bool persistent_tethering_mode;
+   bool passive_wifi_scan;
 } connman_settings  = {
.bg_scan = true,
.pref_timeservers = NULL,
@@ -86,6 +87,7 @@ static struct {
.single_tech = false,
.tethering_technologies = NULL,
.persistent_tethering_mode = false,
+   .passive_wifi_scan = false,
 };
 
 #define CONF_BG_SCANBackgroundScanning
@@ -100,6 +102,7 @@ static struct {
 #define CONF_SINGLE_TECHSingleConnectedTechnology
 #define CONF_TETHERING_TECHNOLOGIES  TetheringTechnologies
 #define CONF_PERSISTENT_TETHERING_MODE  PersistentTetheringMode
+#define CONF_PASSIVE_WIFI_SCAN PassiveWiFiScan
 
 static const char *supported_options[] = {
CONF_BG_SCAN,
@@ -114,6 +117,7 @@ static const char *supported_options[] = {
CONF_SINGLE_TECH,
CONF_TETHERING_TECHNOLOGIES,
CONF_PERSISTENT_TETHERING_MODE,
+   CONF_PASSIVE_WIFI_SCAN,
NULL
 };
 
@@ -354,6 +358,14 @@ static void parse_config(GKeyFile *config)
connman_settings.persistent_tethering_mode = boolean;
 
g_clear_error(error);
+
+   boolean = __connman_config_get_bool(config, General,
+   CONF_PASSIVE_WIFI_SCAN,
+   error);
+   if (!error)
+   connman_settings.passive_wifi_scan = boolean;
+
+   g_clear_error(error);
 }
 
 static int config_init(const char *file)
@@ -528,6 +540,9 @@ bool connman_setting_get_bool(const char *key)
if (g_str_equal(key, CONF_PERSISTENT_TETHERING_MODE))
return connman_settings.persistent_tethering_mode;
 
+   if (g_str_equal(key, CONF_PASSIVE_WIFI_SCAN))
+   return connman_settings.passive_wifi_scan;
+
return false;
 }
 
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Re: [PATCH 1/3] wifi: Introduce PassiveWiFiScan option

2015-04-24 Thread Tomasz Bursztyka

Hi Pasi,


-   } else if (wifi-connected) {
+   } else if (wifi-connected || 
connman_setting_get_bool(PassiveWiFiScan)) {
g_supplicant_free_scan_params(scan_params);
return wifi_scan_simple(device);


If you use PassiveWiFiScan only here, then you are still using active 
scan for auto-connection

- so still leaking SSIDs - when not connected.

Is this a wanted behavior? Because then PassiveWiFiScan is semantically 
wrong as it does

not really completely avoid active scan.

Tomasz
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH 1/3] wifi: Introduce PassiveWiFiScan option

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

Makes it possible to only do passive scanning so that the
SSIDs are not revealed during the scans.
---
 plugins/wifi.c |  2 +-
 src/main.c | 15 +++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 42dd407..0fecee7 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1820,7 +1820,7 @@ static int wifi_scan(enum connman_service_type type,
 
return 0;
}
-   } else if (wifi-connected) {
+   } else if (wifi-connected || 
connman_setting_get_bool(PassiveWiFiScan)) {
g_supplicant_free_scan_params(scan_params);
return wifi_scan_simple(device);
} else {
diff --git a/src/main.c b/src/main.c
index 1c17991..21c6121 100644
--- a/src/main.c
+++ b/src/main.c
@@ -73,6 +73,7 @@ static struct {
bool single_tech;
char **tethering_technologies;
bool persistent_tethering_mode;
+   bool passive_wifi_scan;
 } connman_settings  = {
.bg_scan = true,
.pref_timeservers = NULL,
@@ -86,6 +87,7 @@ static struct {
.single_tech = false,
.tethering_technologies = NULL,
.persistent_tethering_mode = false,
+   .passive_wifi_scan = false,
 };
 
 #define CONF_BG_SCANBackgroundScanning
@@ -100,6 +102,7 @@ static struct {
 #define CONF_SINGLE_TECHSingleConnectedTechnology
 #define CONF_TETHERING_TECHNOLOGIES  TetheringTechnologies
 #define CONF_PERSISTENT_TETHERING_MODE  PersistentTetheringMode
+#define CONF_PASSIVE_WIFI_SCAN PassiveWiFiScan
 
 static const char *supported_options[] = {
CONF_BG_SCAN,
@@ -114,6 +117,7 @@ static const char *supported_options[] = {
CONF_SINGLE_TECH,
CONF_TETHERING_TECHNOLOGIES,
CONF_PERSISTENT_TETHERING_MODE,
+   CONF_PASSIVE_WIFI_SCAN,
NULL
 };
 
@@ -354,6 +358,14 @@ static void parse_config(GKeyFile *config)
connman_settings.persistent_tethering_mode = boolean;
 
g_clear_error(error);
+
+   boolean = __connman_config_get_bool(config, General,
+   CONF_PASSIVE_WIFI_SCAN,
+   error);
+   if (!error)
+   connman_settings.passive_wifi_scan = boolean;
+
+   g_clear_error(error);
 }
 
 static int config_init(const char *file)
@@ -528,6 +540,9 @@ bool connman_setting_get_bool(const char *key)
if (g_str_equal(key, CONF_PERSISTENT_TETHERING_MODE))
return connman_settings.persistent_tethering_mode;
 
+   if (g_str_equal(key, CONF_PASSIVE_WIFI_SCAN))
+   return connman_settings.passive_wifi_scan;
+
return false;
 }
 
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 0/3] Introduce PassiveWifiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

Here are the patches promised long time ago to make
it possible to use passive scanning instead of 
the active. 

The actual change is pretty simple one. :)

Pasi Sjöholm (3):
  wifi: Introduce PassiveWiFiScan option
  doc: Update connman.conf.5 about PassiveWiFiScan
  main.conf: Add example PassiveWiFiScan

 doc/connman.conf.5 |  7 +++
 plugins/wifi.c |  2 +-
 src/main.c | 15 +++
 src/main.conf  |  6 ++
 4 files changed, 29 insertions(+), 1 deletion(-)

-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 3/3] main.conf: Add example PassiveWiFiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 src/main.conf | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/main.conf b/src/main.conf
index 93c7a50..b553523 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -95,3 +95,9 @@
 # re-enabling a technology, and after restarts and reboots.
 # Default value is false.
 # PersistentTetheringMode = false
+
+# Enable passive only scanning for WiFi in case of
+# one does not want to reveal SSIDs for currently configured 
+# services. Only exception being that with hidden networks 
+# the initial connection will still do an active scan.
+# PassiveWiFiScan = false
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Re: [PATCH 2/3] doc: Update connman.conf.5 about PassiveWiFiScan

2015-04-24 Thread Tomasz Bursztyka

Hi Pasi,


+.B PassiveWiFiScan=\fPtrue|false\fP
+Enable passive only scanning for WiFi in case of
+one does not want to reveal SSIDs for currently configured
+services. Only exception being that with hidden networks
+the initial connection will still do an active scan.
+Default value is false.


Add also that if enabled, this will prevent auto-connecting to know 
hidden network.

Thus forcing the user to always connect manually to an hidden network.

Tomasz
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 1/3] wifi: Introduce PassiveWiFiScan option

2015-04-24 Thread Pasi Sjöholm
Hi Tomasz,

 -} else if (wifi-connected) { +} else if
 (wifi-connected || connman_setting_get_bool(PassiveWiFiScan))
 { g_supplicant_free_scan_params(scan_params); return
 wifi_scan_simple(device);
 
 If you use PassiveWiFiScan only here, then you are still using
 active scan for auto-connection - so still leaking SSIDs - when not
 connected.

Yes, for hidden networks but not for anything else.

 Is this a wanted behavior? Because then PassiveWiFiScan is
 semantically wrong as it does not really completely avoid active
 scan.

Well, I would say yes because the hidden networks are just
fundamentally broken. I can rename PassiveWifiScan into something else.

Br,
Pasi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH] device: Add configurable DontBringDownAtStartup list

2015-04-24 Thread Slava Monich
connman brings down managed interfaces at startup. Sometimes it's unnecessary
or even harmful. DontBringDownAtStartup list in main.conf allows to make
exceptions for some interfaces.
---
 src/device.c | 21 +
 src/main.c   | 17 +
 2 files changed, 38 insertions(+)

diff --git a/src/device.c b/src/device.c
index c0683ab..03eac39 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1367,6 +1367,24 @@ list:
return false;
 }
 
+static bool can_bring_down(const char *devname)
+{
+   char **pattern =
+   connman_setting_get_string_list(DontBringDownAtStartup);
+
+   if (pattern) {
+   while (*pattern) {
+   if (g_str_has_prefix(devname, *pattern++)) {
+   DBG(%s no, devname);
+   return false;
+   }
+   }
+   }
+
+   DBG(%s yes, devname);
+   return true;
+}
+
 static void cleanup_devices(void)
 {
/*
@@ -1399,6 +1417,9 @@ static void cleanup_devices(void)
if (filtered)
continue;
 
+   if (!can_bring_down(interfaces[i]))
+   continue;
+
index = connman_inet_ifindex(interfaces[i]);
if (index  0)
continue;
diff --git a/src/main.c b/src/main.c
index 1c17991..52209f4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -73,6 +73,7 @@ static struct {
bool single_tech;
char **tethering_technologies;
bool persistent_tethering_mode;
+   char **dont_bring_down_at_startup;
 } connman_settings  = {
.bg_scan = true,
.pref_timeservers = NULL,
@@ -86,6 +87,7 @@ static struct {
.single_tech = false,
.tethering_technologies = NULL,
.persistent_tethering_mode = false,
+   .dont_bring_down_at_startup = NULL,
 };
 
 #define CONF_BG_SCANBackgroundScanning
@@ -100,6 +102,7 @@ static struct {
 #define CONF_SINGLE_TECHSingleConnectedTechnology
 #define CONF_TETHERING_TECHNOLOGIES  TetheringTechnologies
 #define CONF_PERSISTENT_TETHERING_MODE  PersistentTetheringMode
+#define CONF_DONT_BRING_DOWN_AT_STARTUP DontBringDownAtStartup
 
 static const char *supported_options[] = {
CONF_BG_SCAN,
@@ -114,6 +117,7 @@ static const char *supported_options[] = {
CONF_SINGLE_TECH,
CONF_TETHERING_TECHNOLOGIES,
CONF_PERSISTENT_TETHERING_MODE,
+   CONF_DONT_BRING_DOWN_AT_STARTUP,
NULL
 };
 
@@ -236,6 +240,7 @@ static void parse_config(GKeyFile *config)
char **interfaces;
char **str_list;
char **tethering;
+   char **dontbringdown;
gsize len;
int timeout;
 
@@ -347,6 +352,14 @@ static void parse_config(GKeyFile *config)
 
g_clear_error(error);
 
+   dontbringdown = __connman_config_get_string_list(config, General,
+   CONF_DONT_BRING_DOWN_AT_STARTUP, len, error);
+
+   if (!error)
+   connman_settings.dont_bring_down_at_startup = dontbringdown;
+
+   g_clear_error(error);
+
boolean = __connman_config_get_bool(config, General,
CONF_PERSISTENT_TETHERING_MODE,
error);
@@ -545,6 +558,9 @@ char **connman_setting_get_string_list(const char *key)
if (g_str_equal(key, CONF_TETHERING_TECHNOLOGIES))
return connman_settings.tethering_technologies;
 
+   if (g_str_equal(key, CONF_DONT_BRING_DOWN_AT_STARTUP))
+   return connman_settings.dont_bring_down_at_startup;
+
return NULL;
 }
 
@@ -747,6 +763,7 @@ int main(int argc, char *argv[])
g_strfreev(connman_settings.fallback_nameservers);
g_strfreev(connman_settings.blacklisted_interfaces);
g_strfreev(connman_settings.tethering_technologies);
+   g_strfreev(connman_settings.dont_bring_down_at_startup);
 
g_free(option_debug);
g_free(option_wifi);
-- 
1.8.3.2

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH 4/4] main.conf: Add example PassiveWiFiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 src/main.conf | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/main.conf b/src/main.conf
index 93c7a50..c3b0728 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -95,3 +95,9 @@
 # re-enabling a technology, and after restarts and reboots.
 # Default value is false.
 # PersistentTetheringMode = false
+
+# Enable passive only scanning for WiFi in case of
+# one does not want to reveal SSIDs for currently configured
+# services. Only exception being hidden networks which will
+# be still actively scanned when not connected to any WiFi network.
+# PassiveWiFiScan = false
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 3/4] doc: Update connman.conf.5 about PassiveWiFiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 doc/connman.conf.5 | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/doc/connman.conf.5 b/doc/connman.conf.5
index 626edfd..f017628 100644
--- a/doc/connman.conf.5
+++ b/doc/connman.conf.5
@@ -126,5 +126,12 @@ really know what you are doing.
 Restore earlier tethering status when returning from offline mode,
 re-enabling a technology, and after restarts and reboots.
 Default value is false.
+.TP
+.B PassiveWiFiScan=\fPtrue|false\fP
+Enable passive only scanning for WiFi in case of
+one does not want to reveal SSIDs for currently configured
+services. Only exception being hidden networks which will
+be still actively scanned when not connected to any WiFi network.
+Default value is false.
 .SH SEE ALSO
 .BR Connman (8)
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 1/4] main: Add support for PassiveWifiScan configuration variable

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

---
 src/main.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/src/main.c b/src/main.c
index 1c17991..21c6121 100644
--- a/src/main.c
+++ b/src/main.c
@@ -73,6 +73,7 @@ static struct {
bool single_tech;
char **tethering_technologies;
bool persistent_tethering_mode;
+   bool passive_wifi_scan;
 } connman_settings  = {
.bg_scan = true,
.pref_timeservers = NULL,
@@ -86,6 +87,7 @@ static struct {
.single_tech = false,
.tethering_technologies = NULL,
.persistent_tethering_mode = false,
+   .passive_wifi_scan = false,
 };
 
 #define CONF_BG_SCANBackgroundScanning
@@ -100,6 +102,7 @@ static struct {
 #define CONF_SINGLE_TECHSingleConnectedTechnology
 #define CONF_TETHERING_TECHNOLOGIES  TetheringTechnologies
 #define CONF_PERSISTENT_TETHERING_MODE  PersistentTetheringMode
+#define CONF_PASSIVE_WIFI_SCAN PassiveWiFiScan
 
 static const char *supported_options[] = {
CONF_BG_SCAN,
@@ -114,6 +117,7 @@ static const char *supported_options[] = {
CONF_SINGLE_TECH,
CONF_TETHERING_TECHNOLOGIES,
CONF_PERSISTENT_TETHERING_MODE,
+   CONF_PASSIVE_WIFI_SCAN,
NULL
 };
 
@@ -354,6 +358,14 @@ static void parse_config(GKeyFile *config)
connman_settings.persistent_tethering_mode = boolean;
 
g_clear_error(error);
+
+   boolean = __connman_config_get_bool(config, General,
+   CONF_PASSIVE_WIFI_SCAN,
+   error);
+   if (!error)
+   connman_settings.passive_wifi_scan = boolean;
+
+   g_clear_error(error);
 }
 
 static int config_init(const char *file)
@@ -528,6 +540,9 @@ bool connman_setting_get_bool(const char *key)
if (g_str_equal(key, CONF_PERSISTENT_TETHERING_MODE))
return connman_settings.persistent_tethering_mode;
 
+   if (g_str_equal(key, CONF_PASSIVE_WIFI_SCAN))
+   return connman_settings.passive_wifi_scan;
+
return false;
 }
 
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH 2/4] wifi: Do passive scanning when PassiveWiFiScan is true

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

Do passive scanning instead of active to avoid revealing
the SSID's of services have been configured.
---
 plugins/wifi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 42dd407..0fecee7 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1820,7 +1820,7 @@ static int wifi_scan(enum connman_service_type type,
 
return 0;
}
-   } else if (wifi-connected) {
+   } else if (wifi-connected || 
connman_setting_get_bool(PassiveWiFiScan)) {
g_supplicant_free_scan_params(scan_params);
return wifi_scan_simple(device);
} else {
-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

[PATCH v3 0/4] Introduce PassiveWifiScan

2015-04-24 Thread pasi . sjoholm
From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

Here are the patches promised long time ago to make
it possible to use passive scanning instead of
the active.

The actual change is pretty simple one. :)

v2: Splitted main.c and wifi.c into different commits
v3: Modified the connman.conf.5 and main.conf

Pasi Sjöholm (4):
  main: Add support for PassiveWifiScan configuration variable
  wifi: Do passive scanning when PassiveWiFiScan is true
  doc: Update connman.conf.5 about PassiveWiFiScan
  main.conf: Add example PassiveWiFiScan

 doc/connman.conf.5 |  7 +++
 plugins/wifi.c |  2 +-
 src/main.c | 15 +++
 src/main.conf  |  6 ++
 4 files changed, 29 insertions(+), 1 deletion(-)

-- 
2.1.0

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

missing patch...

2015-04-24 Thread Thomas Green
There was a patch in service.c  __connman_service_set_passphrase that would let 
a provisioned service that was 8021x let the agent prompt for the username and 
passphrase.  Now, in revision 1.28 there is a check in 
__connman_service_set_identity that seems to restore the old undesired 
behavior, but this time while checking for the passphrase.  The check is now

If (service-immutable || service-hidden)
return;

where currently in __connman_service_set_passphrase

if (service-hidden)
return -EINVAL;

if (service-immutable 
service-security != CONNMAN_SWERVICE_SECURITY_8021X)
return -EINVAL;

If I am mis-reading the code, please let me know, but as of now, when I try to 
connect to an 8021x AP and expect the agent to prompt for the username and 
password it returns

Error /net/connman/service/wifi_5c313e2c3958_70726976617465_managed_ieee8021x: 
Invalid arguments

When I use connmanctl.  

Thanks

Tom
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 4/4] main.conf: Add example PassiveWiFiScan

2015-04-24 Thread Marcel Holtmann
Hi Pasi,

 ---
 src/main.conf | 6 ++
 1 file changed, 6 insertions(+)
 
 diff --git a/src/main.conf b/src/main.conf
 index 93c7a50..b553523 100644
 --- a/src/main.conf
 +++ b/src/main.conf
 @@ -95,3 +95,9 @@
 # re-enabling a technology, and after restarts and reboots.
 # Default value is false.
 # PersistentTetheringMode = false
 +
 +# Enable passive only scanning for WiFi in case of
 +# one does not want to reveal SSIDs for currently configured 
 +# services. Only exception being that with hidden networks 
 +# the initial connection will still do an active scan.
 +# PassiveWiFiScan = false

I think this switch is a bit weird. I would say we should just always passive 
scan and only do active scanning when we are looking for a hidden AP. There is 
no good reason to make this a configuration option. The smarts should be in 
ConnMan and it should be as private as possible all the times.

Regards

Marcel

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


How to Enable VPN support in Connman ?

2015-04-24 Thread Lamsoge, Abhijit
Hi All,
I am fairly new to connman.
I wanted to know the below two things.

1) How to I enable vpn support in connman from ./configure script ? - Because 
after compiling I do not see any vpn related binaries or objects and nothing is 
mentioned in docs currently available.

2) How do I compile all the plug-ins as shared libs or .so ? - Nothing 
mentioned in README and HACKING docs.

Any help would be great.

Abhijit
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman