[asterisk-dev] [Code Review] Make ACLs IPv6-capable

Simon Perreault simon.perreault at viagenie.ca
Thu Jul 15 09:48:01 CDT 2010


On 2010-07-15 10:35, Mark Michelson wrote:
> ast_sockaddr_parse() calls getaddrinfo(), which while actually a library 
> call, I assumed used ioctls or some other system call in order to get an 
> appropriate IP address.

Hmmm... looking at the glibc code it seems like it will open a
PF_NETLINK socket even with AI_NUMERIC*. Yuck! I didn't know that.

But still, you should be parsing addresses only when reloading sip.conf,
right? Why would you want to addresses when applying an ACL? Sorry I'm a
bit slow, it seems you explained it in the original email, but I don't
get it.

> My thoughts were that when converting to an IPv6 address, it was a much 
> easier and quicker process to directly set the bits of the IPv6 address 
> than to convert the to a string and then call ast_sockaddr_parse(). 
> Based on feedback I'm seeing from you and Olle, the idea to always store 
> ACLs as IPv6 addresses was errant on my part and a lot of the code I 
> wrote to map IPv4 addresses as IPv6 addresses may go away completely 
> before anything gets committed.

Ahhhhhhh! I think I get it now! Maybe 80% getting it. ;)

Thanks,
Simon
-- 
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server        --> http://numb.viagenie.ca
vCard 4.0               --> http://www.vcarddav.org



More information about the asterisk-dev mailing list