diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 13:13:51 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 13:13:51 +0000 |
commit | bc5fc3cd95eb8c376db22771a7ce81aa789dcb35 (patch) | |
tree | c6ec91c0b94ffe667d86fee2e8dcefaeeb94d59f /channels/chan_sip.c | |
parent | c2a5807b69de446a3554e8e08835b92643f1d542 (diff) |
Fixing the attack shield so it doesn't produce attacks... Issue 8265 - never reply to an ACK
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47250 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a5bd3589d..489351155 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4310,8 +4310,10 @@ static struct sip_pvt *find_call(struct sip_request *req, struct sockaddr_in *si } else if( sip_methods[intended_method].can_create == CAN_CREATE_DIALOG_UNSUPPORTED_METHOD) { /* A method we do not support, let's take it on the volley */ transmit_response_using_temp(callid, sin, 1, intended_method, req, "501 Method Not Implemented"); - } else if (intended_method != SIP_RESPONSE) { - /* This is a request outside of a dialog that we don't know about */ + } else if (intended_method != SIP_RESPONSE && intended_method != SIP_ACK) { + /* This is a request outside of a dialog that we don't know about + ...never reply to an ACK! + */ transmit_response_using_temp(callid, sin, 1, intended_method, req, "481 Call leg/transaction does not exist"); } /* We do not respond to responses for dialogs that we don't know about, we just drop |