Commit Graph

81 Commits

Author SHA1 Message Date
Mike Bradeen 4095a382da chan_sip: Remove deprecated module.
ASTERISK-30297

Change-Id: Ic700168c80b68879d9cee8bb07afe2712fb17996
2023-01-03 09:00:42 -06:00
Sean Bright c3588d9c0b acl.c: Coerce a NULL pointer into the empty string
If an ACL is misconfigured in the realtime database (for instance, the
"rule" is blank) and Asterisk attempts to read the ACL, Asterisk will
crash.

ASTERISK-28978 #close

Change-Id: Ic1536c4df856231bfd2da00128f7822224d77610
2020-07-20 11:38:05 -05:00
Jaco Kroon d32e559e8a acl: implement a centralized ACL output mechanism for HAs and ACLs.
named_acl.c (which is really a named_ha) now uses ast_ha_output.

I've also updated main/manager.c to output the actual ACL on "manager
show user <username>" if one is set.  If this works then we can add
similar to other modules as required.

Change-Id: I0ec9876a90dddd379c80ec078d48e3ee6991eb0f
2020-03-31 11:08:45 -05:00
Sean Bright 312abaa1fe res_pjsip_endpoint_identifier_ip.c: Add port matching support
Adds source port matching support when IP matching is used:

  [example]
  type = identify
  match = 1.2.3.4:5060/32, 1.2.3.4:6000/32, asterisk.org:4444

If the IP matches but the source port does not, we reject and search for
alternatives. SRV lookups are still performed if enabled (srv_lookups = yes),
unless the configured FQDN includes a port number in which case just a host
lookup is performed.

ASTERISK-28639 #close
Reported by: Mitch Claborn

Change-Id: I256d5bd5d478b95f526e2f80ace31b690eebba92
2020-01-08 08:37:53 -06:00
Jaco Kroon 32160cb456 ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging.
Due to use in res_rtp_asterisk there is a need to be able to apply an
ACL without logging any invalid/denies.  It's probably sensible to at
least validate the ACL once directly after load and report invalid ACLs.

Change-Id: I256169229d945ca7c1bbf228fc492d91df345843
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
2019-12-12 02:14:55 -06:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Corey Farrell c4f11911ea acl: Fix allocation related issues.
Add checks for allocation errors, cleanup and report failure when they
occur.

* ast_duplicate_acl_list: Replace log warnings with errors, add missing
  line-feed.
* ast_append_acl: Add missing line-feed to logger message.
* ast_append_ha: Avoid ast_strdupa in loop by moving debug message to
  separate function.
* ast_ha_join: Use two separate calls to ast_str_append to avoid using
  ast_strdupa in a loop.

Change-Id: Ia19eaaeb0b139ff7ce7b971c7550e85c8b78ab76
2017-11-17 09:36:14 -05:00
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
Richard Mudgett 67cc8499a2 acl.c: Improve ast_ouraddrfor() diagnostic messages.
* Made not generate strings unless they will actually be used.

ASTERISK-26672

Change-Id: I155fbe7fdff5ce47dfe5326f3baf5446849702c3
2016-12-22 12:25:15 -06:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Mark Michelson 11ffcf662f Restrict functionality when ACLs are misconfigured.
This patch has two main purposes:

1) Improve warning messages when ACLs are configured improperly.
2) Prevent misconfigured ACLs from allowing potentially unwanted
traffic.

To acomplish point (2) in most cases, whatever configuration object that
the ACL belonged to was not allowed to load.

The one exception is res_pjsip_acl. In that case, ACLs are their own
configuration object. Furthermore, the module loading code has no
indication that a ACL configuration had a failure. So the tactic taken
here is to create an ACL that just blocks everything.

ASTERISK-24969
Reported by Corey Farrell

Change-Id: I2ebcb6959cefad03cea4d81401be946203fcacae
2015-04-30 10:43:51 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Mark Michelson 2f78fde10f Fix error with mixed address family ACLs.
Prior to this commit, the address family of the first item in an ACL
was used to compare all incoming traffic. This could lead to traffic
of other IP address families bypassing ACLs.

