Re: Problems with gobi 4000 connecting via QMI

2016-02-08 Thread Dan Williams
On Mon, 2016-02-08 at 14:51 +0100, Harald Jung wrote:
> Hi,
> 
> finally the notebook was sent to me and i have the same problems.
> I use a SIM which has been succesfully used in other notebooks.
> The problem is still the same:
> 
Are you 100% sure the APN used is correct?

Also, does the SIM have a PIN enabled?  I seem to recall some reports
that connections right after unblocking the SIM PIN fail, but waiting a
bit makes things work.

Dan

> Feb  8 14:52:40 ThinClient NetworkManager[2243]:  keyfile: add 
> connection /etc/NetworkManager/system-connections/1&1 Mobile
> Broadband 
> (c29aa52c-56fa-47cd-b0b4-b44b00175d29,"1&1 Mobile Broadband")
> Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> Activation: starting connection '1&1 Mobile Broadband' 
> (c29aa52c-56fa-47cd-b0b4-b44b00175d29)
> Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> device state change: disconnected -> prepare (reason 'none') [30 40
> 0]
> Feb  8 14:52:40 ThinClient NetworkManager[2243]: 
> NetworkManager 
> state is now CONNECTING
> Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
> started...
> Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
> state (4/8): Wait to get fully enabled
> Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
> state (5/8): Register
> Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
> state (6/8): Bearer
> Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
> state (7/8): Connect
> Feb  8 14:52:40 ThinClient ModemManager[2146]:   Modem 
> /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> 
> connecting)
> Feb  8 14:52:40 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
> Allocating new client ID...
> Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> modem state changed, 'registered' --> 'connecting' (reason: user
> -requested)
> Feb  8 14:52:40 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
> Registered 'wds' (version 1.23) client with ID '1'
> Feb  8 14:52:43 ThinClient ModemManager[2146]:  error: couldn't
> get current settings: QMI protocol error (15): 'OutOfCall'
> Feb  8 14:52:43 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
> Allocating new client ID...
> Feb  8 14:52:43 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
> Registered 'wds' (version 1.23) client with ID '2'
> Feb  8 14:52:43 ThinClient ModemManager[2146]:  error: couldn't
> start network: QMI protocol error (64): '(null)'
> Feb  8 14:52:43 ThinClient ModemManager[2146]:   Modem 
> /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> 
> connected)
> Feb  8 14:52:43 ThinClient ModemManager[2146]:  Simple connect 
> state (8/8): All done
> Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> modem state changed, 'connecting' --> 'connected' (reason: user
> -requested)
> Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> failed to connect modem: invalid bearer IP configuration
> Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> device state change: prepare -> failed (reason 'config-failed') [40
> 120 4]
> Feb  8 14:52:43 ThinClient NetworkManager[2243]: 
> NetworkManager 
> state is now DISCONNECTED
> Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> Activation: failed for connection '1&1 Mobile Broadband'
> Feb  8 14:52:43 ThinClient ModemManager[2146]:   Modem 
> /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> 
> disconnecting)
> Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> device state change: failed -> disconnected (reason 'none') [120 30
> 0]
> Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> modem state changed, 'connected' --> 'disconnecting' (reason: 
> user-requested)
> Feb  8 14:52:44 ThinClient ModemManager[2146]:   Modem 
> /org/freedesktop/ModemManager1/Modem/0: state changed (disconnecting 
> -> 
> registered)
> Feb  8 14:52:44 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
> modem state changed, 'disconnecting' --> 'registered' (reason: 
> user-requested
> 
> 
> regards Harald
> 
> 
> Am 20.01.2016 um 13:46 schrieb Harald Jung:
> > Hi,
> > 
> > when another SIM is used, the messages are  "user request" oder 
> > "none", nm-applet gives a messages
> > Creating object path 
> > '/org/freedesktop/NetworkManager/ActiveConnection/1" failed in nm
> > -glib.
> > But I have no logfile from that test.
> > Anyway the connection was tried with the installed Windows and it 
> > worked with any SIM.
> > 
> > 
> > Harald
> > 
> > Am 06.01.2016 um 17:14 schrieb Dan Williams:
> > > On Wed, 2016-01-06 at 17:11 +0100, Harald Jung wrote:
> > > > Hi Dan,
> > > > 
> > > > yeah the sim was tested with a mobile phone and in another
> > > > notebook.
> > > > The SIM also works from the windows installation on the
> > > > notebook.
> > > > ModemManager is version 1.4.10
> > > Do other SIMs work in the same modem?
> > > 
> > > Dan
> > > 
> > > > Harald
> > > > 
> > > > Am 06.01.2016 um 

Re: WPA2-Enterprise and server certificate verification

2016-02-08 Thread Dan Williams
On Mon, 2016-02-08 at 12:09 +0100, Christian Hesse wrote:
> Hello everybody,
> 
> when networkmanager connects to a WPA/WPA2-Enterprise secured notwork
> it can
> check the validity of the server certificate against a CA
> certificate.
> 
> Connecting to the authentication server does not include a domain
> name,
> though. So by default there is no way to check the certificate CN
> value. This
> results in a potential security issue: If anybody has a certificate
> with
> *any* CN issued by the same CA networkmanager will accept it as
> valid.
> An attacker can set up access points with same SSID and forged
> authentication
> server to phish user credentials and redirect network traffic.
> 
> Since version 2.1 wpa_supplicant supports configuration option
> 'domain_suffix_match' to manually specify a domain (suffix) to match
> the
> server certificate against. 'domain_match' was added later on.
> 
> I would like to see a configuration option within networkmanager for
> this
> setting. Any chance to add that?

Yes, it's come up recently on bugzilla.gnome.org too and it should
likely get added alongside the existing subject matching support.

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


WPA2-Enterprise and server certificate verification

2016-02-08 Thread Christian Hesse
Hello everybody,

when networkmanager connects to a WPA/WPA2-Enterprise secured notwork it can
check the validity of the server certificate against a CA certificate.

Connecting to the authentication server does not include a domain name,
though. So by default there is no way to check the certificate CN value. This
results in a potential security issue: If anybody has a certificate with
*any* CN issued by the same CA networkmanager will accept it as valid.
An attacker can set up access points with same SSID and forged authentication
server to phish user credentials and redirect network traffic.

Since version 2.1 wpa_supplicant supports configuration option
'domain_suffix_match' to manually specify a domain (suffix) to match the
server certificate against. 'domain_match' was added later on.

I would like to see a configuration option within networkmanager for this
setting. Any chance to add that?
-- 
main(a){char*c=/*Best regards,   */"B?IJj;MEH"
"CX:;",b;for(a/*Chris   get my mail address:*/=0;b=c[a++];)
putchar(b-1/(/*   gcc -o sig sig.c && ./sig*/b/42*2-3)*42);}


pgpJdG4tRVFsc.pgp
Description: OpenPGP digital signature
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Problems with gobi 4000 connecting via QMI

2016-02-08 Thread Harald Jung

yeah, its the vodafone apn i always use in my tests.
It was running for weeks inside an arm based router with the same 
settings, before i took it back.

The SIM has a PIN and was succesfully unlocked.

Harald

Am 08.02.2016 um 17:32 schrieb Dan Williams:

On Mon, 2016-02-08 at 14:51 +0100, Harald Jung wrote:

Hi,

finally the notebook was sent to me and i have the same problems.
I use a SIM which has been succesfully used in other notebooks.
The problem is still the same:


Are you 100% sure the APN used is correct?

Also, does the SIM have a PIN enabled?  I seem to recall some reports
that connections right after unblocking the SIM PIN fail, but waiting a
bit makes things work.

Dan


Feb  8 14:52:40 ThinClient NetworkManager[2243]:  keyfile: add
connection /etc/NetworkManager/system-connections/1&1 Mobile
Broadband
(c29aa52c-56fa-47cd-b0b4-b44b00175d29,"1&1 Mobile Broadband")
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0):
Activation: starting connection '1&1 Mobile Broadband'
(c29aa52c-56fa-47cd-b0b4-b44b00175d29)
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0):
device state change: disconnected -> prepare (reason 'none') [30 40
0]
Feb  8 14:52:40 ThinClient NetworkManager[2243]: 
NetworkManager
state is now CONNECTING
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect
started...
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect
state (4/8): Wait to get fully enabled
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect
state (5/8): Register
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect
state (6/8): Bearer
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect
state (7/8): Connect
Feb  8 14:52:40 ThinClient ModemManager[2146]:   Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (registered ->
connecting)
Feb  8 14:52:40 ThinClient ModemManager[2146]: [/dev/cdc-wdm0]
Allocating new client ID...
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0):
modem state changed, 'registered' --> 'connecting' (reason: user
-requested)
Feb  8 14:52:40 ThinClient ModemManager[2146]: [/dev/cdc-wdm0]
Registered 'wds' (version 1.23) client with ID '1'
Feb  8 14:52:43 ThinClient ModemManager[2146]:  error: couldn't
get current settings: QMI protocol error (15): 'OutOfCall'
Feb  8 14:52:43 ThinClient ModemManager[2146]: [/dev/cdc-wdm0]
Allocating new client ID...
Feb  8 14:52:43 ThinClient ModemManager[2146]: [/dev/cdc-wdm0]
Registered 'wds' (version 1.23) client with ID '2'
Feb  8 14:52:43 ThinClient ModemManager[2146]:  error: couldn't
start network: QMI protocol error (64): '(null)'
Feb  8 14:52:43 ThinClient ModemManager[2146]:   Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (connecting ->
connected)
Feb  8 14:52:43 ThinClient ModemManager[2146]:  Simple connect
state (8/8): All done
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0):
modem state changed, 'connecting' --> 'connected' (reason: user
-requested)
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0):
failed to connect modem: invalid bearer IP configuration
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0):
device state change: prepare -> failed (reason 'config-failed') [40
120 4]
Feb  8 14:52:43 ThinClient NetworkManager[2243]: 
NetworkManager
state is now DISCONNECTED
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0):
Activation: failed for connection '1&1 Mobile Broadband'
Feb  8 14:52:43 ThinClient ModemManager[2146]:   Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (connected ->
disconnecting)
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0):
device state change: failed -> disconnected (reason 'none') [120 30
0]
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0):
modem state changed, 'connected' --> 'disconnecting' (reason:
user-requested)
Feb  8 14:52:44 ThinClient ModemManager[2146]:   Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (disconnecting
->
registered)
Feb  8 14:52:44 ThinClient NetworkManager[2243]:  (cdc-wdm0):
modem state changed, 'disconnecting' --> 'registered' (reason:
user-requested


regards Harald


Am 20.01.2016 um 13:46 schrieb Harald Jung:

Hi,

when another SIM is used, the messages are  "user request" oder
"none", nm-applet gives a messages
Creating object path
'/org/freedesktop/NetworkManager/ActiveConnection/1" failed in nm
-glib.
But I have no logfile from that test.
Anyway the connection was tried with the installed Windows and it
worked with any SIM.


Harald

Am 06.01.2016 um 17:14 schrieb Dan Williams:

On Wed, 2016-01-06 at 17:11 +0100, Harald Jung wrote:

Hi Dan,

yeah the sim was tested with a mobile phone and in another
notebook.
The SIM also works from the windows installation on the
notebook.
ModemManager is version 1.4.10

Do other SIMs work in the same modem?

Dan


Harald

Am 06.01.2016 um 16:57 schrieb Dan Williams:

On Wed, 2016-01-06 at 16:01 +0100, Harald Jung wrote:

Hi,

the "HP lt4112 Gobi 4G Module" 

Re: Problems with gobi 4000 connecting via QMI

2016-02-08 Thread Harald Jung

Hi,

finally the notebook was sent to me and i have the same problems.
I use a SIM which has been succesfully used in other notebooks.
The problem is still the same:
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  keyfile: add 
connection /etc/NetworkManager/system-connections/1&1 Mobile Broadband 
(c29aa52c-56fa-47cd-b0b4-b44b00175d29,"1&1 Mobile Broadband")
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
Activation: starting connection '1&1 Mobile Broadband' 
(c29aa52c-56fa-47cd-b0b4-b44b00175d29)
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
device state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  NetworkManager 
state is now CONNECTING
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
started...
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
state (4/8): Wait to get fully enabled
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
state (5/8): Register
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
state (6/8): Bearer
Feb  8 14:52:40 ThinClient ModemManager[2146]:  Simple connect 
state (7/8): Connect
Feb  8 14:52:40 ThinClient ModemManager[2146]:   Modem 
/org/freedesktop/ModemManager1/Modem/0: state changed (registered -> 
connecting)
Feb  8 14:52:40 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
Allocating new client ID...
Feb  8 14:52:40 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Feb  8 14:52:40 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
Registered 'wds' (version 1.23) client with ID '1'
Feb  8 14:52:43 ThinClient ModemManager[2146]:  error: couldn't 
get current settings: QMI protocol error (15): 'OutOfCall'
Feb  8 14:52:43 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
Allocating new client ID...
Feb  8 14:52:43 ThinClient ModemManager[2146]: [/dev/cdc-wdm0] 
Registered 'wds' (version 1.23) client with ID '2'
Feb  8 14:52:43 ThinClient ModemManager[2146]:  error: couldn't 
start network: QMI protocol error (64): '(null)'
Feb  8 14:52:43 ThinClient ModemManager[2146]:   Modem 
/org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> 
connected)
Feb  8 14:52:43 ThinClient ModemManager[2146]:  Simple connect 
state (8/8): All done
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
modem state changed, 'connecting' --> 'connected' (reason: user-requested)
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
failed to connect modem: invalid bearer IP configuration
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
device state change: prepare -> failed (reason 'config-failed') [40 120 4]
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  NetworkManager 
state is now DISCONNECTED
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
Activation: failed for connection '1&1 Mobile Broadband'
Feb  8 14:52:43 ThinClient ModemManager[2146]:   Modem 
/org/freedesktop/ModemManager1/Modem/0: state changed (connected -> 
disconnecting)
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
device state change: failed -> disconnected (reason 'none') [120 30 0]
Feb  8 14:52:43 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
modem state changed, 'connected' --> 'disconnecting' (reason: 
user-requested)
Feb  8 14:52:44 ThinClient ModemManager[2146]:   Modem 
/org/freedesktop/ModemManager1/Modem/0: state changed (disconnecting -> 
registered)
Feb  8 14:52:44 ThinClient NetworkManager[2243]:  (cdc-wdm0): 
modem state changed, 'disconnecting' --> 'registered' (reason: 
user-requested



regards Harald


Am 20.01.2016 um 13:46 schrieb Harald Jung:

Hi,

when another SIM is used, the messages are  "user request" oder 
"none", nm-applet gives a messages
Creating object path 
'/org/freedesktop/NetworkManager/ActiveConnection/1" failed in nm-glib.

But I have no logfile from that test.
Anyway the connection was tried with the installed Windows and it 
worked with any SIM.



Harald

Am 06.01.2016 um 17:14 schrieb Dan Williams:

On Wed, 2016-01-06 at 17:11 +0100, Harald Jung wrote:

Hi Dan,

yeah the sim was tested with a mobile phone and in another notebook.
The SIM also works from the windows installation on the notebook.
ModemManager is version 1.4.10

Do other SIMs work in the same modem?

Dan


Harald

Am 06.01.2016 um 16:57 schrieb Dan Williams:

On Wed, 2016-01-06 at 16:01 +0100, Harald Jung wrote:

Hi,

the "HP lt4112 Gobi 4G Module" can't establish a network
connection.
The device is recognozied by the system, but the IP connection
fails.

Details and logs can be found here: http://www.hjit.de/lt4112.txt


What version of ModemManager?  I see a ModemManager errors there
(like
"ModemManager[2018]: (mm-broadband-modem
-qmi.c:1238):dms_get_ids_ready:
code should not be reached")  but those are recovered.

In any case, your SIM is not provisioned for the operator:
'Couldn't
get MSISDN: QMI protocol error (16): 

Re: WPA2-Enterprise and server certificate verification

2016-02-08 Thread Christian Hesse
Christian Hesse  on Mon, 2016/02/08 21:23:
> > Yes, it's come up recently on bugzilla.gnome.org too and it should
> > likely get added  
> 
> Ah, nice. Do you have a link for the bug? I did not find it...
> And is anybody working on this?

Uh, just found this one...

https://bugzilla.gnome.org/show_bug.cgi?id=341323

So this is pending since nearly ten years?
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Chris   get my mail address:*/=0;b=c[a++];)
putchar(b-1/(/*   gcc -o sig sig.c && ./sig*/b/42*2-3)*42);}


