From 2c45b0793ecbc0bae87e3e95b162f33f7cfdf681 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Thu, 26 Sep 2019 23:46:24 +0200 Subject: [PATCH] fix genconfig.sh for OpenBSD see https://github.com/miniupnp/miniupnp/commit/70a215d69393a44c305d6897ce1efab230b3a350 --- miniupnpd/genconfig.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miniupnpd/genconfig.sh b/miniupnpd/genconfig.sh index e7f9a72..be7d788 100755 --- a/miniupnpd/genconfig.sh +++ b/miniupnpd/genconfig.sh @@ -164,7 +164,11 @@ case $OS_NAME in OS_URL=http://www.openbsd.org/ # net.inet6.ip6.v6only has been removed in recent OpenBSD versions # Default to 1 in that case - V6SOCKETS_ARE_V6ONLY=`sysctl -n net.inet6.ip6.v6only || echo 1` + if sysctl net.inet6.ip6 | grep net.inet6.ip6.v6only ; then + V6SOCKETS_ARE_V6ONLY=`sysctl -n net.inet6.ip6.v6only` + else + V6SOCKETS_ARE_V6ONLY=1 + fi ;; FreeBSD | GNU/kFreeBSD) VER=`grep '#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'`