[asterisk-dev] [Code Review] Make ACLs IPv6-capable, take 2.

Mark Michelson mmichelson at digium.com
Fri Jul 16 10:27:49 CDT 2010



> On 2010-07-16 02:34:27, Olle E Johansson wrote:
> > There's no documentation whatsoever... ;-)

Good observation. I'll add some extra examples to sip.conf.sample. Currently since only chan_sip supports IPv6, it's the only one to support IPv6 ACLs, so it makes sense to only document it there for now. As other VoIP channel drivers gain IPv6 support, they can have samples added to their configuration file too and a more centralized document on ACLs can be made.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/791/#review2399
-----------------------------------------------------------


On 2010-07-15 16:31:07, Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/791/
> -----------------------------------------------------------
> 
> (Updated 2010-07-15 16:31:07)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This change allows for IPv6 ACLs to be used in Asterisk.
> 
> ACLs are classified either as being IPv4 or IPv6 based on the network address in the ACL. The distinction means that if an ACL is created that specifies a rule regarding an IPv4 network, it will not be applied to an IPv6 address and vice-versa.
> 
> If someone specifies an IPv4-mapped IPv6 address in an ACL, we will convert this to be an IPv4 address and issue a NOTICE alerting them of the change. In order to do such a conversion, I had to make the ast_sockaddr_ipv4_mapped() function in main/netsock2.c public.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_iax2.c 276530 
>   /trunk/channels/chan_sip.c 276570 
>   /trunk/channels/chan_skinny.c 276530 
>   /trunk/include/asterisk/acl.h 276530 
>   /trunk/include/asterisk/netsock2.h 276530 
>   /trunk/main/acl.c 276570 
>   /trunk/main/manager.c 276530 
>   /trunk/main/netsock2.c 276530 
>   /trunk/tests/test_acl.c 276530 
> 
> Diff: https://reviewboard.asterisk.org/r/791/diff
> 
> 
> Testing
> -------
> 
> I have added tests to the invalid_acl and acl tests in tests/test_acl.c. They all pass as expected. I also ran the tests under valgrind and ensured there were no inappropriate memory accesses occurring.
> 
> 
> Thanks,
> 
> Mark
> 
>




More information about the asterisk-dev mailing list