NM tries to activate contexts with empty AccessPointName attributes

Bug #1349562 reported by Tony Espy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Invalid
Undecided
Mathieu Trudel-Lapierre

Bug Description

Network Manager tries to activate ofono contexts for mobile data even if the AcessPointName attribute of the context is empty. Instead, Network Manager should ignore such contexts.

Reproduced on mako / #u148.

In order to reproduce, you need to do the following:

- Stop ofono

# stop ofono

- Edit ofono's gprs settings file so that it contains a single context with a blank AccessPointName.

# cd /var/lib/ofono/<ISMI>
# edit gprs file:

[Settings]
Powered=true
RoamingAllowed=false

[context1]
Name=default
AccessPointName=
Username=
Password=
Type=internet
Protocol=ip

- Reboot the phone

Notice that NetworkManager attempts to activate the context. Here's a snippet from my phone when I run the above steps ( albeit with a different context name ):

Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> WWAN now enabled by management service
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> (/ril_0) marked enabled: 1
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> trying to read IMSI contexts from oFono files
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> trying to read IMSI contexts from oFono files
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: reading configuration for IMSI 310410674422772
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add context for 310410674422772
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Name': ATT HAHAHAHAHAHA!!!
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'AccessPointName':
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Username':
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Password':
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Type': internet
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Protocol': ip
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: found internet context 'ATT HAHAHAHAHAHA!!!' (context1)
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> Auto-activating connection '/310410674422772/context1'.
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> Activation (/ril_0) starting connection '/310410674422772/context1'
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> (/ril_0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> NetworkManager state is now CONNECTING
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> Activation (/ril_0) Stage 1 of 5 (Device Prepare) scheduled...
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> Activation (/ril_0) Stage 1 of 5 (Device Prepare) started...
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> Activation (/ril_0) Stage 1 of 5 (Device Prepare) complete.
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: reading configuration for IMSI 310410674422772
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add context for 310410674422772
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Name': ATT HAHAHAHAHAHA!!!
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'AccessPointName':
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Username':
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Password':
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Type': internet
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: add property 'Protocol': ip
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: SCPlugin-Ofono: found internet context 'ATT HAHAHAHAHAHA!!!' (context1)
Jul 28 20:03:22 ubuntu-phablet ofonod[1181]: g_ril_request_setup_data_call: invalid apn length: 0
Jul 28 20:03:22 ubuntu-phablet ofonod[1181]: ril_gprs_context_activate_primary: couldn't build SETUP_DATA_CALL request for apn: .
Jul 28 20:03:22 ubuntu-phablet ofonod[1181]: ril_gprs_context_activate_primary: send SETUP_DATA_CALL failed for apn: (null).
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <warn> OFONO connection failed: (32) Operation failed
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> (/ril_0): device state change: prepare -> failed (reason 'unknown') [40 120 1]
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> NetworkManager state is now DISCONNECTED
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <warn> Activation (/ril_0) failed for connection '/310410674422772/context1'
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> (/ril_0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Jul 28 20:03:22 ubuntu-phablet NetworkManager[1470]: <info> (/ril_0): deactivating device (reason 'none') [0]
Jul 28 20:03:26 ubuntu-phablet kernel: [ 24.552815] SLIM_CL: skip reconfig sequence
Jul 28 20:03:26 ubuntu-phablet NetworkManager[1470]: <info> Auto-activating connection '/310410674422772/context1'.
Jul 28 20:03:26 ubuntu-phablet NetworkManager[1470]: <info> Activation (/ril_0) starting connection '/310410674422772/context1'
Jul 28 20:03:26 ubuntu-phablet NetworkManager[1470]: <info> (/ril_0): device state change: disconnected -> prepare (reason 'none') [30 40 0]

Tony Espy (awe)
Changed in network-manager (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Tony Espy (awe) wrote :

ofono was actually changed to allow GPRS contexts with empty AccessPointNames to be used for data connections. Changing this to Invalid.

Changed in network-manager (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.