Use proxy in advanced configuration

2016-06-10 Thread asdfgher
Hello
I have Qubes as os and have thhis configuration

sys-net-->proxyVM-->proxyVM-->AppVM

In the first proxy vm I have a proxy software while in the second I have a
vpn in network manager

My goal is that the vpn "see" proxy software in the first proxyVM. Now I'm
gone to advances-->proxies and write ip of first proxyVM and the port of
software proxy (4001). Unfortunately it doesn't work, is the setup
correct?
Is possible to do it?

Thank you

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Use proxy in advanced configuration

2016-06-10 Thread asdfgher
Hello
I have Qubes as os and have thhis configuration

sys-net-->proxyVM-->proxyVM-->AppVM

In the first proxy vm I have a proxy software while in the second I have a
vpn in network manager

My goal is that the vpn "see" proxy software in the first proxyVM. Now I'm
gone to advances-->proxies and write ip of first proxyVM and the port of
software proxy (4001). Unfortunately it doesn't work, is the setup
correct?
Is possible to do it?

Thank you

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM can't see WEP access point

2016-06-10 Thread Dan Williams
On Fri, 2016-06-10 at 17:30 +0200, Bastien Nocera wrote:
> On Fri, 2016-06-10 at 10:11 -0500, Dan Williams wrote:
> > 
> > 
> 
> > 
> > Jouni confirmed that there is a bug in the supplicant.  The
> > commit ce8963fc9f197771cd51ba2834fbdf711189641a ('Remove
> > WEP40/WEP104
> > cipher suite support for WPA/WPA2') appears to have broken this
> > functionality (where the AP advertises WEP support in WPA/RSN IEs),
> > but
> > it will still work for WEP-only APs.  Not sure what his solution
> > will
> > be, since this behavior (TSN) is technically allowed by the
> > standards
> > for WPA1 (but not necessarily for WPA2/RSN, I believe).
> > 
> > We should likely also modify NM to not reject the AP if the RSN IE
> > fails to parse, but to simply ignore WPA2/RSN on that AP and only
> > allow
> > using TKIP, if present.  If the RSN IE fails to parse and the AP
> > does
> > not support TKIP, then NM should correctly reject the AP, since
> > RSN+WEP
> > is not really a valid mode.
> The only WEP-equivalent mode on the Airport Express (gen 1) I have is
> labeled as "WEP (Transitional Security Network)".

Does it allow configuring the WEP key separately from the WPA
passphrase?  Or does it have just one key/passphrase entry, and if so,
what is it labeled?

Dan
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[SOLVED]Re: network manager and 10.42.0.1

2016-06-10 Thread Bhasker C V
On Fri, Jun 10, 2016 at 10:49 AM, Beniamino Galvani  wrote:
>
> On Fri, Jun 10, 2016 at 10:24:57AM +0200, Bhasker C V wrote:
> > Hi all,
> >
> >  I am following up this question after asking this with debian-users group.
> >
> >  I am at a loss to find out how to change 10.42.0.1/24 and 10.42.0.x/24 as
> > ip and dhcp range which is used by network manager when configuring a
> > wireless card as an AP. I dont see the setting anywhere and cant find a
> > valid doc in the internet too
>
> Hi,
>
> The value can be changed using the 'IPv4 address' property, but
> unfortunately nm-applet doesn't support it. However you can use nmcli:
>
>  $ nmcli connection modify Hotspot ipv4.address 172.25.16.1/24
>
> as you did, and then re-activate the connection to apply the change:
>
>  $ nmcli connection up Hotspot
>
> Does this work? If not, which NM version are you using?
I was using NM 1.2.2
The trick of setting ipv4.address worked. Now I can have multiple
hotspots with different networks in a system
Thanks
>
> BTW, the parameter, as all other configuration options, is documented
> in the 'nm-settings' man page ('ipv4 setting' section).
>
> Beniamino
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


DHCP lease time configuration

2016-06-10 Thread Bhasker C V
Hi,

 I use NM 1.2.2
 I have configured an AP HOTSPOT
 I want to configure a mximum dhcp lease time (instead of 50)
I looked into nm-settings but could not find an appropriate setting
Is there an nmcli setting for setting the lease time ?

Thanks
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: DHCP lease time configuration

2016-06-10 Thread Thomas Haller
On Fri, 2016-06-10 at 20:27 +0200, Bhasker C V wrote:
> Hi,
> 
>  I use NM 1.2.2
>  I have configured an AP HOTSPOT
>  I want to configure a mximum dhcp lease time (instead of 50)
> I looked into nm-settings but could not find an appropriate setting
> Is there an nmcli setting for setting the lease time ?
> 

Hi,


No, that is not possible. NM uses dnsmasq as DHCP server for the
"shared" method.

Thereby it passes --dhcp-range=10.42.0.30,10.42.0.254,60m

(so the least time is 60m, not 50).

So, no that is not possible. You can only patch NetworkManager or
replace "dnsmasq" binary with a wrapper script that filters the command
line arguments.


Btw, you can put a configuration file for dnsmasq
to /etc/NetworkManager/dnsmasq-shared.d directory, see `man dnsmasq`.

(that that will not help you to modify --dhcp-range, I think)



Thomas



signature.asc
Description: This is a digitally signed message part
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH v2 2/9] Ignore rild modem devices.

2016-06-10 Thread Tony Espy
From: Mathieu Trudel-Lapierre 

Gbp-Pq: Name Ignore-rild-modem-devices.patch
---
 src/nm-manager.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/nm-manager.c b/src/nm-manager.c
