Opened at 2015-01-31T13:44:55Z
Last modified at 2015-05-07T06:56:18Z
#1194 new defect
Bind to multiple addresses on OpenBSD 5.6
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | BitlBee | Version: | 3.2.1 |
Keywords: | Cc: | ||
IRC client+version: | Client-independent | Operating System: | OpenBSD |
OS version/distro: |
Description (last modified by )
BitlBee doesn't seem to be able to bind to more than one IP address on OpenBSD. My 'bitlbee.conf' contains the following line: 'DaemonInterface = localhost'. The host 'localhost' is specified in '/etc/hosts' as follows:
$ cat /etc/hosts 127.0.0.1 localhost ::1 localhost
Now if I start Bitlbee the expected result is that the servers binds to 127.0.0.1:6667 and [::1]:6667 but unfortunately it only binds to the IPv6 Address ([::1]:6667).
$ netstat -na -p tcp | grep LISTEN | grep 6667 tcp6 0 0 ::1.6667 *.* LISTEN
I believe that this is a bug and not a feature, because it seems to be impossible to make BitlBee listen on an IPv6 and IPv4 address simultaneously.
Attachments (0)
Change History (5)
comment:1 Changed at 2015-01-31T14:23:53Z by
comment:2 Changed at 2015-02-01T04:16:41Z by
Description: | modified (diff) |
---|
There, fixed it for you.
This isn't really specific to openbsd at all
comment:4 Changed at 2015-05-07T03:22:32Z by
Had a look at this one, actually seems to be openbsd specific. In linux, if you listen in ::1, you can connect to 127.0.0.1 (even with netstat showing only one tcp6 entry). In openbsd, if you listen in ::1, connecting to 127.0.0.1 fails.
comment:5 Changed at 2015-05-07T06:56:18Z by
Seems that bitlbee tries to set IPV6_V6ONLY to false so that it listens in both ipv6 and ipv4, buuuut...
http://stackoverflow.com/a/8213504/2195033 says
It looks like *BSD derived OS doesn't allow set nor clear this option. I see the same behavior on FreeBSD 8.X. The socket is 100% AF_INET6.
Apparently this means we must have more than one socket. Welp.
Sorry, never used trac. Fucked up the formation, further more there is small typo in there.
My bitlbee.conf contains 'DaemonInterface = localhost' not 'DaemonInterface = 127.0.0.1'
And the output of the commands is: