From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/openvpn: needs headers >= 4.16
Date: Wed, 20 Sep 2023 22:26:28 +0200 [thread overview]
Message-ID: <20230920222628.6eb43e25@windsurf> (raw)
In-Reply-To: <20230918204405.2654720-1-fontaine.fabrice@gmail.com>
On Mon, 18 Sep 2023 22:44:05 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> NLMSGERR_ATTR_MAX has been added in kernel 4.16 with
> https://github.com/torvalds/linux/commit/dc2b9f19e3bdaa87a7c3d123b8bba8a42d96d942
> resulting in the following build failure since bump to version 2.6.4 in
> commit a46ac2346558d05afe405dda3730169df4b677d2 and
> https://github.com/OpenVPN/openvpn/commit/e34437c26b764851555e4acbe2ccca6bec235c7e:
>
> dco_linux.c: In function 'ovpn_nl_cb_error':
> dco_linux.c:303:27: error: 'NLMSGERR_ATTR_MAX' undeclared (first use in this function); did you mean '__CTRL_ATTR_MAX'?
> struct nlattr *tb_msg[NLMSGERR_ATTR_MAX + 1];
> ^~~~~~~~~~~~~~~~~
> __CTRL_ATTR_MAX
>
> Fixes:
> - http://autobuild.buildroot.org/results/69b9737913ac0b5cd2c117d526602874da3ee487
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/openvpn/Config.in | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/openvpn/Config.in b/package/openvpn/Config.in
> index 5aa2386d36..16fc93efae 100644
> --- a/package/openvpn/Config.in
> +++ b/package/openvpn/Config.in
> @@ -1,6 +1,7 @@
> config BR2_PACKAGE_OPENVPN
> bool "openvpn"
> depends on BR2_USE_MMU # fork()
> + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
I think that's a bit brutal. Looking a bit at the OpenVPN code, it
looks like NLMSGERR_ATTR_MAX is only used by the DCO code added in
commit e34437c26b764851555e4acbe2ccca6bec235c7e, and this code can be
disabled using --disable-dco. Which we actually already support:
ifeq ($(BR2_PACKAGE_LIBNL),y)
OPENVPN_CONF_OPTS += --enable-dco
OPENVPN_DEPENDENCIES += libnl
else
OPENVPN_CONF_OPTS += --disable-dco
endif
So I guess the correct fix is rather:
ifeq ($(BR2_PACKAGE_LIBNL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16),yy)
OPENVPN_CONF_OPTS += --enable-dco
OPENVPN_DEPENDENCIES += libnl
else
OPENVPN_CONF_OPTS += --disable-dco
endif
Could you check this?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-09-20 20:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 20:44 [Buildroot] [PATCH 1/1] package/openvpn: needs headers >= 4.16 Fabrice Fontaine
2023-09-20 20:26 ` Thomas Petazzoni via buildroot [this message]
2023-09-25 12:01 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230920222628.6eb43e25@windsurf \
--to=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.