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
  • Loading branch information
razvancrainea committed Nov 12, 2021
1 parent ab611f7 commit 1e952a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pvar.c
Expand Up @@ -3226,7 +3226,12 @@ static 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 1e952a7

Please sign in to comment.