2023-10-12 14:29:54

by Jörg Sommer

[permalink] [raw]
Subject: [PATCH] netconfig: remove tcp6, udp6 on --disable-ipv6

If the configuration for IPv6 is disabled, the netconfig should not contain
settings for tcp6 and udp6.

The test for the configure option didn't work, because it check the wrong
variable.

Signed-off-by: Jörg Sommer <[email protected]>
---
configure.ac | 2 +-
doc/Makefile.am | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index fe6c517..b687f8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ fi
AC_ARG_ENABLE(ipv6,
[AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])],
[],[enable_ipv6=yes])
-AM_CONDITIONAL(INET6, test "x$disable_ipv6" != xno)
+AM_CONDITIONAL(INET6, test "x$enable_ipv6" != xno)
if test "x$enable_ipv6" != xno; then
AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available])
fi
diff --git a/doc/Makefile.am b/doc/Makefile.am
index d42ab90..b9678f6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,3 +2,8 @@ dist_sysconf_DATA = netconfig bindresvport.blacklist

CLEANFILES = cscope.* *~
DISTCLEANFILES = Makefile.in
+
+if ! INET6
+install-exec-hook:
+ $(SED) -i '/^tcp6\|^udp6/d' "$(DESTDIR)$(sysconfdir)"/netconfig
+endif
--
2.34.1


2024-01-05 16:53:23

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH] netconfig: remove tcp6, udp6 on --disable-ipv6



On 10/12/23 10:28 AM, Jörg Sommer wrote:
> If the configuration for IPv6 is disabled, the netconfig should not contain
> settings for tcp6 and udp6.
>
> The test for the configure option didn't work, because it check the wrong
> variable.
>
> Signed-off-by: Jörg Sommer <[email protected]>
Committed... (tag: libtirpc-1-3-5-rc2)

steved.
> ---
> configure.ac | 2 +-
> doc/Makefile.am | 5 +++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index fe6c517..b687f8d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -64,7 +64,7 @@ fi
> AC_ARG_ENABLE(ipv6,
> [AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])],
> [],[enable_ipv6=yes])
> -AM_CONDITIONAL(INET6, test "x$disable_ipv6" != xno)
> +AM_CONDITIONAL(INET6, test "x$enable_ipv6" != xno)
> if test "x$enable_ipv6" != xno; then
> AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available])
> fi
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index d42ab90..b9678f6 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -2,3 +2,8 @@ dist_sysconf_DATA = netconfig bindresvport.blacklist
>
> CLEANFILES = cscope.* *~
> DISTCLEANFILES = Makefile.in
> +
> +if ! INET6
> +install-exec-hook:
> + $(SED) -i '/^tcp6\|^udp6/d' "$(DESTDIR)$(sysconfdir)"/netconfig
> +endif