Default route of 3G data call disappeared (after receiving disconnected event from wlan0)

RESOLVED FIXED in Firefox 25, Firefox OS v1.1hd

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: swu, Assigned: dimi)

Tracking

unspecified
1.2 FC (16sep)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:leo+, firefox24 wontfix, firefox25 fixed, b2g18 fixed, b2g-v1.1hd fixed, b2g-v1.2 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
I tested this on Unagi device using mozill-central code.

STR:
1. Establish data call, and make sure default route of rmnet0 exists.
2. Enable Wifi, but don't connect to any Wifi network.
3. Wait until receiving state change event (NETWORK_STATE_DISCONNECTED) from wlan0.
4. Default route of rmnet0 disappeared.

Below is the NetworkManager log for this problem.

=== BEFORE ===

uid=0 gid=0@android:/ # route -n                                               
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         100.73.137.225  0.0.0.0         UG    0      0        0 rmnet0
100.73.137.224  0.0.0.0         255.255.255.240 U     0      0        0 rmnet0
168.95.1.1      100.73.137.225  255.255.255.255 UGH   0      0        0 rmnet0
168.95.192.1    100.73.137.225  255.255.255.255 UGH   0      0        0 rmnet0


I/Gecko   (  622): -*- NetworkManager: NetworkManager received message from worker: {"id":"broadcast","topic":"netd-interface-change","reason":"Iface linkstate wlan0 down"}
I/Gecko   (  622): -*- NetworkManager: NetworkManager received message from worker: {"id":"broadcast","topic":"netd-interface-change","reason":"Iface linkstate wlan0 down"}
I/Gecko   (  622): -*- NetworkManager: Network wlan0 changed state to 3
I/Gecko   (  622): -*- NetworkManager: Evaluating whether active network needs to be changed.
I/Gecko   (  622): -*- NetworkManager: Going to change route and DNS to rmnet0
I/Gecko   (  622): -*- NetworkManager: ===== setDefaultRouteAndDNS() {"cmd":"setDefaultRouteAndDNS","ifname":"rmnet0","oldIfname":null,"gateway_str":"100.73.137.225","dns1_str":"168.95.1.1","dns2_str":"168.95.192.1"}
I/Gecko   (  622): -*- NetworkManager: No proxy support for rmnet0 network interface.
I/Gecko   (  622): -*- NetworkManager: NetworkManager received message from worker: {}
I/Gecko   (  622): -*- NetworkManager: NetworkManager received message from worker: {}
I/Gecko   (  622): -*- NetworkManager: NetworkManager received message from worker: {"id":"broadcast","topic":"netd-interface-change","reason":"Iface linkstate wlan0 down"}
I/Gecko   (  622): -*- NetworkManager: NetworkManager received message from worker: {"id":"broadcast","topic":"netd-interface-change","reason":"Iface linkstate wlan0 down"}

=== AFTER ===

uid=0 gid=0@android:/ # route -n                                               
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
168.95.1.1      100.73.137.225  255.255.255.255 UGH   0      0        0 rmnet0
168.95.192.1    100.73.137.225  255.255.255.255 UGH   0      0        0 rmnet0
(Reporter)

Comment 1

5 years ago
Log with both "Network Worker" and NetworkManager.

I/Gecko   (  108): -*- NetworkManager: Network wlan0 changed state to 3
I/Gecko   (  108): Network Worker: received message: {"cmd":"removeNetworkRoute","ifname":"rmnet0","ip":"100.74.66.19","netmask":"255.255.255.248"}
I/Gecko   (  108): -*- NetworkManager: Evaluating whether active network needs to be changed.
I/Gecko   (  108): -*- NetworkManager: Going to change route and DNS to rmnet0
I/Gecko   (  108): -*- NetworkManager: ===== setDefaultRouteAndDNS() {"cmd":"setDefaultRouteAndDNS","ifname":"rmnet0","oldIfname":null,"gateway_str":"100.74.66.17","dns1_str":"168.95.1.1","dns2_str":"168.95.192.1"}
I/Gecko   (  108): Network Worker: received message: {"cmd":"setDefaultRouteAndDNS","ifname":"rmnet0","oldIfname":null,"gateway_str":"100.74.66.17","dns1_str":"168.95.1.1","dns2_str":"168.95.192.1"}
I/Gecko   (  108): -*- NetworkManager: No proxy support for rmnet0 network interface.

For unknown reason, after routing table removed by removeNetworkRoute(), default route was not added successfully by setDefaultRouteAndDNS().
(Assignee)

Updated

5 years ago
Assignee: nobody → dlee
(Assignee)

Comment 2

5 years ago
Created attachment 770006 [details] [diff] [review]
Fix for bug 888828
Attachment #770006 - Flags: review?(vchang)
Attachment #770006 - Flags: review?(vchang) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/0bfcc6f663bb
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
https://bugzilla.mozilla.org/show_bug.cgi?id=834573#c18

seem like we need to make uplifts to fix this bug in v1.1 and possibly v1.2 branches?
blocking-b2g: --- → leo?
status-b2g18: --- → ?
status-b2g-v1.1hd: --- → ?
status-b2g-v1.2: --- → ?

Updated

5 years ago
status-b2g18: ? → affected
status-b2g-v1.1hd: ? → affected
status-b2g-v1.2: ? → affected

Comment 6

5 years ago
Maybe we can go for v1.1?
leo+. this will cause data connection problems after a device is disconnected from wifi
blocking-b2g: leo? → leo+
(Assignee)

Comment 8

5 years ago
Created attachment 817740 [details] [diff] [review]
Bug_888828_fix_for_1_1_HD.patch
This landed on m-c well before Gecko26, so it's already fixed in v1.2. If something isn't working there, you should probably file a new bug for it.

https://hg.mozilla.org/releases/mozilla-b2g18/rev/87cd74983a39
status-b2g18: affected → fixed
status-b2g-v1.2: affected → fixed
status-firefox24: --- → wontfix
status-firefox25: --- → fixed
Target Milestone: --- → 1.2 FC (16sep)
You need to log in before you can comment on or make changes to this bug.