Closed
Bug 879225
Opened 11 years ago
Closed 11 years ago
B2G MMS: When mms APN is not shared with default data connection, mmsc/mmsproxy host routes aren't set.
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: ctai, Assigned: vicamo)
References
Details
(Whiteboard: [fixed-in-birch])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
When mms APN is not shared with default data connection, mmsc/mmsproxy host routes aren't set because of possible mismatching format like 10.1.1.1, or http://mmsc:8080. The first case is ignored and the second triggers an exception. So when mms and default data connection are the same one, traffic to mmsproxy will be directed to wrong network interface.
Reporter | ||
Comment 1•11 years ago
|
||
This is a follow-up fix for leo+ bug 875390. SO I nominate it for leo+. It will cause sending/receiving MMS fail in some sim card with data connection on.
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #758385 -
Flags: review?(gene.lian)
Attachment #758385 -
Flags: feedback?(ctai)
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 758385 [details] [diff] [review] patch Review of attachment 758385 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/NetworkManager.js @@ +228,5 @@ > > ppmm.addMessageListener('NetworkInterfaceList:ListInterface', this); > + > + // Used in resolveHostname(). > + defineLazyRegExp(this, "REGEXP_IPV4", "^\\d{1,3}(?:\\.\\d{1,3}){3}$"); Should we also support IPV6?
Attachment #758385 -
Flags: feedback?(ctai) → feedback+
Comment 4•11 years ago
|
||
Comment on attachment 758385 [details] [diff] [review] patch Review of attachment 758385 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/NetworkManager.js @@ +32,5 @@ > "nsIDNSService"); > > +XPCOMUtils.defineLazyServiceGetter(this, "gIoService", > + "@mozilla.org/network/io-service;1", > + "nsIIOService"); You don't really need this. Please see below. @@ +136,5 @@ > > +function defineLazyRegExp(obj, name, pattern) { > + obj.__defineGetter__(name, function() { > + delete obj[name]; > + return obj[name] = new RegExp(pattern); I don't really get it. Why do you need to delete the property and create a new RegExp object for it whenever looking up the property? Shouldn't it be: if (obj[name] === undefined) { obj[name] = new RegExp(pattern); } return obj[name]; @@ +626,5 @@ > let retval = []; > > + for (let hostname of hosts) { > + try { > + let uri = gIoService.newURI(hostname, null, null); Nice clean-up! But I think you can directly use: Services.io.newURI(hostname, null, null); since the |Services.jsm| has already imported in the NetworkManager.js. @@ +636,5 @@ > continue; > } > > + try { > + let hostnameIps = gDNSService.resolve(hostname, 0); It's fine to wrap this in a try block. Just curious about why need to do so.
Comment 5•11 years ago
|
||
(In reply to Gene Lian [:gene] from comment #4) > @@ +136,5 @@ > > > > +function defineLazyRegExp(obj, name, pattern) { > > + obj.__defineGetter__(name, function() { > > + delete obj[name]; > > + return obj[name] = new RegExp(pattern); > > I don't really get it. Why do you need to delete the property and create a > new RegExp object for it whenever looking up the property? > > Shouldn't it be: > > if (obj[name] === undefined) { > obj[name] = new RegExp(pattern); > } > return obj[name]; I'm wrong. This is really an advanced coding skill. Good to learn. :)
Comment 6•11 years ago
|
||
Comment on attachment 758385 [details] [diff] [review] patch r=me after using Services.io.newURI(...). Thanks!
Attachment #758385 -
Flags: review?(gene.lian) → review+
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Gene Lian [:gene] from comment #4) > Review of attachment 758385 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/system/gonk/NetworkManager.js > @@ +636,5 @@ > > + try { > > + let hostnameIps = gDNSService.resolve(hostname, 0); > > It's fine to wrap this in a try block. Just curious about why need to do so. Feeding anything |gDNSService.resolve| don't recognize results in an exception thrown. In order not to affect following operations, wrapping with try-catch here seems nice to me.
Assignee | ||
Comment 8•11 years ago
|
||
1) add IPv6 matching. Android libnetutils does support IPv6 host routing. 2) use |Services.io| instead.
Attachment #758385 -
Attachment is obsolete: true
Attachment #758453 -
Flags: review+
Assignee | ||
Comment 9•11 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/afb71a02b5c5
Whiteboard: [fixed-in-birch]
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/afb71a02b5c5
Assignee: nobody → vyang
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•11 years ago
|
blocking-b2g: leo? → leo+
Comment 11•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/7b5b8b85cc94
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-b2g-v1.1hd:
--- → affected
status-firefox22:
--- → wontfix
status-firefox23:
--- → wontfix
status-firefox24:
--- → fixed
Updated•11 years ago
|
Flags: in-moztrap-
You need to log in
before you can comment on or make changes to this bug.
Description
•