ASTERISK-24469 #close

Reported by Matt Jordan
Patches:
	ASTERISK-24469-11.diff uploaded by Matt Jordan (License #6283)

AST-2014-012
........

Merged revisions 428402 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 428417 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 428422 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 428425 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20 16:37:58 +00:00
Walter Doekes 37179a2b1f core: Don't allow free to mean ast_free (and malloc, etc..).
This gets rid of most old libc free/malloc/realloc and replaces them
with ast_free and friends. When compiling with MALLOC_DEBUG you'll
notice it when you're mistakenly using one of the libc variants. For
the legacy cases you can define WRAP_LIBC_MALLOC before including
asterisk.h.

Even better would be if the errors were also enabled when compiling
without MALLOC_DEBUG, but that's a slightly more invasive header
file change.

Those compiling addons/format_mp3 will need to rerun
./contrib/scripts/get_mp3_source.sh.

ASTERISK-24348 #related
Review: https://reviewboard.asterisk.org/r/4015/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-26 14:41:38 +00:00
George Joseph d87f8c429e pjsip cli: Change Identify to show CIDR notation instead of netmasks.
* Added ast_sockaddr_cidr_bits() to count the 1 bits in an ast_sockaddr.
* Added ast_ha_join_cidr() which uses ast_sockaddr_cidr_bits() for the netmask
  instead of ast_sockaddr_stringify_addr.
* Changed res_pjsip_endpoint_identifier_ip to call ast_ha_join_cidr() instead
  of ast_ha_join() for the CLI output.

This is a CLI change only.  AMI was not affected.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3652/
........

Merged revisions 416737 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-19 20:13:20 +00:00
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:49:26 +00:00
Jonathan Rose ff63012c4e PJSIP: TOS values should be represented as decimals in sorcery objects
(closes issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3324/
........

Merged revisions 410574 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 16:42:54 +00:00
Jonathan Rose f0b8590c14 pjsip configuration: Make transport TOS values consistent with endpoints
Transport TOS values were interpreted as DSCP values without being documented
as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS
values have historically. This patch makes the transport TOS values behave as
TOS values and makes all TOS values readable as string values (e.g. AF11).
In addition, alembic scripts have been updated to use the proper field types
for all TOS/COS values.

(issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3304/
........

Merged revisions 410028 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 19:04:58 +00:00
Kevin Harwell 05cbf8df9b res_pjsip: AMI commands and events.
Created the following AMI commands and corresponding events for res_pjsip:

PJSIPShowEndpoints - Provides a listing of all pjsip endpoints and a few
                     select attributes on each.
  Events:
    EndpointList - for each endpoint a few attributes.
    EndpointlistComplete - after all endpoints have been listed.

PJSIPShowEndpoint - Provides a detail list of attributes for a specified
                    endpoint.
  Events:
    EndpointDetail - attributes on an endpoint.
    AorDetail - raised for each AOR on an endpoint.
    AuthDetail - raised for each associated inbound and outbound auth
    TransportDetail - transport attributes.
    IdentifyDetail - attributes for the identify object associated with
                     the endpoint.
    EndpointDetailComplete - last event raised after all detail events.

PJSIPShowRegistrationsInbound - Provides a detail listing of all inbound
                                registrations.
  Events:
    InboundRegistrationDetail - inbound registration attributes for each
                                registration.
    InboundRegistrationDetailComplete - raised after all detail records have
                                been listed.

PJSIPShowRegistrationsOutbound  - Provides a detail listing of all outbound
                                  registrations.
  Events:
    OutboundRegistrationDetail - outbound registration attributes for each
                                 registration.
    OutboundRegistrationDetailComplete - raised after all detail records
                                 have been listed.

PJSIPShowSubscriptionsInbound - A detail listing of all inbound subscriptions
                                and their attributes.
  Events:
    SubscriptionDetail - on each subscription detailed attributes
    SubscriptionDetailComplete - raised after all detail records have
                                 been listed.

PJSIPShowSubscriptionsOutbound - A detail listing of all outboundbound
                                subscriptions and their attributes.
  Events:
    SubscriptionDetail - on each subscription detailed attributes
    SubscriptionDetailComplete - raised after all detail records have
                                 been listed.

(issue ASTERISK-22609)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2959/
........

Merged revisions 403131 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 17:26:57 +00:00
Michael L. Young 2af53640c8 Add IPv6 Support To chan_iax2
This patch adds IPv6 support to chan_iax2.  Yay!

(closes issue ASTERISK-22025)
Patches:
  iax2-ipv6-v5-reviewboard.diff by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2660/
........

Merged revisions 400567 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 21:41:58 +00:00
Matthew Jordan 6b5677a41d Trivial patch to make 'best_score' defined for all architectures.
Fixes trivial build error on Solaris:

  acl.c: In function `get_local_address':
  acl.c:196: error: `best_score' undeclared (first use in this function)
  acl.c:196: error: (Each undeclared identifier is reported only once
  acl.c:196: error: for each function it appears in.)
  make[2]: *** [acl.o] Error 1

(issue ASTERISK-20366)
Reported by: Ben Klang
Tested by: Ben Klang
patches:
  0002-main-acl.c-Trivial.-best_score-should-be-defined-for.patch by Shaun Ruffell (license 5417)
........

Merged revisions 374632 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-07 17:33:38 +00:00
Andrew Latham 6f61cb50c5 Doxygen Updates - janitor work
Doxygen updates including mistakes, misspellings, missing parameters, updates for Doxygen style.  Some missing txt file links are removed but their content or essense will be included in some later updates.  A majority of the txt files were removed in the 1.6 era but never noted. The HR and EXTREF are simple changes that make the documentation more compatable with more versions of Doxygen.

Further updates coming.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21 17:14:59 +00:00
Kevin P. Fleming 0385c0e9cb Allow permit/deny ACL lines to contain multiple items and negated entries.
Rules in ACLs (specified using 'permit' and 'deny') can now contain multiple
items (separated by commas), and items in the rule can be negated by prefixing
them with '!'. This simplifies Asterisk Realtime configurations, since it is no
longer necessray to control the order that the 'permit' and 'deny' columns are
returned from queries.

Review: https://reviewboard.asterisk.org/r/1592/
Initial patch contributed by Tilghman Lesher
Unit tests written by Kevin P. Fleming



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-24 16:47:33 +00:00
Jonathan Rose 10afdf3a2a Named ACLs: Introduces a system for creating and sharing ACLs
This patch adds Named ACL functionality to Asterisk. This allows system
administrators to define an ACL and refer to it by a unique name. Configurable
items can then refer to that name when specifying access control lists.
It also includes updates to all core supported consumers of ACLs. That includes
manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk
by Olle E. Johansson and provides a subset of the Named ACL functionality
implemented in that branch. For more information on this feature, see acl.conf
and/or the Asterisk wiki.

Review: https://reviewboard.asterisk.org/r/1978/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-11 18:33:36 +00:00
Kevin P. Fleming 166b4e2b30 Multiple revisions 369001-369002
........
  r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
  
  Add support-level indications to many more source files.
  
  Since we now have tools that scan through the source tree looking for files
  with specific support levels, we need to ensure that every file that is
  a component of a 'core' or 'extended' module (or the main Asterisk binary)
  is explicitly marked with its support level. This patch adds support-level
  indications to many more source files in tree, but avoids adding them to
  third-party libraries that are included in the tree and to source files
  that don't end up involved in Asterisk itself.
........
  r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
  
  Add a script to enable finding source files without support-levels defined.
........

Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15 16:20:16 +00:00
Jonathan Rose 8227f70cd7 Coverity Report: Fix issues for error type CHECKED_RETURN for core
(issue ASTERISK-19658)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1905/
........

Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 18:35:14 +00:00
Kinsey Moore e291318df2 Prevent outbound SIP NOTIFY packets from displaying a port of 0
In the change from 1.6.2 to 1.8, ast_sockaddr was introduced which changed the
behavior of ast_find_ourip such that port number was wiped out.  This caused
the port in internip (which is used for Contact and Call-ID on NOTIFYs) to be
0.  This change causes ast_find_ourip to be port-preserving again.

(closes issue ASTERISK-19430)
........

Merged revisions 357665 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 357667 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01 14:22:01 +00:00
Walter Doekes db24fc2523 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: Clod Patry
Review: https://reviewboard.asterisk.org/r/1651


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08 20:49:48 +00:00
Richard Mudgett 7d9ba4875b Fix calls to ast_get_ip() not initializing the address family.
........

Merged revisions 346239 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 346240 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 23:03:32 +00:00
Richard Mudgett cee432c9d8 Fixed reference to incorrect variable if unknown host configured crash.
* Fixed a LOG_ERROR message referencing the config variable list v that
had previously been processed and became NULL.

* Added error return value set that was missing in an ast_append_ha()
error return path.

(closes issue ASTERISK-18743)
Reported by: Michele
Patches:
      issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes
Tested by: Michele
........

Merged revisions 343851 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 343852 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 18:02:51 +00:00
Sean Bright 64dfc6e735 Merged revisions 304638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r304638 | seanbright | 2011-01-28 15:19:08 -0500 (Fri, 28 Jan 2011) | 11 lines
  
  Restore some conditionals that we lost in r277814.
  
  There are some cases where ast_append_ha() is called with a NULL instead of a
  valid int pointer.  So if we get a NULL, don't try to dereference it.
  
  (closes issue #18162)
  Reported by: imcdona
  Patches:
        issue0018162.patch uploaded by pabelanger (license 224)
  Tested by: enegaard
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-28 20:19:57 +00:00
Paul Belanger b1cc567e3f Merged revisions 291758 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r291758 | pabelanger | 2010-10-14 11:15:12 -0400 (Thu, 14 Oct 2010) | 11 lines
  
  Add the ability for ast_find_ourip to return IPv4, IPv6 or both.
  
  While testing chan_gtalk I noticed jabber was using my IPv6 address
  and not IPv4. When using bindaddr=0.0.0.0 it is possible for ast_find_ourip()
  to return both IPv6 and IPv4 results.  Adding a family parameter gives you
  the ablility to choose.
  
  Since jabber/gtalk/h323 do not support IPv6, we should only return IPv4 results.
  
  Review: https://reviewboard.asterisk.org/r/973/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-14 15:21:42 +00:00
Tilghman Lesher 350e91a514 Merged revisions 291265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r291265 | tilghman | 2010-10-12 12:06:23 -0500 (Tue, 12 Oct 2010) | 16 lines
  
  Merged revisions 291264 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r291264 | tilghman | 2010-10-12 12:05:31 -0500 (Tue, 12 Oct 2010) | 9 lines
    
    Merged revisions 291263 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r291263 | tilghman | 2010-10-12 11:55:30 -0500 (Tue, 12 Oct 2010) | 2 lines
      
      Oops, incorrect range (although unallocated at ARIN)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-12 17:07:20 +00:00
Russell Bryant 4a356afb7d Merged revisions 287895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r287895 | russell | 2010-09-21 10:43:33 -0500 (Tue, 21 Sep 2010) | 10 lines
  
  Don't use ast_strdupa() from within the arguments to a function.
  
  (closes issue #17902)
  Reported by: afried
  Patches:
        issue_17902.rev1.txt uploaded by russell (license 2)
  Tested by: russell
  
  Review: https://reviewboard.asterisk.org/r/927/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-21 15:45:46 +00:00
Tzafrir Cohen 4a8fdd6aa1 Support for GNU/kFreeBSD
kFreeBSD is GNU (with glibc) on to of a FreeBSD kernel. See
http://glibc-bsd.alioth.debian.org/porting/PORTING

This patch gets Asterisk close to building on Debian kFreeBSD i386,
mainly by adding an extra test for __GLIBC__ in one or two (or more)
places.

OSARCH is set to 'kfreebsd-gnu'

DAHDI support (and support for chan_vpb) was not tested.

Review: https://reviewboard.asterisk.org/r/858/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-15 13:08:45 +00:00
Mark Michelson 6fa79e8f77 Make ACLs IPv6-capable.
ACLs can now be configured to match IPv6 networks. This is only
relevant for ACLs in chan_sip for now since other channel drivers
do not support IPv6 addressing. However, once those channel drivers
are outfitted to support IPv6 addressing, the ACLs will already be
ready for IPv6 support.

https://reviewboard.asterisk.org/r/791



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 14:17:16 +00:00
Mark Michelson 1e8c66e749 Fix errors where incorrect address information was printed.
ast_sockaddr_stringiy_fmt (which is call by all ast_sockaddr_stringify* functions)
uses thread-local storage for storing the string that it creates. In cases where
ast_sockaddr_stringify_fmt was being called twice within the same statement, the
result of one call would be overwritten by the result of the other call. This
usually was happening in printf-like statements and was resulting in the same
stringified addressed being printed twice instead of two separate addresses.

I have fixed this by using ast_strdupa on the result of stringify functions if
they are used twice within the same statement. As far as I could tell, there were
no instances where a pointer to the result of such a call were saved anywhere, so
this is the only situation I could see where this error could occur.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 22:32:29 +00:00
Mark Michelson cd4ebd336f Add IPv6 to Asterisk.
This adds a generic API for accommodating IPv6 and IPv4 addresses
within Asterisk. While many files have been updated to make use of the
API, chan_sip and the RTP code are the files which actually support
IPv6 addresses at the time of this commit. The way has been paved for
easier upgrading for other files in the near future, though.

Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne
for their hard work on this.

(closes issue #17565)
Reported by: russell
Patches: 
      asteriskv6-test-report.pdf uploaded by russell (license 2)

Review: https://reviewboard.asterisk.org/r/743



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08 22:08:07 +00:00
Matthew Nicholson 9f1136143b Set sin_family to AF_INET when doing lookups, also reset sin_port the first time the ip address changes.
(closes issue #17496)
Reported by: ManChicken

(closes issue #15827)
Reported by: DennisD
Patches:
      dnsmgr_15827.patch uploaded by chappell (license 8)
Tested by: DennisD, gentlec, damage, wimpy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 20:34:31 +00:00
Mark Michelson a1af5f4f72 Fix incorrect ACL behavior when CIDR notation of "/0" is used.
AST-2010-003



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@248946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-25 22:41:48 +00:00
Mark Michelson c8c4ea9bf4 Add missing argument to ast_calloc calls.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-21 22:37:55 +00:00
Olle Johansson fccf277864 Make sure we initialize the ast_ha structure with ast_calloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-21 21:05:56 +00:00
David Vossel edf6605ae7 Merged revisions 232350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r232350 | dvossel | 2009-12-02 10:59:18 -0600 (Wed, 02 Dec 2009) | 6 lines
  
  ast_outaddrfor doesn't do htons() on port, looks odd in strace.
  
  (closes issue #16290)
  Reported by: wdoekes
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02 17:00:15 +00:00
David Vossel d09f9fd00a Merge code associated with AST-2009-006
(closes issue #12912)
Reported by: rathaus
Tested by: tilghman, russell, dvossel, dbrooks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 16:31:54 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Tilghman Lesher eb5bb03b82 Spacing changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-04 20:48:42 +00:00
Sean Bright b69c8e6ab5 Another big chunk of changes from the RSW branch. Bunch of stuff from main/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 19:35:50 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +00:00
Tilghman Lesher 1bb7334fef Solaris fix
(closes issue #12949)
 Reported by: snuffy
 Patches: 
       bug_12949.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 18:31:11 +00:00
Tilghman Lesher 42358325a8 Merged revisions 111442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111442 | tilghman | 2008-03-27 14:23:12 -0500 (Thu, 27 Mar 2008) | 6 lines

For FreeBSD, at least, the ifa_addr element could be NULL.
(closes issue #12300)
 Reported by: festr
 Patches: 
       acl.c.patch uploaded by festr (license 443)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 19:26:45 +00:00