[Home]

Summary:ASTERISK-17090: bindaddr=[::]:5060 does not work as expected under FreeBSD
Reporter:Paul Belanger (pabelanger)Labels:
Date Opened:2010-12-09 18:24:51.000-0600Date Closed:
Priority:MinorRegression?No
Status:Open/NewComponents:Channels/chan_sip/IPv6
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Bamboo found this issue.  Apparently, bindaddr=[::]:5060 in sip.conf will only open IPv6 ports, IPv4 remain closed.

This is different from Linux systems.

****** ADDITIONAL INFORMATION ******

http://bamboo.asterisk.org/browse/AST18-FREEBSD81-35
Comments:By: Simon Perreault (sperreault) 2010-12-10 09:06:22.000-0600

What is the value of "ipv6_ipv4mapping" in /etc/rc.conf? (Check also /etc/defaults/rc.conf.)

By: Paul Belanger (pabelanger) 2010-12-10 10:21:19.000-0600

Ah, it is currently set to NO.  Let me talk to the owner of the system and have him enable them.  I'll follow up with the results.

By: Paul Belanger (pabelanger) 2010-12-10 11:54:59.000-0600

Setting ipv6_ipv4mapping="YES" now fails for both IPv4 and IPv6 connections.

By: Paul Belanger (pabelanger) 2010-12-10 19:46:55.000-0600

Ignore my last statement, I retest it again.  There does not seem to be a difference enabling the setting.

IPv6 open,
IPv4 closed.

By: Dan Lukes (dan_lukes) 2013-12-06 16:43:46.342-0600

RFC2553 does not define the ordering constraint between calls to bind(2), nor how IPv4 TCP/UDP port numbers and IPv6 TCP/UDP port numbers relate to each other (should they be integrated or separated).  Implemented behavior is very different from kernel to kernel.  Therefore, it is unwise to rely too much upon the behavior of AF_INET6 wildcard bind sockets.  It is recommended to listen to two sockets, one for AF_INET and another for AF_INET6, when you would like to accept both IPv4 and IPv6 traffic.

Unfortunately, Asterisk decided to follow easy way.