Skip to content

Commit

Permalink
pvar: allow $socket_out matching based on tags
Browse files Browse the repository at this point in the history
Do not force a port, if not specified in the socket's string, otherwise
the socket will no longer match its token

(cherry picked from commit 1e952a7)
  • Loading branch information
razvancrainea committed Nov 12, 2021
1 parent 6ac9795 commit 4e40f04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pvar.c
Expand Up @@ -3244,7 +3244,12 @@ int pv_set_force_sock(struct sip_msg* msg, pv_param_t *param,
LM_ERR("invalid socket specification\n");
goto error;
}
set_sip_defaults( port, proto);
/*
* Do not set the explicit proto and port, otherwise we won't be able to
* match based on socket's tag
*
* set_sip_defaults( port, proto);
*/
si = grep_internal_sock_info(&host, (unsigned short)port,
(unsigned short)proto);
if (si!=NULL)
Expand Down

0 comments on commit 4e40f04

Please sign in to comment.