index e64c68a..be21baa 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2057,6 +2057,14 @@ platform_link_added (NMManager *self,
gboolean ignore = FALSE;
gs_free_error GError *error = NULL;
 
+   /* Ignore rild modem devices, which will be handled by their 
modem parent */
+   if (g_str_has_prefix (plink->name, "rmnet") ||
+   g_str_has_prefix (plink->name, "rev_rmnet") ||
+   g_str_has_prefix (plink->name, "ccmni")) {
+   _LOGW (LOGD_HW, "Ignoring rild modem device: %s", 
plink->name);
+   return;
+   }
+
device = nm_device_factory_create_device (factory, plink->name, 
plink, NULL, , );
if (!device) {
if (!ignore) {
-- 
2.7.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH v2 1/9] Check at runtime whether to start ModemManager

2016-06-10 Thread Tony Espy
From: Didier Raboud 

This makes NetworkManager use runtime detection to manage the
ModemManager lifecycle when not run by systemd. Under systemd, we expect
the ModemManager service to be started by systemd, under non-systemd, we
use the dbus activation feature to start ModemManager.

Closes: #770871

Gbp-Pq: Name Check-at-runtime-whether-to-start-ModemManager.patch
---
 src/devices/wwan/nm-modem-manager.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/devices/wwan/nm-modem-manager.c 
b/src/devices/wwan/nm-modem-manager.c
index e26321b..9e9bc13 100644
--- a/src/devices/wwan/nm-modem-manager.c
+++ b/src/devices/wwan/nm-modem-manager.c
@@ -25,6 +25,7 @@
 #include 
 
 #include 
+#include 
 
 #include "nm-modem-manager.h"
 #include "nm-dbus-compat.h"
@@ -199,10 +200,9 @@ modem_manager_name_owner_changed (MMManager *modem_manager,
if (!name_owner) {
nm_log_info (LOGD_MB, "ModemManager disappeared from bus");
 
-#if !HAVE_SYSTEMD
/* If not managed by systemd, schedule relaunch */
-   schedule_modem_manager_relaunch (self, 0);
-#endif
+   if (!sd_booted())
+   schedule_modem_manager_relaunch (self, 0);
 
return;
}
@@ -223,8 +223,6 @@ modem_manager_name_owner_changed (MMManager *modem_manager,
 */
 }
 
-#if !HAVE_SYSTEMD
-
 static void
 modem_manager_poke_cb (GDBusConnection *connection,
GAsyncResult *res,
@@ -273,8 +271,6 @@ modem_manager_poke (NMModemManager *self)
g_object_ref (self)); /* user_data */
 }
 
-#endif /* HAVE_SYSTEMD */
-
 static void
 modem_manager_check_name_owner (NMModemManager *self)
 {
@@ -288,10 +284,9 @@ modem_manager_check_name_owner (NMModemManager *self)
return;
}
 
-#if !HAVE_SYSTEMD
/* If the lifecycle is not managed by systemd, poke */
-   modem_manager_poke (self);
-#endif
+   if (!sd_booted())
+   modem_manager_poke (self);
 }
 
 static void
-- 
2.7.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH 8/9] Track killswitch change signals from urfkill

2016-06-10 Thread Tony Espy

On 06/08/2016 05:55 PM, Dan Williams wrote:

On Wed, 2016-06-08 at 16:20 -0400, Tony Espy wrote:

From: Mathieu Trudel-Lapierre 

... Also do that rather than resetting the killswitch to the NM saved
WirelessEnabled state if urfkill support is enabled.

Gbp-Pq: Name Track-killswitch-change-signals-from-urfkill.patch
---
  config.h.in  |   6 +
  configure.ac |  11 ++
  src/Makefile.am  |   6 +
  src/nm-manager.c | 112 +-
  src/nm-urfkill-manager.c | 289
+++
  src/nm-urfkill-manager.h |  50 
  6 files changed, 472 insertions(+), 2 deletions(-)
  create mode 100644 src/nm-urfkill-manager.c
  create mode 100644 src/nm-urfkill-manager.h

diff --git a/config.h.in b/config.h.in
index baabb79..356de31 100644
--- a/config.h.in
+++ b/config.h.in
@@ -261,6 +261,9 @@
  /* Define if you have ModemManager1 support */
  #undef WITH_MODEM_MANAGER_1

+/* Define if you have oFono support */
+#undef WITH_OFONO
+
  /* whether to compile polkit support */
  #undef WITH_POLKIT

@@ -276,6 +279,9 @@
  /* Define if you have Teamd control support */
  #undef WITH_TEAMDCTL

+/* Define if you want to build with support for the urfkill daemon
*/
+#undef WITH_URFKILL
+
  /* Define if you have Wi-Fi support */
  #undef WITH_WIFI


This hunk wouldn't apply upstream since config.h.in gets auto-
generated...  so can just be removed from the patch.


I removed this chunk, and also addressed all of your other comments 
except for the rfkill_change_timeout.  I pinged Mathieu earlier and 
asked him to comment on this.


Regards,
/tony

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH v2 8/9] Track killswitch change signals from urfkill

2016-06-10 Thread Tony Espy
From: Mathieu Trudel-Lapierre 

... Also do that rather than resetting the killswitch to the NM saved
WirelessEnabled state if urfkill support is enabled.

Gbp-Pq: Name Track-killswitch-change-signals-from-urfkill.patch
---
 configure.ac |  11 ++
 src/Makefile.am  |   6 +
 src/nm-manager.c | 112 +-
 src/nm-urfkill-manager.c | 297 +++
 src/nm-urfkill-manager.h |  49 
 5 files changed, 473 insertions(+), 2 deletions(-)
 create mode 100644 src/nm-urfkill-manager.c
 create mode 100644 src/nm-urfkill-manager.h

diff --git a/configure.ac b/configure.ac
index 48e22ee..1d07d28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,6 +268,17 @@ else
 fi
 
 dnl
+dnl Default to using WEXT but allow it to be disabled
+dnl
+AC_ARG_WITH(urfkill, AS_HELP_STRING([--with-urfkill=yes], [Enable or disable 
support for urfkill]), ac_with_urfkill=$withval, ac_with_urfkill="yes")
+if test x"$ac_with_urfkill" = x"yes"; then
+   AC_DEFINE(WITH_URFKILL, 1, [Define if you want to build with support 
for the urfkill daemon])
+else
+   AC_DEFINE(WITH_URFKILL, 0, [Define if you want to build with support 
for the urfkill daemon])
+fi
+AM_CONDITIONAL(WITH_URFKILL, test x"${ac_with_urfkill}" = x"yes")
+
+dnl
 dnl Checks for libm - needed for pow()
 dnl
 LT_LIB_M
diff --git a/src/Makefile.am b/src/Makefile.am
index aa35eef..dbd4fa9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -445,6 +445,12 @@ libNetworkManager_la_SOURCES = \
NetworkManagerUtils.c \
NetworkManagerUtils.h
 
+if WITH_URFKILL
+libNetworkManager_la_SOURCES += \
+   nm-urfkill-manager.c \
+   nm-urfkill-manager.h \
+   $(NULL)
+endif
 
 if SUSPEND_RESUME_UPOWER
 libNetworkManager_la_SOURCES += nm-sleep-monitor-upower.c
diff --git a/src/nm-manager.c b/src/nm-manager.c
index be21baa..3720b0b 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -34,6 +34,7 @@
 #include "nm-device-generic.h"
 #include "nm-platform.h"
 #include "nm-rfkill-manager.h"
+#include "nm-urfkill-manager.h"
 #include "nm-dhcp-manager.h"
 #include "nm-settings.h"
 #include "nm-settings-connection.h"
@@ -119,6 +120,9 @@ typedef struct {
guintid;
} prop_filter;
NMRfkillManager *rfkill_mgr;
+#if WITH_URFKILL
+   NMUrfkillManager *urfkill_mgr;
+#endif
 
