Files
asterisk/include/asterisk
Walter Doekes f856d9b42b res/res_pjsip: Standardize/fix localnet checks across pjsip.
In 2dee95cc (ASTERISK-27024) and 776ffd77 (ASTERISK-26879) there was
confusion about whether the transport_state->localnet ACL has ALLOW or
DENY semantics.

For the record: the localnet has DENY semantics, meaning that "not in
the list" means ALLOW, and the local nets are in the list.

Therefore, checks like this look wrong, but are right:

    /* See if where we are sending this request is local or not, and if
       not that we can get a Contact URI to modify */
    if (ast_apply_ha(transport_state->localnet, &addr) != AST_SENSE_ALLOW) {
        ast_debug(5, "Request is being sent to local address, "
                     "skipping NAT manipulation\n");

(In the list == localnet == DENY == skip NAT manipulation.)

And conversely, other checks that looked right, were wrong.

This change adds two macro's to reduce the confusion and uses those
instead:

    ast_sip_transport_is_nonlocal(transport_state, addr)
    ast_sip_transport_is_local(transport_state, addr)

ASTERISK-27248 #close

Change-Id: Ie7767519eb5a822c4848e531a53c0fd054fae934
2017-09-05 09:17:32 -05:00
..
2017-07-05 11:25:58 -05:00
2015-04-11 19:43:43 -06:00
2012-06-25 15:55:25 +00:00
2009-04-29 18:53:01 +00:00
2014-07-24 17:50:46 +00:00
2013-07-25 04:06:32 +00:00
2013-08-22 18:52:41 +00:00
2017-08-22 11:59:49 -05:00
2016-03-24 16:59:24 -05:00
2017-05-30 15:10:20 -05:00
2012-08-30 14:23:28 +00:00
2015-06-10 12:17:02 -05:00
2015-07-07 21:31:49 -05:00
2015-05-19 21:11:21 -05:00
2008-07-21 21:00:47 +00:00
2016-08-19 20:16:36 -04:00
2016-08-19 20:16:36 -04:00
2016-07-22 10:09:08 +02:00
2016-09-29 03:22:28 -04:00
2017-03-27 10:36:08 -04:00
2013-07-03 17:58:45 +00:00
2014-01-06 17:45:25 +00:00
2016-07-12 05:00:16 -05:00
2015-05-19 21:11:21 -05:00
2011-10-11 19:06:29 +00:00
2014-07-21 08:41:29 +00:00
2017-05-30 15:10:20 -05:00
2013-04-22 16:22:00 +00:00
2015-05-19 21:11:21 -05:00
2015-11-24 13:57:05 -06:00
2017-04-26 13:23:39 -05:00
2013-02-15 13:38:12 +00:00