From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1jgE3s-0006LA-Cm for ptxdist@pengutronix.de; Tue, 02 Jun 2020 23:03:05 +0200 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23992811AbgFBVDCHTjjv (ORCPT ); Tue, 2 Jun 2020 23:03:02 +0200 Date: Tue, 2 Jun 2020 23:03:00 +0200 From: Ladislav Michl Message-ID: <20200602210300.GA71975@lenoch> References: <20191206103613.GB2137842@lenoch> <20200106105956.GD5858@pengutronix.de> <20200513103910.GA5308@lenoch> <20200529080243.GC31789@pengutronix.de> <20200601084759.GA17168@lenoch> <20200602081336.GS18770@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200602081336.GS18770@pengutronix.de> Subject: Re: [ptxdist] [PATCH] openvpn: allow use of iproute2 List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Tue, Jun 02, 2020 at 10:13:36AM +0200, Michael Olbrich wrote: > On Mon, Jun 01, 2020 at 10:47:59AM +0200, Ladislav Michl wrote: > > On Fri, May 29, 2020 at 10:02:43AM +0200, Michael Olbrich wrote: > > > On Wed, May 13, 2020 at 12:39:10PM +0200, Ladislav Michl wrote: > > > > On Mon, Jan 06, 2020 at 11:59:56AM +0100, Michael Olbrich wrote: > > > > > On Fri, Dec 06, 2019 at 11:36:13AM +0100, Ladislav Michl wrote: > > > > > > Let OpenVPN use ip command when BUSYBOX_IP is not selected. This > > > > > > allows OpenVPN to be used in Busybox-less environments. > > > > > > > > > > Hmmm, what does the -{en,dis}able-iproute2 option do exactly? > > > > > Could we enable it unconditionally or does BUSYBOX_IP not provide all the > > > > > necessary features? > > > > > > > > Well, what about using 'ip' by default and legacy interface as a fallback? > > > > > > I looked into the code and I didn't see anything that busybox ip cannot > > > handle. So please keep it simple and drop the fallback. > > > > Hmm, that would probably require some more magic as BUSYBOX_FEATURE_IP_LINK > > is not selected... > > Btw, looked at other packages, this is quite common problem - rauc selects > > BUSYBOX_FEATURE_TAR_LONG_OPTIONS if BUSYBOX_TAR, but does not select tar > > itself (neither GNU nor Busybox one) > > Did you test the hunk below? I think this results in a cyclic dependency > error. And that's the problem in general. There is no good way to specify > 'select A or B'. And 'select BUSYBOX_IP if BUSYBOX' is not good either. I > have seen use-cases that use busybox for all kinds of stuff but need the > features from the 'real' ip. Tested, no error, but BUSYBOX_IP is not selected. Strangely enough it selects IPROUTE2_IP when BUSYBOX_IP is configured out. Idea was to select IPROUTE2_IP only when already used exactly not to break use-cases you mentioned above. > I think, just add the 'select BUSYBOX_FEATURE_IP_* ...' lines. That should > result in something that works. That works only if: 1) BUSYBOX_IP is already selected 2) or IPROUTE2_IP is already selected I also tried IP as virtual package, but that's just messy overkill. So unless there's a better solution, I'll mention need to select 'ip' in the help text and be done with that. ...or we could mention that in the comment: --- a/rules/openvpn.in +++ b/rules/openvpn.in @@ -9,11 +9,10 @@ menuconfig OPENVPN select IPTABLES if OPENVPN_INSTALL_SAMPLE_CONFIGS && RUNTIME select IPTABLES_INSTALL_TOOLS if OPENVPN_INSTALL_SAMPLE_CONFIGS && RUNTIME select BRIDGE_UTILS if OPENVPN_INSTALL_SAMPLE_SCRIPTS && RUNTIME + select BUSYBOX_FEATURE_IP_LINK if BUSYBOX && BUSYBOX_IP && RUNTIME + select BUSYBOX_FEATURE_IP_ROUTE if BUSYBOX && BUSYBOX_IP && RUNTIME select IPROUTE2 if !BUSYBOX_IP && RUNTIME select IPROUTE2_IP if !BUSYBOX_IP && RUNTIME - select BUSYBOX_IFCONFIG if RUNTIME - select BUSYBOX_NETSTAT if RUNTIME - select BUSYBOX_ROUTE if RUNTIME help virtual private network daemon @@ -35,6 +34,9 @@ menuconfig OPENVPN if OPENVPN +comment "Select either BUSYBOX_IP or IPROUTE2_IP!" + depends on !BUSYBOX_IP && !IPROUTE2_IP + config OPENVPN_SMALL bool prompt "Enable smaller executable size" > Michael > > > diff --git a/rules/openvpn.in b/rules/openvpn.in > > index 6958e2940..579c0314e 100644 > > --- a/rules/openvpn.in > > +++ b/rules/openvpn.in > > @@ -9,11 +9,11 @@ menuconfig OPENVPN > > select IPTABLES if OPENVPN_INSTALL_SAMPLE_CONFIGS && RUNTIME > > select IPTABLES_INSTALL_TOOLS if OPENVPN_INSTALL_SAMPLE_CONFIGS && RUNTIME > > select BRIDGE_UTILS if OPENVPN_INSTALL_SAMPLE_SCRIPTS && RUNTIME > > + select BUSYBOX_IP if BUSYBOX && !IPROUTE2_IP && RUNTIME > > + select BUSYBOX_FEATURE_IP_LINK if BUSYBOX && BUSYBOX_IP && RUNTIME > > + select BUSYBOX_FEATURE_IP_ROUTE if BUSYBOX && BUSYBOX_IP && RUNTIME > > select IPROUTE2 if !BUSYBOX_IP && RUNTIME > > select IPROUTE2_IP if !BUSYBOX_IP && RUNTIME > > - select BUSYBOX_IFCONFIG if RUNTIME > > - select BUSYBOX_NETSTAT if RUNTIME > > - select BUSYBOX_ROUTE if RUNTIME > > help > > virtual private network daemon > > > > > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de > > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de