dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

46 Commits

Author SHA1 Message Date
mmichelson ebd3af43fb 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: http://svn.digium.com/svn/asterisk/trunk@277814 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-19 14:17:16 +00:00
mmichelson ed3f5d3773 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: http://svn.digium.com/svn/asterisk/trunk@276570 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 22:32:29 +00:00
mmichelson c3c2e5edfd 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: http://svn.digium.com/svn/asterisk/trunk@274783 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-08 22:08:07 +00:00
mnicholson db405545ae 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: http://svn.digium.com/svn/asterisk/trunk@270974 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-16 20:34:31 +00:00
mmichelson 16e74619d4 Fix incorrect ACL behavior when CIDR notation of "/0" is used.
AST-2010-003



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248946 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-25 22:41:48 +00:00
mmichelson 389a689eee Add missing argument to ast_calloc calls.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242092 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-21 22:37:55 +00:00
oej 9ac0a45bff Make sure we initialize the ast_ha structure with ast_calloc
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242043 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-21 21:05:56 +00:00
dvossel a0342a6557 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: http://svn.digium.com/svn/asterisk/trunk@232351 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02 17:00:15 +00:00
dvossel 39acf19959 Merge code associated with AST-2009-006
(closes issue #12912)
Reported by: rathaus
Tested by: tilghman, russell, dvossel, dbrooks


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215955 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-03 16:31:54 +00:00
tilghman d1ec1aa57d AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:20:57 +00:00
tilghman e2aa86b3e0 Spacing changes only
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180259 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04 20:48:42 +00:00
seanbright 8cb986b936 Another big chunk of changes from the RSW branch. Bunch of stuff from main/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137082 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10 19:35:50 +00:00
bbryant 0110f8c87a 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: http://svn.digium.com/svn/asterisk/trunk@129045 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08 16:40:28 +00:00
tilghman 2f49395f8f Solaris fix
(closes issue #12949)
 Reported by: snuffy
 Patches: 
       bug_12949.diff uploaded by snuffy (license 35)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127466 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-02 18:31:11 +00:00
tilghman fa7eb1af37 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: http://svn.digium.com/svn/asterisk/trunk@111443 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-27 19:26:45 +00:00
tilghman b2033ac5cf Merged revisions 101772 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101772 | tilghman | 2008-02-01 09:55:58 -0600 (Fri, 01 Feb 2008) | 2 lines

Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@101773 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01 16:01:22 +00:00
qwell ce1bf7ffa2 Merged revisions 100138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100138 | qwell | 2008-01-24 10:41:29 -0600 (Thu, 24 Jan 2008) | 6 lines

Fix compilation on Solaris.

(closes issue #11832)
Patches:
      bug-11832.diff uploaded by snuffy (license 35)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100139 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-24 16:47:10 +00:00
tilghman c299bf0537 Merged revisions 99718 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99718 | tilghman | 2008-01-22 18:56:06 -0600 (Tue, 22 Jan 2008) | 2 lines

Just confirmed that all current platforms need this header file

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99719 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23 01:06:27 +00:00
tilghman 3e089611dd Merged revisions 99643 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99643 | tilghman | 2008-01-22 14:34:55 -0600 (Tue, 22 Jan 2008) | 2 lines

Fix the defines for OS X (and Solaris, too)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99646 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22 20:42:47 +00:00
tilghman 68e7b69e7b Merged revisions 99540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99540 | tilghman | 2008-01-22 10:54:06 -0600 (Tue, 22 Jan 2008) | 7 lines

Ensure that we can get an address even when we don't have a default route.
(closes issue #9225)
 Reported by: junky
 Patches: 
       20080122__bug9225.diff.txt uploaded by Corydon76 (license 14)
 Tested by: oej, loloski, sergee

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99559 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22 17:15:08 +00:00
twilson 11f6af8c7b Added a new module, res_phoneprov, which allows auto-provisioning of phones
based on configuration templates that use Asterisk dialplan function and
variable substitution.  It should be possible to create phone profiles and
templates that work for the majority of phones provisioned over http. It
is currently only intended to provision a single user account per phone.
An example profile and set of templates for Polycom phones is provided.
NOTE: Polycom firmware is not included, but should be placed in
AST_DATA_DIR/phoneprov/configs to match up with the included templates.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97634 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 21:37:26 +00:00
rizzo 999f881868 remove some unnecessary includes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89542 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24 13:48:48 +00:00
rizzo de2db05332 remove a bunch of useless #include "options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:09:02 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +00:00
oej 3c9ab4b916 Add some debugging to the routines that finds our local IP address.
Related to bug #9225


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 08:41:14 +00:00
rizzo d5c3a24242 remove unnecessary includes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89383 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:47:33 +00:00
rizzo 457e19cda1 fix breakage induced by previous mistake
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89382 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:45:46 +00:00
rizzo fb8143ad31 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:11:53 +00:00
rizzo 977ebbedcd remove duplicate headers.
Properly check for netdb.h (there is actually tens of places to fix)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89335 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:28:19 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
rizzo ea0d4674a6 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 13:18:40 +00:00
file f22fed5270 Merged revisions 86630 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86630 | file | 2007-10-22 10:33:23 -0300 (Mon, 22 Oct 2007) | 6 lines

Fixes for building under OpenSolaris.
(closes issue #11047)
Reported by: snuffy
Patches:
      11047-fixes.diff uploaded by snuffy (license 35)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86631 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 13:36:13 +00:00
tilghman 2c1d45aef4 Code cleanup of acl.c
Reported by dimas
Closes issue #10784


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86278 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-18 07:23:41 +00:00
qwell 1fa7b3672e Switch dundi to new tos config format.
Remove old unused defines for old style.

Closes issue 10860, patch by IgorG.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85764 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15 23:20:40 +00:00
rizzo 5bfa6e3dc2 expose struct ast_ha so external code can do things such as printing it
(e.g. chan_sip.c in a subsequent commit).

Obviously exposing the internals of a data structure is far from ideal
(especially in a case like this where the implementation is very
inefficient and will need to be changed at some point).

On the other hand, it was also unclear what additional APIs should
we provide instead, and because exposing the stucture has no impact
on source and binary compatibility, this seemed to me the best option at
this time.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76034 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20 14:38:36 +00:00
russell 13d057de6b Remove some debug code that was added in revision 75894, which removed some
other debug code.  :)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75911 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19 14:46:49 +00:00
rizzo 86439502e0 comment out some terribly expensive debugging code
in the body of ast_apply_ha()



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75894 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19 12:38:13 +00:00
russell f042431847 Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14 19:39:12 +00:00
tilghman eb5d461ed4 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 21:20:11 +00:00
russell 3d2428efd4 Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The
file doc/qos.tex has been updated to document the new functionality.
(issue #9540, patch submitted by IgorG)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62457 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-30 16:16:26 +00:00
file c6c469a1b4 Rely on ast_gethostbyname to handle IP addresses, not inet_aton. (issue #9056 reported by pj)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54749 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16 01:36:18 +00:00
oej 6fc0c809bb Fix debug handling in acl.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53914 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-11 19:15:55 +00:00
oej 98cbdc7b3c - Implement error handling in ast_append_ha
- Use this in chan_sip
- Document ha functions in acl.c


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49092 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-01 19:20:46 +00:00
kpfleming 3cea33ad57 Merged revisions 45125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45125 | kpfleming | 2006-10-13 18:02:48 -0500 (Fri, 13 Oct 2006) | 7 lines

------------------------------------------------------------------------
r45119 | kpfleming | 2006-10-13 17:57:42 -0500 (Fri, 13 Oct 2006) | 2 lines

don't drop the entire permit/deny list when an attempt is made to add an invalid entry (BE-92)

------------------------------------------------------------------------

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45126 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-13 23:03:36 +00:00
tilghman 42ee5cb87f And some deprecated APIs and modifications to documentation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43458 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-21 22:23:49 +00:00
kpfleming 8b0c007ad9 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00