Opened 15 years ago

Last modified 15 years ago

#686 closed defect

Failure to cancel outstanding DNS SRV query job (API change) — at Version 1

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.0.1
Component: pjlib-util Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

The DNS SRV resolver (the pj_dns_srv_resolve() function) provides a feature to cancel outstanding DNS SRV query job, by using pj_dns_resolver_cancel_query().

This doesn't work for DNS SRV resolver, because once the resolver is in the state of resolving hosts with DNS A resolution, the current query job is now different than that is returned by the original pj_dns_srv_resolve() call.

This will cause pj_dns_resolver_cancel_query() to potentially cancel the wrong query, and because the intended query or queries are not canceled, they will call the callback when the DNS response is finally received, and this will cause crash/segmentation fault (or assertion in debug mode).

The crash is reproducible by running pjnath unit test, in the TURN socket destroy test (on Linux i386, gcc-4.1.1).

Change History (1)

comment:1 Changed 15 years ago by bennylp

  • Description modified (diff)
Note: See TracTickets for help on using tickets.