pgpcODn14xH7i.pgp
Description: OpenPGP digital signature
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: WPA2-Enterprise and server certificate verification

2016-02-08 Thread Christian Hesse
Dan Williams  on Mon, 2016/02/08 10:21:
> On Mon, 2016-02-08 at 12:09 +0100, Christian Hesse wrote:
> > Hello everybody,
> > 
> > when networkmanager connects to a WPA/WPA2-Enterprise secured notwork
> > it can
> > check the validity of the server certificate against a CA
> > certificate.
> > 
> > Connecting to the authentication server does not include a domain
> > name,
> > though. So by default there is no way to check the certificate CN
> > value. This
> > results in a potential security issue: If anybody has a certificate
> > with
> > *any* CN issued by the same CA networkmanager will accept it as
> > valid.
> > An attacker can set up access points with same SSID and forged
> > authentication
> > server to phish user credentials and redirect network traffic.
> > 
> > Since version 2.1 wpa_supplicant supports configuration option
> > 'domain_suffix_match' to manually specify a domain (suffix) to match
> > the
> > server certificate against. 'domain_match' was added later on.
> > 
> > I would like to see a configuration option within networkmanager for
> > this
> > setting. Any chance to add that?  
> 
> Yes, it's come up recently on bugzilla.gnome.org too and it should
> likely get added

