[olsrd] jsoninfo does not listen on ::0 9090 #40

Closed
stargieg opened this Issue Jun 25, 2014 · 1 comment

Comments

Projects
None yet
3 participants
@stargieg

Hi
Since the splitting IPv6/4 configuration the bind ipv6 only flag is missing.
Otherwise the jsoninfo plugin is trying to listen ipv4 and ipv6 tcp socket.
jsoninfo ipv6 and ipv4 cant run at the same time.

olsrd.@LoadPlugin[7].library=olsrd_jsoninfo.so.0.0
olsrd.@LoadPlugin[7].ignore=0
olsrd.@LoadPlugin[7].accept=0.0.0.0

olsrd6.@LoadPlugin[1].library=olsrd_jsoninfo.so.0.0
olsrd6.@LoadPlugin[1].ignore=0
olsrd6.@LoadPlugin[1].accept=::

This is a workaround with side effects

diff --git a/olsrd/files/olsrd6.init b/olsrd/files/olsrd6.init
index 1dcc4a0..2b6efeb 100644
--- a/olsrd/files/olsrd6.init
+++ b/olsrd/files/olsrd6.init
@@ -3,6 +3,8 @@

 . $IPKG_INSTROOT/lib/functions/olsrd.sh

+sysctl -w net.ipv6.bindv6only=1 > /dev/null
+
 START=65

 SERVICE_DAEMONIZE=1
@jech

This comment has been minimized.

Show comment
Hide comment
@jech

jech Jul 2, 2014

+sysctl -w net.ipv6.bindv6only=1 > /dev/null

Please don't do that. This will break software that follows POSIX and RFC 2553.

The official solution to your problem is either to ensure that the IPv4 socket is bound before the IPv6 one, or to have the IPv6 code call setsockopt(IPV6_V6ONLY) before binding.

--jch

jech commented Jul 2, 2014

+sysctl -w net.ipv6.bindv6only=1 > /dev/null

Please don't do that. This will break software that follows POSIX and RFC 2553.

The official solution to your problem is either to ensure that the IPv4 socket is bound before the IPv6 one, or to have the IPv6 code call setsockopt(IPV6_V6ONLY) before binding.

--jch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment