Closed Bug 1110529 Opened 9 years ago Closed 9 years ago

Recursive chaining in wrapped Android DNS resolver

Categories

(Core :: Networking: DNS, defect)

x86_64
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37
Tracking Status
firefox36 --- fixed
firefox37 --- fixed

People

(Reporter: esawin, Assigned: esawin)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 694325 introduced custom versions of getaddrinfo and related functions for pre-Honeycomb Android versions. For Android 3 and later versions however, the call to the system version of getaddrinfo (and related functions) is being incorrectly resolved to a recursive call to the wrapped custom implementation.
Assignee: nobody → esawin
Status: NEW → ASSIGNED
Depends on: 1109940
Blocks: 991923
Attached patch wrap-dns-resolver-fix (obsolete) — Splinter Review
This patch calls the system function instead of the wrapped versions.
This patch is based on Firefox <=35 or 36 with the patch from bug 1109940 applied.
Attachment #8535306 - Flags: review?(mh+mozilla)
Attachment #8535306 - Flags: feedback?(sworkman)
Comment on attachment 8535306 [details] [diff] [review]
wrap-dns-resolver-fix

Review of attachment 8535306 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. Had to read up on the __real prefix - from what I've read, this all looks sane.
Attachment #8535306 - Flags: feedback?(sworkman) → feedback+
Attachment #8535306 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8535306 [details] [diff] [review]
wrap-dns-resolver-fix

Review of attachment 8535306 [details] [diff] [review]:
-----------------------------------------------------------------

::: other-licenses/android/getaddrinfo.c
@@ +433,5 @@
>  const char *
>  __wrap_gai_strerror(int ecode)
>  {
>  	if (honeycomb_or_later())
> +		return __real_gai_strerror(ecode);

Note, you may want to add declarations for those functions. GCC is probably going to warn about those functions being implicitly defined.
Added function declarations.
Attachment #8535306 - Attachment is obsolete: true
Attachment #8537176 - Flags: review+
Landed in bug 1109940 (https://bugzilla.mozilla.org/show_bug.cgi?id=1109940#c6).
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8537176 [details] [diff] [review]
wrap-dns-resolver-fix

If approved, it should land after bug 1109940.

Approval Request Comment
[Feature/regressing bug #]: bug 694325
[User impact if declined]: blocks bug 991923, major connectivity issues when switching networks or using VPNs
[Describe test coverage new/current, TBPL]: has been on nightly for some days
[Risks and why]: none, changed code path is not executed before patch from bug 991923 has landed
[String/UUID change made/needed]: none

honeycomb_or_later
Attachment #8537176 - Flags: approval-mozilla-aurora?
Attachment #8537176 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.