mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
add ip auth
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4988 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -78,7 +78,7 @@ void sofia_event_callback(nua_event_t event,
|
||||
|
||||
if ((profile->pflags & PFLAG_AUTH_ALL) && tech_pvt && tech_pvt->key && sip) {
|
||||
sip_authorization_t const *authorization = NULL;
|
||||
|
||||
|
||||
if (sip->sip_authorization) {
|
||||
authorization = sip->sip_authorization;
|
||||
} else if (sip->sip_proxy_authorization) {
|
||||
@@ -86,7 +86,10 @@ void sofia_event_callback(nua_event_t event,
|
||||
}
|
||||
|
||||
if (authorization) {
|
||||
auth_res = parse_auth(profile, authorization, (char *) sip->sip_request->rq_method_name, tech_pvt->key, strlen(tech_pvt->key));
|
||||
char network_ip[80];
|
||||
get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_addr);
|
||||
auth_res = sofia_reg_parse_auth(profile, authorization,
|
||||
(char *) sip->sip_request->rq_method_name, tech_pvt->key, strlen(tech_pvt->key), network_ip);
|
||||
}
|
||||
|
||||
if (auth_res != AUTH_OK) {
|
||||
|
||||
Reference in New Issue
Block a user