Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

olsrd: fix jsoninfo does not listen on ::0 9090 #41

Closed
wants to merge 1 commit into from

3 participants

@stargieg

issues 40
set bindv6only and restore the orig value

@stargieg stargieg olsrd: fix jsoninfo does not listen on ::0 9090
issues 40
set bindv6only and restore the orig value
7b643aa
@kerneis
Owner

This is such an ugly hack. Why not fix olsrd properly as suggested by @jech in #40? Note that it will fail if olsrd crashes and is then restarted automatically by procd, if it somehow needs to close and reopen the socket, or even if it takes too long to bind at startup.

@jech

Note that you're tweaking the global value of the flag. This means that any other process that creates a socket while in the non-default state will get the wrong value of the flag.

@stargieg, please modify the plugin's code itself to call setsockop(IPV6_V6ONLY). Feel free to copy the code at https://github.com/jech/babeld/blob/master/net.c#L54.

@stargieg stargieg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 7, 2014
  1. @stargieg

    olsrd: fix jsoninfo does not listen on ::0 9090

    stargieg authored
    issues 40
    set bindv6only and restore the orig value
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 olsrd/files/olsrd.init
View
6 olsrd/files/olsrd.init
@@ -833,11 +833,17 @@ start() {
error "there is already an instance of $UCI_CONF_NAME running (pid: '$(cat $PID)'), not starting."
return 1
else
+ if [ "$UCI_CONF_NAME" == "olsrd6" ]; then
+ sysctl -w net.ipv6.bindv6only=1 > /dev/null
+ fi
service_start /usr/sbin/olsrd -f "$OLSRD_CONFIG_FILE" -nofork
sleep 1
service_check /usr/sbin/olsrd || {
log "startup-error: check via: '/usr/sbin/olsrd -f \"$OLSRD_CONFIG_FILE\" -nofork'"
}
+ if [ "$UCI_CONF_NAME" == "olsrd6" ]; then
+ sysctl -w net.ipv6.bindv6only="$bindv6only" > /dev/null
+ fi
fi
fi
Something went wrong with that request. Please try again.