Skip to contentSkip to conversation

package/keepalived: add optional nftables dependency

PATCH Superseded Fabrice Fontaine 3 participants 3 messages Mar 27, 2019

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/keepalived: add optional nftables dependency

nftables support has been added since version 2.0.11 and
https://github.com/acassen/keepalived/commit/aa12175ea638912a7789e832634d7ccf80fdf48d

It depends on libmnl and libnftnl

---
Changes v1 -> v2 (after review of Baruch Siach, Thomas Petazzoni and Arnout Vandecappelle)
- nftables support depends on libmnl and libnftnl, it does not depend on iptables's nftables option or nftables package

 package/keepalived/keepalived.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/keepalived/keepalived.mk +7 -0
index fcdb43ce13..4790cf5689 100644
@@ -46,4 +46,11 @@ else
 KEEPALIVED_CONF_OPTS += --disable-libiptc
 endif
 
+ifeq ($(BR2_PACKAGE_LIBMNL)$(BR2_PACKAGE_LIBNFTNL),yy)
+KEEPALIVED_DEPENDENCIES += libmnl libnftnl
+KEEPALIVED_CONF_OPTS += --enable-nftables
+else
+KEEPALIVED_CONF_OPTS += --disable-nftables
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 package/keepalived: add optional nftables dependency

Hi Fabrice,

Quoted 20 lines · Fabrice Fontaine

nftables support has been added since version 2.0.11 and
https://github.com/acassen/keepalived/commit/aa12175ea638912a7789e832634d7ccf80fdf48d

It depends on libmnl and libnftnl

---
Changes v1 -> v2 (after review of Baruch Siach, Thomas Petazzoni and Arnout Vandecappelle)
- nftables support depends on libmnl and libnftnl, it does not depend on iptables's nftables option or nftables package

 package/keepalived/keepalived.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/keepalived/keepalived.mk +0 -0
index fcdb43ce13..4790cf5689 100644

package/keepalived/keepalived.mk else · line 50

Quoted 5 lines
package/keepalived/keepalived.mk +2 -0
@@ -46,4 +46,11 @@ else
 KEEPALIVED_CONF_OPTS += --disable-libiptc
 endif
 
+ifeq ($(BR2_PACKAGE_LIBMNL)$(BR2_PACKAGE_LIBNFTNL),yy)
+KEEPALIVED_DEPENDENCIES += libmnl libnftnl

BR2_PACKAGE_LIBNFTNL selects BR2_PACKAGE_LIBMNL already. So I think you can test for BR2_PACKAGE_LIBNFTNL and depend on libnftnl alone.

package/keepalived/keepalived.mk else · line 56

Quoted 6 lines
package/keepalived/keepalived.mk +5 -0
+KEEPALIVED_CONF_OPTS += --enable-nftables
+else
+KEEPALIVED_CONF_OPTS += --disable-nftables
+endif
+
 $(eval $(autotools-package))

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH v2 1/1 package/keepalived: add optional nftables dependency

Quoted 26 lines · Baruch Siach

Hi Fabrice,

Quoted 23 lines · Fabrice Fontaine

nftables support has been added since version 2.0.11 and
https://github.com/acassen/keepalived/commit/aa12175ea638912a7789e832634d7ccf80fdf48d

It depends on libmnl and libnftnl

---
Changes v1 -> v2 (after review of Baruch Siach, Thomas Petazzoni and Arnout Vandecappelle)
- nftables support depends on libmnl and libnftnl, it does not depend on iptables's nftables option or nftables package

 package/keepalived/keepalived.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/keepalived/keepalived.mk +0 -0
index fcdb43ce13..4790cf5689 100644
@@ -46,4 +46,11 @@ else
 KEEPALIVED_CONF_OPTS += --disable-libiptc
 endif
 
Quoted 5 lines

package/keepalived/keepalived.mk else · line 50

Quoted 2 lines
package/keepalived/keepalived.mk +2 -0
+ifeq ($(BR2_PACKAGE_LIBMNL)$(BR2_PACKAGE_LIBNFTNL),yy)
+KEEPALIVED_DEPENDENCIES += libmnl libnftnl

BR2_PACKAGE_LIBNFTNL selects BR2_PACKAGE_LIBMNL already. So I think you can test for BR2_PACKAGE_LIBNFTNL and depend on libnftnl alone.

If it directly uses libmnl functions, then I prefer to have it like this. That
way, if libnfnl ever looses its dependency on libmnl for whatever reason, keepalived doesn't break.

Regards,
Arnout

Quoted 10 lines

package/keepalived/keepalived.mk else · line 56

Quoted 7 lines
package/keepalived/keepalived.mk +5 -0
+KEEPALIVED_CONF_OPTS += --enable-nftables
+else
+KEEPALIVED_CONF_OPTS += --disable-nftables
+endif
+
 $(eval $(autotools-package))

baruch