Ah, nice. Do you have a link for the bug? I did not find it...
And is anybody working on this?

> alongside the existing subject matching support.

Ah, missed that.
But is there a way to change this in GUI?
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Chris   get my mail address:*/=0;b=c[a++];)
putchar(b-1/(/*   gcc -o sig sig.c && ./sig*/b/42*2-3)*42);}


pgpIK8JTviulD.pgp
Description: OpenPGP digital signature
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: WPA2-Enterprise and server certificate verification

2016-02-08 Thread Dan Williams
On Mon, 2016-02-08 at 21:35 +0100, Christian Hesse wrote:
> Christian Hesse  on Mon, 2016/02/08 21:23:
> > > Yes, it's come up recently on bugzilla.gnome.org too and it
> > > should
> > > likely get added  
> > 
> > Ah, nice. Do you have a link for the bug? I did not find it...
> > And is anybody working on this?
> 
> Uh, just found this one...
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=341323
> 
> So this is pending since nearly ten years?

No, the bug was originally about alt_subjectmatch functionality which
was added years ago.  It then got "repurposed" by some people to
request the domain_suffix_match functionality which was first added to
wpa_supplicant in version 2.1.  After some back-and-forth with upstream
supplicant about the exact semantics of domain_suffix_match, even that
won't solve everyone's problems, but it's good enough for most people.

