patch from richard:
this patch fix an issue with stateless sip requests. In some scenarios (depending of DNS replies), the request is being terminated before the message is sent. This patch fixes the issue. For stateless requests, if A/AAAA records for target of SRV record is not present in addl (additional list) of NAPTR/SRV DNS reply, we will explicitly query for those.
This commit is contained in:
parent
85ed43afd1
commit
64d5123da7
1 changed files with 5 additions and 18 deletions
|
@ -259,6 +259,11 @@ static int request_next(struct sip_request *req)
|
|||
if (req->addrl.head || req->srvl.head)
|
||||
goto again;
|
||||
}
|
||||
else if (!req->stateful) {
|
||||
req->resph = NULL;
|
||||
terminate(req, 0, NULL);
|
||||
mem_deref(req);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -427,12 +432,6 @@ static void naptr_handler(int err, const struct dnshdr *hdr, struct list *ansl,
|
|||
if (err)
|
||||
goto fail;
|
||||
|
||||
if (!req->stateful) {
|
||||
req->resph = NULL;
|
||||
terminate(req, 0, NULL);
|
||||
mem_deref(req);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
@ -487,12 +486,6 @@ static void srv_handler(int err, const struct dnshdr *hdr, struct list *ansl,
|
|||
if (err)
|
||||
goto fail;
|
||||
|
||||
if (!req->stateful) {
|
||||
req->resph = NULL;
|
||||
terminate(req, 0, NULL);
|
||||
mem_deref(req);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
@ -525,12 +518,6 @@ static void addr_handler(int err, const struct dnshdr *hdr, struct list *ansl,
|
|||
if (err)
|
||||
goto fail;
|
||||
|
||||
if (!req->stateful) {
|
||||
req->resph = NULL;
|
||||
terminate(req, 0, NULL);
|
||||
mem_deref(req);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Add table
Reference in a new issue