aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-19Make ACLs IPv6-capable.mmichelson1-48/+221
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-14Fix errors where incorrect address information was printed.mmichelson1-2/+2
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-08Add IPv6 to Asterisk.mmichelson1-38/+63
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-06-16Set sin_family to AF_INET when doing lookups, also reset sin_port the first ↵mnicholson1-0/+1
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-02-25Fix incorrect ACL behavior when CIDR notation of "/0" is used.mmichelson1-1/+8
AST-2010-003 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248946 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-21Add missing argument to ast_calloc calls.mmichelson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242092 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-21Make sure we initialize the ast_ha structure with ast_callocoej1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242043 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02Merged revisions 232350 via svnmerge from dvossel1-1/+1
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-09-03Merge code associated with AST-2009-006dvossel1-1/+1
(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-08-10AST-2009-005tilghman1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04Spacing changes onlytilghman1-47/+56
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180259 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10Another big chunk of changes from the RSW branch. Bunch of stuff from main/seanbright1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137082 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08Janitor project to convert sizeof to ARRAY_LEN macro.bbryant1-2/+2
(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-02Solaris fixtilghman1-1/+1
(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-03-27Merged revisions 111442 via svnmerge from tilghman1-1/+1
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-02-01Merged revisions 101772 via svnmerge from tilghman1-1/+9
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-01-24Merged revisions 100138 via svnmerge from qwell1-3/+6
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-23Merged revisions 99718 via svnmerge from tilghman1-4/+1
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-22Merged revisions 99643 via svnmerge from tilghman1-12/+17
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-22Merged revisions 99540 via svnmerge from tilghman1-2/+157
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-09Added a new module, res_phoneprov, which allows auto-provisioning of phonestwilson1-5/+0
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
2007-11-24remove some unnecessary includesrizzo1-8/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89542 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove a bunch of useless #include "options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Add some debugging to the routines that finds our local IP address.oej1-1/+7
Related to bug #9225 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17remove unnecessary includesrizzo1-5/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89383 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17fix breakage induced by previous mistakerizzo1-0/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89382 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17start using asterisk/network.h for network related headers.rizzo1-7/+0
Also remove some unnecessary includes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16remove duplicate headers.rizzo1-2/+0
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-16Start untangling header inclusion in a way that does not affectrizzo1-3/+0
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-14make the 'name' and 'value' fields in ast_variable const char *rizzo1-1/+1
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-10-22Merged revisions 86630 via svnmerge from file1-1/+1
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-18Code cleanup of acl.ctilghman1-41/+48
Reported by dimas Closes issue #10784 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86278 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Switch dundi to new tos config format.qwell1-9/+0
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-07-20expose struct ast_ha so external code can do things such as printing itrizzo1-8/+0
(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-19Remove some debug code that was added in revision 75894, which removed somerussell1-5/+0
other debug code. :) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75911 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19comment out some terribly expensive debugging coderizzo1-1/+7
in the body of ast_apply_ha() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75894 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.russell1-4/+2
(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-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-3/+3
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-30Add support for setting the CoS for VLAN traffic (802.1p) in Linux. Therussell1-0/+14
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-02-16Rely on ast_gethostbyname to handle IP addresses, not inet_aton. (issue ↵file1-2/+0
#9056 reported by pj) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54749 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-11Fix debug handling in acl.coej1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53914 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-01- Implement error handling in ast_append_haoej1-2/+7
- 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
2006-10-13Merged revisions 45125 via svnmerge from kpfleming1-2/+2
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-09-21And some deprecated APIs and modifications to documentationtilghman1-58/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43458 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-0/+425
- 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