Part of the lag here is that there shouldn't have to be 3+ different
options for validating certificates, and people apparently cannot
figure out a good single mechanism to do so.  I think that would
ideally be a list of allowed domains to match, but the supplicant
doesn't implement that.  So we're left with domain_suffix_match which
will work for many people, but apparently not some large users (like
MIT).

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


[PATCH] wifi: allow autoconnect on AP/AdHoc mode connections with manual IP configuration

2016-02-08 Thread Dan Williams
The existing checks assumed that all AP/AdHoc connections would use the
shared IP method.  But what we really want to check for here is whether the
connection is AP/AdHoc.  Leave the existing 'shared' check for backwards
compatibility.

Also move the check above the timestamp check, since the user shouldn't need
to manually set a timestamp just to get an AP-mode connection to autoconnect.
---
 src/devices/wifi/nm-device-wifi.c | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/devices/wifi/nm-device-wifi.c 
b/src/devices/wifi/nm-device-wifi.c
index 8ea3b68..4198a8a 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -1140,13 +1140,25 @@ can_auto_connect (NMDevice *device,
 {
NMDeviceWifi *self = NM_DEVICE_WIFI (device);
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
+   NMSettingWireless *s_wifi;
GSList *ap_iter;
-   const char *method = NULL;
+   const char *method, *mode;
guint64 timestamp = 0;
 
if (!NM_DEVICE_CLASS (nm_device_wifi_parent_class)->can_auto_connect 
(device, connection, specific_object))
return FALSE;
 
+   s_wifi = nm_connection_get_setting_wireless (connection);
+   g_return_val_if_fail (s_wifi, FALSE);
+
+   /* Always allow autoconnect for shared/Ad-Hoc/AP */
+   method = nm_utils_get_ip_config_method (connection, 
NM_TYPE_SETTING_IP4_CONFIG);
+   mode = nm_setting_wireless_get_mode (s_wifi);
+   if (   g_strcmp0 (mode, NM_SETTING_WIRELESS_MODE_ADHOC) == 0
+   || g_strcmp0 (mode, NM_SETTING_WIRELESS_MODE_AP) == 0
+   || g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED) == 0)
+   return TRUE;
+
/* Don't autoconnect to networks that have been tried at least once
 * but haven't been successful, since these are often accidental choices
 * from the menu and the user may not know the password.
@@ -1156,11 +1168,6 @@ can_auto_connect (NMDevice *device,
return FALSE;
}
 
-   /* Use the connection if it's a shared connection */
-   method = nm_utils_get_ip_config_method (connection, 
NM_TYPE_SETTING_IP4_CONFIG);
-   if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED))
-   return TRUE;
-
for (ap_iter = priv->ap_list; ap_iter; ap_iter = g_slist_next 
(ap_iter)) {
NMAccessPoint *ap = NM_AP (ap_iter->data);
 
-- 
2.4.3
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list