NMSettings *settings;
char *hostname;
@@ -138,6 +142,7 @@ typedef struct {
guint fw_changed_id;
 
guint timestamp_update_id;
+   guint rfkill_initial_id;
 
gboolean startup;
gboolean devices_inited;
@@ -5108,6 +5113,49 @@ dbus_connection_changed_cb (NMBusManager *dbus_mgr,
 
 /**/
 
+#if WITH_URFKILL
+static void
+urfkill_wlan_state_changed_cb (NMUrfkillManager *mgr,
+  gboolean enabled,
+  gpointer user_data)
+{
+   NMManager *self = NM_MANAGER (user_data);
+   NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+   GError *error = NULL;
+
+   nm_log_dbg (LOGD_RFKILL, "urfkill wlan state changed to %s",
+   enabled ? "enabled" : "disabled");
+
+   if (priv->rfkill_initial_id) {
+   g_source_remove (priv->rfkill_initial_id);
+   priv->rfkill_initial_id = 0;
+   }
+
+   manager_update_radio_enabled (self,
+ >radio_states[RFKILL_TYPE_WLAN],
+ enabled);
+   nm_manager_update_state (self);
+}
+
+static void
+urfkill_wwan_state_changed_cb (NMUrfkillManager *mgr,
+  gboolean enabled,
+  gpointer user_data)
+{
+   NMManager *self = NM_MANAGER (user_data);
+   NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+   GError *error = NULL;
+
+   nm_log_dbg (LOGD_RFKILL, "urfkill wwan state changed to %s",
+   enabled ? "enabled" : "disabled" );
+
+   manager_update_radio_enabled (self,
+ >radio_states[RFKILL_TYPE_WWAN],
+ enabled);
+   nm_manager_update_state (self);
+}
+#endif /* WITH_URFKILL */
+
 NM_DEFINE_SINGLETON_REGISTER (NMManager);
 
 NMManager *
@@ -5129,6 +5177,44 @@ nm_connection_provider_get (void)
return p;
 }
 
+typedef struct KillState KillState;
+struct KillState {
+   NMManager *manager;
+   gboolean wlan_enabled;
+   gboolean wwan_enabled;
+};
+
+static gboolean
+rfkill_change_timeout (gpointer user_data)
+{
+   KillState *state = (KillState *) user_data;
+   NMManager *mgr = state->manager;
+   NMManagerPrivate *priv;
+
+   g_return_val_if_fail (NM_IS_MANAGER (mgr), G_SOURCE_REMOVE);
+
+   priv = NM_MANAGER_GET_PRIVATE (mgr);
+
+   rfkill_change (priv->radio_states[RFKILL_TYPE_WLAN].desc, 

[PATCH v2 3/9] wwan: add support for using oFono as a modem manager

2016-06-10 Thread Tony Espy
From: Mathieu Trudel-Lapierre 

This patch adds core wwan support for ofono, as used by Ubuntu Touch.

Signed-off-by: Mathieu Trudel-Lapierre 

Gbp-Pq: Name wwan-add-support-for-using-oFono-as-a-modem-manager.patch
---
 configure.ac|9 +
 src/devices/wwan/Makefile.am|7 +
 src/devices/wwan/nm-device-modem.c  |2 +
 src/devices/wwan/nm-modem-manager.c |  241 +-
 src/devices/wwan/nm-modem-ofono.c   | 1425 +++
 src/devices/wwan/nm-modem-ofono.h   |   64 ++
 src/devices/wwan/nm-modem.c |8 +-
 src/nm-core-utils.c |   20 +-
 8 files changed, 1755 insertions(+), 21 deletions(-)
 create mode 100644 src/devices/wwan/nm-modem-ofono.c
 create mode 100644 src/devices/wwan/nm-modem-ofono.h

diff --git a/configure.ac b/configure.ac
index 7bb3779..4731128 100644
--- a/configure.ac
+++ b/configure.ac
@@ -714,6 +714,15 @@ else
 fi
 AM_CONDITIONAL(WITH_BLUEZ5_DUN, test "${enable_bluez5_dun}" = "yes")
 
+# OFONO
+AC_ARG_WITH(ofono, AS_HELP_STRING([--with-ofono], [Enable oFono 
support]),,[with_ofono=yes])
+if (test "${with_ofono}" = "yes"); then
+   AC_DEFINE(WITH_OFONO, 1, [Define if you have oFono support])
+else
+   AC_DEFINE(WITH_OFONO, 0, [Define if you have oFono support])
+fi
+AM_CONDITIONAL(WITH_OFONO, test "${with_ofono}" = "yes")
+
 # DHCP client support
 AC_ARG_WITH([dhclient], AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable 
dhclient 4.x support]))
 AC_ARG_WITH([dhcpcd], AS_HELP_STRING([--with-dhcpcd=yes|no|path], [Enable 
dhcpcd 4.x support]))
diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am
index 1777eb3..65d9952 100644
--- a/src/devices/wwan/Makefile.am
+++ b/src/devices/wwan/Makefile.am
@@ -41,6 +41,13 @@ libnm_wwan_la_SOURCES = \
\
$(GLIB_GENERATED)
 
+if WITH_OFONO
+libnm_wwan_la_SOURCES += \
+   nm-modem-ofono.c \
+   nm-modem-ofono.h \
+   $(NULL)
+endif
+
 WWAN_SYMBOL_VIS_FILE=$(srcdir)/wwan-exports.ver
 
 libnm_wwan_la_LDFLAGS = \
diff --git a/src/devices/wwan/nm-device-modem.c 
b/src/devices/wwan/nm-device-modem.c
index a8361c4..39a34db 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -100,6 +100,7 @@ modem_prepare_result (NMModem *modem,
if (success)
nm_device_activate_schedule_stage2_device_config (device);
else {
+
if (reason == NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT) {
/* If the connect failed because the SIM PIN was wrong 
don't allow
 * the device to be auto-activated anymore, which would 
risk locking
@@ -545,6 +546,7 @@ get_ip_iface_identifier (NMDevice *device, 
NMUtilsIPv6IfaceId *out_iid)
 
g_return_val_if_fail (priv->modem, FALSE);
success = nm_modem_get_iid (priv->modem, out_iid);
+
if (!success)
success = NM_DEVICE_CLASS 
(nm_device_modem_parent_class)->get_ip_iface_identifier (device, out_iid);
return success;
diff --git a/src/devices/wwan/nm-modem-manager.c 
b/src/devices/wwan/nm-modem-manager.c
index 9e9bc13..cd97b87 100644
--- a/src/devices/wwan/nm-modem-manager.c
+++ b/src/devices/wwan/nm-modem-manager.c
@@ -17,7 +17,7 @@
  *
  * Copyright (C) 2009 - 2014 Red Hat, Inc.
  * Copyright (C) 2009 Novell, Inc.
- * Copyright (C) 2009 Canonical Ltd.
+ * Copyright (C) 2009 - 2013 Canonical Ltd.
  */
 
 #include "nm-default.h"
@@ -32,6 +32,10 @@
 #include "nm-modem.h"
 #include "nm-modem-broadband.h"
 
+#if WITH_OFONO
+#include "nm-modem-ofono.h"
+#endif
+
 #define MODEM_POKE_INTERVAL 120
 
 G_DEFINE_TYPE (NMModemManager, nm_modem_manager, G_TYPE_OBJECT)
@@ -44,6 +48,12 @@ struct _NMModemManagerPrivate {
guint mm_object_added_id;
guint mm_object_removed_id;
 
+#if WITH_OFONO
+   GDBusProxy *ofono_proxy;
+
+   guint ofono_name_owner_changed_id;
+#endif
+
/* Common */
GHashTable *modems;
 };
@@ -222,6 +232,178 @@ modem_manager_name_owner_changed (MMManager 
*modem_manager,
 * modem_manager_available (self);
 */
 }
+#if WITH_OFONO
+static void
+ofono_clear_signals (NMModemManager *self)
+{
+   if (!self->priv->ofono_proxy)
+   return;
+
+   if (self->priv->ofono_name_owner_changed_id) {
+   if (g_signal_handler_is_connected (self->priv->ofono_proxy,
+   
   self->priv->ofono_name_owner_changed_id))
+   g_signal_handler_disconnect (self->priv->ofono_proxy,
+   
 self->priv->ofono_name_owner_changed_id);
+   self->priv->ofono_name_owner_changed_id = 0;
+   }
+}
+
+static void
+ofono_create_modem (NMModemManager *self, const char *path)
+{
+   NMModem *modem = NULL;
+
+   if 

[PATCH v2 5/9] Let NetworkManager read oFono settings file and create connections

2016-06-10 Thread Tony Espy
From: Mathieu Trudel-Lapierre 

Gbp-Pq: Name Let-NetworkManager-read-oFono-settings-file-and-crea.patch
---
 configure.ac |   6 +
 src/settings/plugins/Makefile.am |   4 +
 src/settings/plugins/ofono/Makefile.am   |  34 +
 src/settings/plugins/ofono/nm-ofono-connection.c | 168 +
 src/settings/plugins/ofono/nm-ofono-connection.h |  54 ++
 src/settings/plugins/ofono/parser.c  | 121 
 src/settings/plugins/ofono/parser.h  |  36 ++
 src/settings/plugins/ofono/plugin.c  | 788 +++
 src/settings/plugins/ofono/plugin.h  |  53 ++
 9 files changed, 1264 insertions(+)
 create mode 100644 src/settings/plugins/ofono/Makefile.am
 create mode 100644 src/settings/plugins/ofono/nm-ofono-connection.c
 create mode 100644 src/settings/plugins/ofono/nm-ofono-connection.h
 create mode 100644 src/settings/plugins/ofono/parser.c
 create mode 100644 src/settings/plugins/ofono/parser.h
 create mode 100644 src/settings/plugins/ofono/plugin.c
 create mode 100644 src/settings/plugins/ofono/plugin.h

diff --git a/configure.ac b/configure.ac
index 4731128..48e22ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,7 @@ AC_ARG_ENABLE(ifcfg-rh, AS_HELP_STRING([--enable-ifcfg-rh], 
[enable ifcfg-rh con
 AC_ARG_ENABLE(ifcfg-suse, AS_HELP_STRING([--enable-ifcfg-suse], [enable 
ifcfg-suse configuration plugin (SUSE) (deprecated)]))
 AC_ARG_ENABLE(ifupdown, AS_HELP_STRING([--enable-ifupdown], [enable ifupdown 
configuration plugin (Debian/Ubuntu)]))
 AC_ARG_ENABLE(ifnet, AS_HELP_STRING([--enable-ifnet], [enable ifnet 
configuration plugin (Gentoo)]))
+AC_ARG_ENABLE(ofono, AS_HELP_STRING([--enable-ofono], [enable ofono 
configuration plugin (Ubuntu)]))
 # Default alternative plugins by distribution
 AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/redhat-release, 
enable_ifcfg_rh=yes))
 AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/fedora-release, 
enable_ifcfg_rh=yes))
@@ -102,6 +103,8 @@ AS_IF([test -z "$enable_ifcfg_rh"], 
AC_CHECK_FILE(/etc/mandriva-release, enable_
 AS_IF([test -z "$enable_ifcfg_suse"], AC_CHECK_FILE(/etc/SuSE-release, 
enable_ifcfg_suse=yes))
 AS_IF([test -z "$enable_ifupdown"], AC_CHECK_FILE(/etc/debian_version, 
enable_ifupdown=yes))
 AS_IF([test -z "$enable_ifnet"], AC_CHECK_FILE(/etc/gentoo-release, 
enable_ifnet=yes))
+# Ofono is always enabled.
+AS_IF([test -z "$enable_ofono"], enable_ofono=yes)
 # Otherwise plugins default to "no"
 AS_IF([test -z "$enable_ifcfg_rh"], enable_ifcfg_rh=no)
 AS_IF([test -z "$enable_ifcfg_suse"], enable_ifcfg_suse=no)
@@ -114,6 +117,7 @@ AM_CONDITIONAL(CONFIG_PLUGIN_IBFT, test 
"$enable_config_plugin_ibft" = "yes")
 AM_CONDITIONAL(CONFIG_PLUGIN_IFCFG_RH, test "$enable_ifcfg_rh" = "yes")
 AM_CONDITIONAL(CONFIG_PLUGIN_IFUPDOWN, test "$enable_ifupdown" = "yes")
 AM_CONDITIONAL(CONFIG_PLUGIN_IFNET, test "$enable_ifnet" = "yes")
+AM_CONDITIONAL(CONFIG_PLUGIN_OFONO, test "$enable_ofono" = "yes")
 
 AC_ARG_WITH(config-plugins-default, 
AS_HELP_STRING([--with-config-plugins-default=PLUGINS], [Default configuration 
option for main.plugins setting, used as fallback if the configuration option 
is unset]), [config_plugins_default="$withval"], [config_plugins_default=""])
 if test -z "$config_plugins_default" -o "$config_plugins_default" = no; then
@@ -1042,6 +1046,7 @@ src/ppp-manager/Makefile
 src/settings/plugins/Makefile
 src/settings/plugins/ifupdown/Makefile
 src/settings/plugins/ifupdown/tests/Makefile
+src/settings/plugins/ofono/Makefile
 src/settings/plugins/ifnet/Makefile
 src/settings/plugins/ifnet/tests/Makefile
 src/settings/plugins/ifcfg-rh/Makefile
@@ -1168,6 +1173,7 @@ echo "  ibft: ${enable_config_plugin_ibft}"
 echo "  ifcfg-rh: ${enable_ifcfg_rh}"
 echo "  ifupdown: ${enable_ifupdown}"
 echo "  ifnet: ${enable_ifnet}"
+echo "  ofono: ${enable_ofono}"
 echo
 
 echo "Handlers for /etc/resolv.conf:"
diff --git a/src/settings/plugins/Makefile.am b/src/settings/plugins/Makefile.am
index 278d455..b3ca015 100644
--- a/src/settings/plugins/Makefile.am
+++ b/src/settings/plugins/Makefile.am
@@ -17,3 +17,7 @@ endif
 if CONFIG_PLUGIN_IFNET
 SUBDIRS+=ifnet
 endif
+
+if CONFIG_PLUGIN_OFONO
+SUBDIRS+=ofono
+endif
diff --git a/src/settings/plugins/ofono/Makefile.am 
b/src/settings/plugins/ofono/Makefile.am
new file mode 100644
index 000..a9b2941
--- /dev/null
+++ b/src/settings/plugins/ofono/Makefile.am
@@ -0,0 +1,34 @@
+SUBDIRS = .
+
+@GNOME_CODE_COVERAGE_RULES@
+
+AM_CPPFLAGS = \
+   -I$(top_srcdir)/src \
+   -I$(top_srcdir)/src/settings \
+   -I$(top_srcdir)/shared \
+   -I$(top_builddir)/shared \
+   -I$(top_srcdir)/libnm-core \
+   -I$(top_builddir)/libnm-core \
+   -DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
+   
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
+   -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
+   

[PATCH v2 6/9] Add modem reconnect delay to policy

2016-06-10 Thread Tony Espy
This patch introduces a 5s delay between retry activations
for modem devices.  Otherwise, the activation attempts can
flood the modem all at once, and then trigger the reset_retries
timeout ( which defaults to 300s ).

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1461593

Gbp-Pq: Name Add-modem-reconnect-delay-to-policy.patch
---
 src/nm-policy.c | 34 +++---
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/src/nm-policy.c b/src/nm-policy.c
index 07bcce8..5c59604 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -931,7 +931,7 @@ sleeping_changed (NMManager *manager, GParamSpec *pspec, 
gpointer user_data)
 }
 
 static void
-schedule_activate_check (NMPolicy *self, NMDevice *device)
+schedule_activate_check (NMPolicy *self, NMDevice *device, guint delay)
 {
NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self);
ActivateData *data;
@@ -960,7 +960,12 @@ schedule_activate_check (NMPolicy *self, NMDevice *device)
data = g_slice_new0 (ActivateData);
data->policy = self;
data->device = g_object_ref (device);
-   data->autoactivate_id = g_idle_add (auto_activate_device, data);
+
+   if (delay)
+   data->autoactivate_id = g_timeout_add_seconds (delay, 
auto_activate_device, data);
+   else
+   data->autoactivate_id = g_idle_add (auto_activate_device, data);
+
priv->pending_activation_checks = g_slist_append 
(priv->pending_activation_checks, data);
 }
 
@@ -1155,6 +1160,7 @@ device_state_changed (NMDevice *device,
NMIP4Config *ip4_config;
NMIP6Config *ip6_config;
NMSettingConnection *s_con = NULL;
+   guint delay = 0;
 
switch (new_state) {
case NM_DEVICE_STATE_FAILED:
@@ -1172,7 +1178,7 @@ device_state_changed (NMDevice *device,
 

nm_settings_connection_set_autoconnect_blocked_reason (connection, 
NM_DEVICE_STATE_REASON_NO_SECRETS);
} else if (tries > 0) {
-   _LOGD (LOGD_DEVICE, "connection '%s' failed to 
autoconnect; %d tries left",
+   _LOGI (LOGD_DEVICE, "connection '%s' failed to 
autoconnect; %d tries left",
   nm_settings_connection_get_id 
(connection), tries);
nm_settings_connection_set_autoconnect_retries 
(connection, tries - 1);
}
@@ -1183,6 +1189,10 @@ device_state_changed (NMDevice *device,
/* Schedule a handler to reset retries count */
if (!priv->reset_retries_id) {
gint32 retry_time = 
nm_settings_connection_get_autoconnect_retry_time (connection);
+   gint32 actual_time = MAX (0, retry_time 
- nm_utils_get_monotonic_timestamp_s ());
+
+   _LOGI (LOGD_DEVICE, "Disabling 
autoconnect for connection '%s'; setting retry of %d.",
+  nm_connection_get_id 
(NM_CONNECTION (connection)), actual_time);
 
g_warn_if_fail (retry_time != 0);
priv->reset_retries_id = 
g_timeout_add_seconds (MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s 
()), reset_connections_retries, self);
@@ -1250,7 +1260,17 @@ device_state_changed (NMDevice *device,
update_routing_and_dns (self, FALSE);
 
/* Device is now available for auto-activation */
-   schedule_activate_check (self, device);
+   if (nm_device_get_device_type (device) == NM_DEVICE_TYPE_MODEM)
+   delay = 5;
+
+   if (connection)
+   _LOGI (LOGD_DEVICE, "Connection '%s' disconnected, 
scheduling activate_check in %u seconds.",
+   nm_connection_get_id (NM_CONNECTION 
(connection)), delay);
+   else
+   _LOGI (LOGD_DEVICE, "Device '%s' has no connection; 
scheduling activate_check in %u seconds.",
+   nm_device_get_iface (device), delay);
+
+   schedule_activate_check (self, device, delay);
break;
 
case NM_DEVICE_STATE_PREPARE:
@@ -1363,7 +1383,7 @@ device_autoconnect_changed (NMDevice *device,
NMPolicy *self = priv->self;
 
if (nm_device_autoconnect_allowed (device))
-   schedule_activate_check (self, device);
+   schedule_activate_check (self, device, 0);
 }
 
 static void
@@ -1372,7 +1392,7 @@ device_recheck_auto_activate (NMDevice *device, gpointer 
user_data)
NMPolicyPrivate *priv = user_data;
NMPolicy *self = priv->self;
 
-   schedule_activate_check (self, device);
+   schedule_activate_check (self, device, 0);
 }
 
 static void
@@ -1586,7 +1606,7 @@ schedule_activate_all (NMPolicy 

[PATCH v2 9/9] Fix ofono connection problems

2016-06-10 Thread Tony Espy
This patch fixes three (re) connection problems with
the ofono plugin:

1) If the modem is connected, and registrations drops,
and then is restored, the connection isn't re-activated.
The fix was simply to change modem_state_cb to not return
after setting the state to failed, which allows nm_device_
queue_recheck_available to be called, which queues a state
transition to UNAVAILABLE.

2) If ofono returns InProgress, don't treat as a PREPARE_FAILURE.

3) If the ofono conext is already active, use it's existing
'Settings' property to configure the device.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1565717
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1579098

Gbp-Pq: Name wwan-fix-ofono-connection-problems.patch
---
 src/devices/wwan/nm-device-modem.c |   4 +-
 src/devices/wwan/nm-modem-ofono.c  | 193 +++--
 src/devices/wwan/nm-modem-ofono.h  |   2 +
 3 files changed, 145 insertions(+), 54 deletions(-)

diff --git a/src/devices/wwan/nm-device-modem.c 
b/src/devices/wwan/nm-device-modem.c
index 3bbd170..22009f8 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -286,12 +286,10 @@ modem_state_cb (NMModem *modem,
if (new_state < NM_MODEM_STATE_CONNECTING &&
old_state >= NM_MODEM_STATE_CONNECTING &&
dev_state >= NM_DEVICE_STATE_NEED_AUTH &&
-   dev_state <= NM_DEVICE_STATE_ACTIVATED) {
+   dev_state <= NM_DEVICE_STATE_ACTIVATED)
/* Fail the device if the modem disconnects unexpectedly while 
the
 * device is activating/activated. */
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, 
NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER);
-   return;
-   }
 
if (new_state > NM_MODEM_STATE_LOCKED && old_state == 
NM_MODEM_STATE_LOCKED) {
/* If the modem is now unlocked, enable/disable it according to 
the
diff --git a/src/devices/wwan/nm-modem-ofono.c 
b/src/devices/wwan/nm-modem-ofono.c
index 2b43b08..a8d02d6 100644
--- a/src/devices/wwan/nm-modem-ofono.c
+++ b/src/devices/wwan/nm-modem-ofono.c
@@ -789,42 +789,35 @@ stage1_prepare_done (GDBusProxy *proxy, GAsyncResult 
*result, gpointer user_data
g_dbus_proxy_call_finish (proxy, result, );
 
if (error) {
-   nm_log_warn (LOGD_MB, "ofono: connection failed: (%d) %s",
-error ? error->code : -1,
-error && error->message ? error->message : 
"(unknown)");
+   if (!g_strstr_len (error->message, NM_STRLEN 
(OFONO_ERROR_IN_PROGRESS), OFONO_ERROR_IN_PROGRESS)) {
+   nm_log_warn (LOGD_MB, "ofono: connection failed: (%d) 
%s",
+error ? error->code : -1,
+error && error->message ? 
error->message : "(unknown)");
 
-   g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE,
-  NM_DEVICE_STATE_REASON_MODEM_BUSY);
-   /*
-* FIXME: add code to check for InProgress so that the
-* connection doesn't continue to try and activate,
-* leading to the connection being disabled, and a 5m
-* timeout...
-*/
+   g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, 
FALSE,
+  
NM_DEVICE_STATE_REASON_MODEM_BUSY);
+   } else
+   nm_log_warn (LOGD_MB, "ofono: connection activation 
returned Error.InProgress");
 
g_clear_error ();
}
 }
 
 static void
-context_property_changed (GDBusProxy *proxy,
- const char *property,
- GVariant *v,
- gpointer user_data)
+handle_settings (GVariant *v_dict, gpointer user_data)
 {
NMModemOfono *self = NM_MODEM_OFONO (user_data);
NMModemOfonoPrivate *priv = NM_MODEM_OFONO_GET_PRIVATE (self);
NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
NMPlatformIP4Address addr;
gboolean ret = FALSE;
-   GVariant *v_dict;
GVariantIter i;
const gchar *s, *addr_s;
const gchar **array, **iter;
guint32 address_network, gateway_network;
guint prefix = 0;
 
-   nm_log_dbg (LOGD_MB, "PropertyChanged: %s", property);
+   nm_log_info (LOGD_MB, "ofono: (%s): IPv4 static Settings:", 
nm_modem_get_uid (NM_MODEM (self)));
 
/*
 * TODO: might be a good idea and re-factor this to mimic bluez-device,
@@ -832,18 +825,6 @@ context_property_changed (GDBusProxy *proxy,
 * handle the action.
 */
 
-   if (g_strcmp0 (property, "Settings") != 0)
-   return;
-
-   v_dict = g_variant_get_child_value (v, 0);
-   if 

[PATCH v2 4/9] Add new NMSettingsConnection reset_retries get/set methods

2016-06-10 Thread Tony Espy
This patch adds get/set methods to NMSettingsConnection for the
reset_retries_timeout.  This allows sub-classes to override the
default setting ( 300s ).

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1461593

Gbp-Pq: Name Add-new-NMSettingsConnection-reset_retries-get-set-m.patch
---
 src/settings/nm-settings-connection.c | 18 +-
 src/settings/nm-settings-connection.h |  3 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/settings/nm-settings-connection.c 
b/src/settings/nm-settings-connection.c
index 6bed3fe..fa2b573 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -125,6 +125,7 @@ typedef struct {
 
int autoconnect_retries;
gint32 autoconnect_retry_time;
+   int reset_retries_timeout;
NMDeviceStateReason autoconnect_blocked_reason;
 
char *filename;
@@ -2407,7 +2408,8 @@ nm_settings_connection_set_autoconnect_retries 
(NMSettingsConnection *self,
if (retries)
priv->autoconnect_retry_time = 0;
else
-   priv->autoconnect_retry_time = 
nm_utils_get_monotonic_timestamp_s () + AUTOCONNECT_RESET_RETRIES_TIMER;
+   priv->autoconnect_retry_time = 
nm_utils_get_monotonic_timestamp_s () + priv->reset_retries_timeout;
+
 }
 
 void
@@ -2416,6 +2418,19 @@ nm_settings_connection_reset_autoconnect_retries 
(NMSettingsConnection *self)
nm_settings_connection_set_autoconnect_retries (self, 
AUTOCONNECT_RETRIES_DEFAULT);
 }
 
+int
+nm_settings_connection_get_reset_retries_timeout (NMSettingsConnection 
*connection)
+{
+   return NM_SETTINGS_CONNECTION_GET_PRIVATE 
(connection)->reset_retries_timeout;
+}
+
+void
+nm_settings_connection_set_reset_retries_timeout (NMSettingsConnection 
*connection,
+ int timeout)
+{
+   NM_SETTINGS_CONNECTION_GET_PRIVATE (connection)->reset_retries_timeout 
= timeout;
+}
+
 gint32
 nm_settings_connection_get_autoconnect_retry_time (NMSettingsConnection *self)
 {
@@ -2580,6 +2595,7 @@ nm_settings_connection_init (NMSettingsConnection *self)
 
priv->autoconnect_retries = AUTOCONNECT_RETRIES_DEFAULT;
priv->autoconnect_blocked_reason = NM_DEVICE_STATE_REASON_NONE;
+   priv->reset_retries_timeout = AUTOCONNECT_RESET_RETRIES_TIMER;
 
g_signal_connect (self, NM_CONNECTION_SECRETS_CLEARED, G_CALLBACK 
(secrets_cleared_cb), NULL);
g_signal_connect (self, NM_CONNECTION_CHANGED, G_CALLBACK (changed_cb), 
GUINT_TO_POINTER (TRUE));
diff --git a/src/settings/nm-settings-connection.h 
b/src/settings/nm-settings-connection.h
index 5c12a8a..ece530a 100644
--- a/src/settings/nm-settings-connection.h
+++ b/src/settings/nm-settings-connection.h
@@ -208,6 +208,9 @@ void nm_settings_connection_set_autoconnect_retries 
(NMSettingsConnection *self,
  int retries);
 void nm_settings_connection_reset_autoconnect_retries (NMSettingsConnection 
*self);
 
+int nm_settings_connection_get_reset_retries_timeout (NMSettingsConnection 
*connection);
+void nm_settings_connection_set_reset_retries_timeout (NMSettingsConnection 
*connection, int timeout);
+
 gint32 nm_settings_connection_get_autoconnect_retry_time (NMSettingsConnection 
*self);
 
 NMDeviceStateReason nm_settings_connection_get_autoconnect_blocked_reason 
(NMSettingsConnection *self);
-- 
2.7.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH v2 0/9] ofono/wwan modem support

2016-06-10 Thread Tony Espy
The following patches add ofono modem/wwan support
to NetworkManager.  These patches are based on the
latest stable 1.2.2 release.

One caveat is that these patches have only been
tested using ofono's rilmodem driver ( as used by
Ubuntu Touch ), however other then the 'Preferred'
APN logic in the settings plugin, and the usage of
urfkill for flight-mode, the code should work with
other native ofono modem drivers as well.

Didier Raboud (1):
  Check at runtime whether to start ModemManager

Mathieu Trudel-Lapierre (4):
  Ignore rild modem devices.
  wwan: add support for using oFono as a modem manager
  Let NetworkManager read oFono settings file and create connections
  Track killswitch change signals from urfkill

Tony Espy (4):
  Add new NMSettingsConnection reset_retries get/set methods
  Add modem reconnect delay to policy
  Modify NMDeviceModem's available logic
  Fix ofono connection problems

 configure.ac |   26 +
 src/Makefile.am  |6 +
 src/devices/wwan/Makefile.am |7 +
 src/devices/wwan/nm-device-modem.c   |   13 +-
 src/devices/wwan/nm-modem-manager.c  |  254 +++-
 src/devices/wwan/nm-modem-ofono.c| 1516 ++
 src/devices/wwan/nm-modem-ofono.h|   66 +
 src/devices/wwan/nm-modem.c  |8 +-
 src/nm-core-utils.c  |   20 +-
 src/nm-manager.c |  120 +-
 src/nm-policy.c  |   34 +-
 src/nm-urfkill-manager.c |  297 +
 src/nm-urfkill-manager.h |   49 +
 src/settings/nm-settings-connection.c|   18 +-
 src/settings/nm-settings-connection.h|3 +
 src/settings/plugins/Makefile.am |4 +
 src/settings/plugins/ofono/Makefile.am   |   34 +
 src/settings/plugins/ofono/nm-ofono-connection.c |  168 +++
 src/settings/plugins/ofono/nm-ofono-connection.h |   54 +
 src/settings/plugins/ofono/parser.c  |  121 ++
 src/settings/plugins/ofono/parser.h  |   36 +
 src/settings/plugins/ofono/plugin.c  |  788 +++
 src/settings/plugins/ofono/plugin.h  |   53 +
 23 files changed, 3649 insertions(+), 46 deletions(-)
 create mode 100644 src/devices/wwan/nm-modem-ofono.c
 create mode 100644 src/devices/wwan/nm-modem-ofono.h
 create mode 100644 src/nm-urfkill-manager.c
 create mode 100644 src/nm-urfkill-manager.h
 create mode 100644 src/settings/plugins/ofono/Makefile.am
 create mode 100644 src/settings/plugins/ofono/nm-ofono-connection.c
 create mode 100644 src/settings/plugins/ofono/nm-ofono-connection.h
 create mode 100644 src/settings/plugins/ofono/parser.c
 create mode 100644 src/settings/plugins/ofono/parser.h
 create mode 100644 src/settings/plugins/ofono/plugin.c
 create mode 100644 src/settings/plugins/ofono/plugin.h

-- 
2.7.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH v2 7/9] Modify NMDeviceModem's available logic

2016-06-10 Thread Tony Espy
This patch modifies NMDeviceModem's available logic such that
the device is only considered available if the modem_state is
>= NM_MODEM_STATE_REGISTERED.  NMDevice defines 'available' as
meaning the device is in such a state that it can be activated.
This change prevents NM from trying to activate a modem which
is not yet ready to be activated.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1445080

Gbp-Pq: Name Modify-NMDeviceModem-s-available-logic.patch
---
 src/devices/wwan/nm-device-modem.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/devices/wwan/nm-device-modem.c 
b/src/devices/wwan/nm-device-modem.c
index 39a34db..3bbd170 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -410,14 +410,15 @@ check_connection_available (NMDevice *device,
return FALSE;
 
state = nm_modem_get_state (priv->modem);
-   if (state <= NM_MODEM_STATE_INITIALIZING)
-   return FALSE;
 
if (state == NM_MODEM_STATE_LOCKED) {
if (!nm_connection_get_setting_gsm (connection))
return FALSE;
}
 
+   if (state <= NM_MODEM_STATE_SEARCHING)
+   return FALSE;
+
return TRUE;
 }
 
@@ -598,7 +599,7 @@ is_available (NMDevice *device, 
NMDeviceCheckDevAvailableFlags flags)
 
g_assert (priv->modem);
modem_state = nm_modem_get_state (priv->modem);
-   if (modem_state <= NM_MODEM_STATE_INITIALIZING)
+   if (modem_state <= NM_MODEM_STATE_SEARCHING)
return FALSE;
 
return TRUE;
-- 
2.7.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] Ignore wifi p2p devices

2016-06-10 Thread Tony Espy
Gbp-Pq: Name: Ignore-wifi-p2p-devices.patch
---
 src/devices/wifi/nm-wifi-factory.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/devices/wifi/nm-wifi-factory.c 
b/src/devices/wifi/nm-wifi-factory.c
index 2d5f8fa..7b1312d 100644
--- a/src/devices/wifi/nm-wifi-factory.c
+++ b/src/devices/wifi/nm-wifi-factory.c
@@ -73,6 +73,15 @@ create_device (NMDeviceFactory *factory,
g_return_val_if_fail (g_strcmp0 (iface, plink->name) == 0, NULL);
g_return_val_if_fail (NM_IN_SET (plink->type, NM_LINK_TYPE_WIFI, 
NM_LINK_TYPE_OLPC_MESH), NULL);
 
+   /* Explicitly ignore p2p Wi-Fi devices exposed by Android
+* drivers, and managed externally in the case of Wi-Fi Direct.
+*/
+   if (g_str_has_prefix (plink->name, "p2p")) {
+   nm_log_info (LOGD_HW, "(%s): ignoring P2P Wi-Fi interface", 
plink->name);
+   *out_ignore = TRUE;
+   return NULL;
+   }
+
if (!nm_platform_wifi_get_capabilities (NM_PLATFORM_GET,
plink->ifindex,
)) {
-- 
2.7.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: network manager and 10.42.0.1

2016-06-10 Thread Beniamino Galvani
On Fri, Jun 10, 2016 at 10:24:57AM +0200, Bhasker C V wrote:
> Hi all,
> 
>  I am following up this question after asking this with debian-users group.
> 
>  I am at a loss to find out how to change 10.42.0.1/24 and 10.42.0.x/24 as
> ip and dhcp range which is used by network manager when configuring a
> wireless card as an AP. I dont see the setting anywhere and cant find a
> valid doc in the internet too

Hi,

The value can be changed using the 'IPv4 address' property, but
unfortunately nm-applet doesn't support it. However you can use nmcli:

 $ nmcli connection modify Hotspot ipv4.address 172.25.16.1/24

as you did, and then re-activate the connection to apply the change:

 $ nmcli connection up Hotspot

Does this work? If not, which NM version are you using?

BTW, the parameter, as all other configuration options, is documented
in the 'nm-settings' man page ('ipv4 setting' section).

Beniamino


signature.asc
Description: PGP signature
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


network manager and 10.42.0.1

2016-06-10 Thread Bhasker C V
Hi all,

 I am following up this question after asking this with debian-users group.

 I am at a loss to find out how to change 10.42.0.1/24 and 10.42.0.x/24 as
ip and dhcp range which is used by network manager when configuring a
wireless card as an AP. I dont see the setting anywhere and cant find a
valid doc in the internet too
Is this value had-coded in the source-code of NetworkManager ?I tried using
nmcli to change the ipv4.address parameter but that does not take effect
and ultimately
IPV4.ADDRESS[1] is always set as 10.42.0.1/24
nm-applet also does not show any way to configure the local IP and dhcp
range for  a profile to act as hotspot

Is there a way to achieve this ?  Please can someone help


thanks

Bhasker C V
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM can't see WEP access point

2016-06-10 Thread Dan Williams
On Thu, 2016-06-09 at 16:47 -0500, Dan Williams wrote:
> On Thu, 2016-06-09 at 17:28 +0200, Bastien Nocera wrote:
> > 
> > On Thu, 2016-06-09 at 10:23 -0500, Dan Williams wrote:
> > > 
> > > 
> > > On Thu, 2016-06-09 at 17:13 +0200, Bastien Nocera wrote:
> > > > 
> > > > 
> > > > On Thu, 2016-06-09 at 10:00 -0500, Dan Williams wrote:
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > So I missed it before.  But your AP isn't actually set for
> > > > > WEP,
> > > > > it's
> > > > > set for WPA/TKIP.  If it's actually using just WEP, you won't
> > > > > see
> > > > > any
> > > > > of the RSN/WPA IEs in the beacon.
> > > > Still isn't right that it's not showing though, is it?
> > > Yeah.  Can you 'nmcli g log', then:
> > > 
> > > nmcli g log level debug domains  > > domains>,WIFI_SCAN
> > > 
> > > and then turn on airplane mode, turn it off, and wait for a bit
> > > until
> > > you're sure the AP doesn't get found by NM.  Then send me the
> > > logs
> > > and
> > > I'll take a look to see if I can figure out why NM doesn't find
> > > it.
> > >  If
> > > the supplicant sees it, but NM does not, then there's an NM bug
> > > somewhere.
> > Well, wpa_supplicant is throwing an error when you try to get the
> > RSN,
> > so I don't really expect NM to be able to process that access
> > point.
> The AP's beacon indicates that it is using TSN (Transition Security
> Network), since it's indicating WEP-104 as the group cipher (00 0f ac
> 05).  It looks like wpa_supplicant tries to handle that in some
> places,
> but ultimately the IE parsing in wpa_parse_wpa_ie_rsn() doesn't allow
> that, so the IE won't parse, and the supplicant wouldn't allow
> assocaiting to that network either.
> 
> So it's a bug in the supplicant for TSN networks.  For other testing,
> try disabling RSN/WPA2?  If the AP allows a "WEP-only" mode that's
> what
> I'd use.  You want *nothing* in the beacon that indicates RSN or WPA
> capabilities.

Jouni confirmed that there is a bug in the supplicant.  The
commit ce8963fc9f197771cd51ba2834fbdf711189641a ('Remove WEP40/WEP104
cipher suite support for WPA/WPA2') appears to have broken this
functionality (where the AP advertises WEP support in WPA/RSN IEs), but
it will still work for WEP-only APs.  Not sure what his solution will
be, since this behavior (TSN) is technically allowed by the standards
for WPA1 (but not necessarily for WPA2/RSN, I believe).

We should likely also modify NM to not reject the AP if the RSN IE
fails to parse, but to simply ignore WPA2/RSN on that AP and only allow
using TKIP, if present.  If the RSN IE fails to parse and the AP does
not support TKIP, then NM should correctly reject the AP, since RSN+WEP
is not really a valid mode.

Dan
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM can't see WEP access point

2016-06-10 Thread Bastien Nocera
On Fri, 2016-06-10 at 10:11 -0500, Dan Williams wrote:
> 

> Jouni confirmed that there is a bug in the supplicant.  The
> commit ce8963fc9f197771cd51ba2834fbdf711189641a ('Remove WEP40/WEP104
> cipher suite support for WPA/WPA2') appears to have broken this
> functionality (where the AP advertises WEP support in WPA/RSN IEs),
> but
> it will still work for WEP-only APs.  Not sure what his solution will
> be, since this behavior (TSN) is technically allowed by the standards
> for WPA1 (but not necessarily for WPA2/RSN, I believe).
> 
> We should likely also modify NM to not reject the AP if the RSN IE
> fails to parse, but to simply ignore WPA2/RSN on that AP and only
> allow
> using TKIP, if present.  If the RSN IE fails to parse and the AP does
> not support TKIP, then NM should correctly reject the AP, since
> RSN+WEP
> is not really a valid mode.

The only WEP-equivalent mode on the Airport Express (gen 1) I have is
labeled as "WEP (Transitional Security Network)".

I'll have to see how to set up a hotspot with WEP some other way for my
testing I think.

Cheers
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH 3/9] wwan: add support for using oFono as a modem manager

2016-06-10 Thread Tony Espy

On 06/09/2016 06:42 PM, Thomas Haller wrote:

On Wed, 2016-06-08 at 16:20 -0400, Tony Espy wrote:

From: Mathieu Trudel-Lapierre 

This patch adds core wwan support for ofono, as used by Ubuntu Touch.

Signed-off-by: Mathieu Trudel-Lapierre 

Gbp-Pq: Name wwan-add-support-for-using-oFono-as-a-modem-
manager.patch



Hi,

applying the patch series on master fails for this patch. I tried a bit
around but couldn't immediately find where it applies.

Could you kindly name a parent commit on which the series applies
without requiring manual intervening?


These patches all should apply to 1.2.2, however I made the mistake of 
extracting our ofono-specific patches without considering the changes 
made by the desktop-specific patches we also carry ( some that we 
inherit from Debian ).


I'll re-send shortly.

/tony



___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list