diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-03-21 09:42:54 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-03-21 09:42:54 -0500 |
commit | e45e8466f1504014f32b8092b63bed1d11931fd4 (patch) | |
tree | 35c62b39d45678cd1b1df6e77d4b75b722c64ac1 | |
parent | 46b35fa17d4aa21bf3f6a37743d57e5eec80fec1 (diff) | |
parent | b2c4e8660a9c89d07041271371151779b7ec75f6 (diff) |
Merge "chan_sip: Peers with distinct source ports don't match, regardless of transport."
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5030af453..138021e82 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -34451,10 +34451,9 @@ static int peer_ipcmp_cb_full(void *obj, void *arg, void *data, int flags) } /* We matched the IP, check to see if we need to match by port as well. */ - if ((peer->transports & peer2->transports) & (AST_TRANSPORT_TLS | AST_TRANSPORT_TCP)) { - /* peer matching on port is not possible with TCP/TLS */ - return CMP_MATCH | CMP_STOP; - } else if (ast_test_flag(&peer2->flags[0], SIP_INSECURE_PORT)) { + if (((peer->transports & peer2->transports) & + (AST_TRANSPORT_UDP | AST_TRANSPORT_WS | AST_TRANSPORT_WSS)) && + ast_test_flag(&peer2->flags[0], SIP_INSECURE_PORT)) { /* We are allowing match without port for peers configured that * way in this pass through the peers. */ return ast_test_flag(&peer->flags[0], SIP_INSECURE_PORT) ? |