diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-05-11 09:01:53 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-05-11 09:01:53 +0000 |
commit | 70a554a26450161a2bcf3e68ec23900f678a3c25 (patch) | |
tree | 3429139acc0a85f864fdc8a44992632dfd88284b /channels | |
parent | dda130c334e15f62ac5a5601f51059a7a9dfd2f3 (diff) |
Merged revisions 26760 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r26760 | kpfleming | 2006-05-11 03:52:46 -0500 (Thu, 11 May 2006) | 2 lines
ensure that we send a response to REGISTER requests that are successfully authenticated but contain invalid Contact URIs
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 137c35374..154147c64 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6814,6 +6814,9 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si switch (parse_register_contact(p, peer, req)) { case PARSE_REGISTER_FAILED: ast_log(LOG_WARNING, "Failed to parse contact info\n"); + transmit_response_with_date(p, "400 Bad Request", req); + peer->lastmsgssent = -1; + res = 0; break; case PARSE_REGISTER_QUERY: transmit_response_with_date(p, "200 OK", req); @@ -6837,11 +6840,13 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si peer = temp_peer(name); if (peer) { ASTOBJ_CONTAINER_LINK(&peerl, peer); - peer->lastmsgssent = -1; sip_cancel_destroy(p); switch (parse_register_contact(p, peer, req)) { case PARSE_REGISTER_FAILED: ast_log(LOG_WARNING, "Failed to parse contact info\n"); + transmit_response_with_date(p, "400 Bad Request", req); + peer->lastmsgssent = -1; + res = 0; break; case PARSE_REGISTER_QUERY: transmit_response_with_date(p, "200 OK", req); |