nftables: update to version 1.0.2
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Sat, 5 Mar 2022 23:16:27 +0000 (00:16 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 7 Mar 2022 20:44:53 +0000 (21:44 +0100)
Changelog:
https://lwn.net/ml/netdev/YhO5Pn+6+dgAgSd9@salvia/

Patches:

removed:
- 001-parser-allow-quoted-string-in-flowtable_expr_member:
it is now part of upstream release [1]

added:
- 001-examples-compile-with-make-check.patch:
backported from [2], it fixes:

nft-json-file.c:3:10: fatal error: nftables/libnftables.h: No such file or directory
    3 | #include <nftables/libnftables.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

[1] https://git.netfilter.org/nftables/commit/?h=v1.0.2&id=07af4429241c9832a613cb8620331ac54257d9df
[2] https://git.netfilter.org/nftables/commit/?id=18a08fb7f0443f8bde83393bd6f69e23a04246b3

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
package/network/utils/nftables/Makefile
package/network/utils/nftables/patches/001-examples-compile-with-make-check.patch [new file with mode: 0644]
package/network/utils/nftables/patches/001-parser-allow-quoted-string-in-flowtable_expr_member.patch [deleted file]

index 346b6e1c227225653427bab526080c973d3f6360..d1d120e5e9c095798003106bd2a7a6c6514af0b7 100644 (file)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nftables
-PKG_VERSION:=1.0.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
-PKG_HASH:=3ceeba625818e81a0be293e9dd486c3ef799ebd92165270f1e57e9a201efa423
+PKG_HASH:=0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 
diff --git a/package/network/utils/nftables/patches/001-examples-compile-with-make-check.patch b/package/network/utils/nftables/patches/001-examples-compile-with-make-check.patch
new file mode 100644 (file)
index 0000000..6a4430d
--- /dev/null
@@ -0,0 +1,29 @@
+From 18a08fb7f0443f8bde83393bd6f69e23a04246b3 Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Tue, 22 Feb 2022 00:56:36 +0100
+Subject: examples: compile with `make check' and add AM_CPPFLAGS
+
+Compile examples via `make check' like libnftnl does. Use AM_CPPFLAGS to
+specify local headers via -I.
+
+Unfortunately, `make distcheck' did not catch this compile time error in
+my system, since it was using the nftables/libnftables.h file of the
+previous nftables release.
+
+Fixes: 5b364657a35f ("build: missing SUBIRS update")
+Fixes: caf2a6ad2d22 ("examples: add libnftables example program")
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ examples/Makefile.am | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -1,4 +1,6 @@
+-noinst_PROGRAMS       = nft-buffer            \
++check_PROGRAMS        = nft-buffer            \
+                 nft-json-file
++AM_CPPFLAGS = -I$(top_srcdir)/include
++
+ LDADD = $(top_builddir)/src/libnftables.la
diff --git a/package/network/utils/nftables/patches/001-parser-allow-quoted-string-in-flowtable_expr_member.patch b/package/network/utils/nftables/patches/001-parser-allow-quoted-string-in-flowtable_expr_member.patch
deleted file mode 100644 (file)
index 3090ade..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 07af4429241c9832a613cb8620331ac54257d9df Mon Sep 17 00:00:00 2001
-From: Stijn Tintel <stijn@linux-ipv6.be>
-Date: Tue, 21 Dec 2021 12:40:25 +0200
-Subject: [PATCH] parser: allow quoted string in flowtable_expr_member
-
-Devices with interface names starting with a digit can not be configured
-in flowtables. Trying to do so throws the following error:
-
-Error: syntax error, unexpected number, expecting comma or '}'
-devices = { eth0, 6in4-wan6 };
-
-This is however a perfectly valid interface name. Solve the issue by
-allowing the use of quoted strings.
-
-Suggested-by: Jo-Philipp Wich <jo@mein.io>
-Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
-Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
----
- src/parser_bison.y | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/parser_bison.y b/src/parser_bison.y
-index 16607bb7..1136ab91 100644
---- a/src/parser_bison.y
-+++ b/src/parser_bison.y
-@@ -2151,7 +2151,14 @@ flowtable_list_expr     :       flowtable_expr_member
-                       |       flowtable_list_expr     COMMA   opt_newline
-                       ;
--flowtable_expr_member :       STRING
-+flowtable_expr_member :       QUOTED_STRING
-+                      {
-+                              $$ = constant_expr_alloc(&@$, &string_type,
-+                                                       BYTEORDER_HOST_ENDIAN,
-+                                                       strlen($1) * BITS_PER_BYTE, $1);
-+                              xfree($1);
-+                      }
-+                      |       STRING
-                       {
-                               $$ = constant_expr_alloc(&@$, &string_type,
-                                                        BYTEORDER_HOST_ENDIAN,
--- 
-2.33.1
-