aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeng Qingfang <dengqf6@mail2.sysu.edu.cn>2019-07-03 13:32:07 +0800
committerHans Dedecker <dedeckeh@gmail.com>2019-07-04 21:40:12 +0200
commit917eeaf26bca5342817419d0c360301896932476 (patch)
treefd411311eee7b4b08746fc930706289193cea197
parent92f83abc5e0f7bacd0392ce0c1cddcfb358f0d03 (diff)
downloadupstream-917eeaf26bca5342817419d0c360301896932476.tar.gz
upstream-917eeaf26bca5342817419d0c360301896932476.tar.bz2
upstream-917eeaf26bca5342817419d0c360301896932476.zip
iproute2: update to 5.1.0
Update iproute2 to 5.1.0 Remove upstream patch 010-cake-fwmark.patch Backport a patch to fix struct sysinfo redefinition error Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
-rw-r--r--package/network/utils/iproute2/Makefile6
-rw-r--r--package/network/utils/iproute2/patches/001-devlink-fix-libc-and-kernel-headers-collision.patch52
-rw-r--r--package/network/utils/iproute2/patches/010-cake-fwmark.patch152
-rw-r--r--package/network/utils/iproute2/patches/090-tc-add-support-for-action-act_ctinfo.patch10
-rw-r--r--package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch2
-rw-r--r--package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch8
6 files changed, 64 insertions, 166 deletions
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 0f09b79431..16b838052e 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=iproute2
-PKG_VERSION:=5.0.0
-PKG_RELEASE:=2
+PKG_VERSION:=5.1.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
-PKG_HASH:=df047302a39650ef832c07e8dab5df7a23218cd398bd310c8628e386161d20ba
+PKG_HASH:=dc5a980873eabf6b00c0be976b6e5562b1400d47d1d07d2ac35d5e5acbcf7bcf
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
diff --git a/package/network/utils/iproute2/patches/001-devlink-fix-libc-and-kernel-headers-collision.patch b/package/network/utils/iproute2/patches/001-devlink-fix-libc-and-kernel-headers-collision.patch
new file mode 100644
index 0000000000..e2ddaa25b1
--- /dev/null
+++ b/package/network/utils/iproute2/patches/001-devlink-fix-libc-and-kernel-headers-collision.patch
@@ -0,0 +1,52 @@
+From d0272f5404773a60cbc17c2277affdbbf8d99c67 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Thu, 27 Jun 2019 21:37:19 +0300
+Subject: devlink: fix libc and kernel headers collision
+
+Since commit 2f1242efe9d ("devlink: Add devlink health show command") we
+use the sys/sysinfo.h header for the sysinfo(2) system call. But since
+iproute2 carries a local version of the kernel struct sysinfo, this
+causes a collision with libc that do not rely on kernel defined sysinfo
+like musl libc:
+
+In file included from devlink.c:25:0:
+.../sysroot/usr/include/sys/sysinfo.h:10:8: error: redefinition of 'struct sysinfo'
+ struct sysinfo {
+ ^~~~~~~
+In file included from ../include/uapi/linux/kernel.h:5:0,
+ from ../include/uapi/linux/netlink.h:5,
+ from ../include/uapi/linux/genetlink.h:6,
+ from devlink.c:21:
+../include/uapi/linux/sysinfo.h:8:8: note: originally defined here
+ struct sysinfo {
+ ^~~~~~~
+
+Move the sys/sysinfo.h userspace header before kernel headers, and
+suppress the indirect include of linux/sysinfo.h.
+
+Cc: Aya Levin <ayal@mellanox.com>
+Cc: Moshe Shemesh <moshe@mellanox.com>
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
+---
+ devlink/devlink.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/devlink/devlink.c b/devlink/devlink.c
+index 97b9373..5618ba2 100644
+--- a/devlink/devlink.c
++++ b/devlink/devlink.c
+@@ -18,11 +18,12 @@
+ #include <limits.h>
+ #include <errno.h>
+ #include <inttypes.h>
++#include <sys/sysinfo.h>
++#define _LINUX_SYSINFO_H /* avoid collision with musl header */
+ #include <linux/genetlink.h>
+ #include <linux/devlink.h>
+ #include <libmnl/libmnl.h>
+ #include <netinet/ether.h>
+-#include <sys/sysinfo.h>
+ #include <sys/queue.h>
+
+ #include "SNAPSHOT.h"
diff --git a/package/network/utils/iproute2/patches/010-cake-fwmark.patch b/package/network/utils/iproute2/patches/010-cake-fwmark.patch
deleted file mode 100644
index 46981067bc..0000000000
--- a/package/network/utils/iproute2/patches/010-cake-fwmark.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From a7cd7badedcb643dc1adb41edeb4cf8e4d9ec063 Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <stephen@networkplumber.org>
-Date: Tue, 19 Mar 2019 10:36:56 -0700
-Subject: uapi: add CAKE FWMARK
-
-Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
----
- include/uapi/linux/pkt_sched.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
-index 1eb572e..7ee74c3 100644
---- a/include/uapi/linux/pkt_sched.h
-+++ b/include/uapi/linux/pkt_sched.h
-@@ -1021,6 +1021,7 @@ enum {
- TCA_CAKE_INGRESS,
- TCA_CAKE_ACK_FILTER,
- TCA_CAKE_SPLIT_GSO,
-+ TCA_CAKE_FWMARK,
- __TCA_CAKE_MAX
- };
- #define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
-
-From 5ebfe1f6fea2bb3bfccf4cf93829516caaa0233d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
-Date: Mon, 18 Mar 2019 01:30:45 +0100
-Subject: [PATCH] q_cake: Add support for setting the fwmark option
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This adds support for the newly added fwmark option to CAKE, which allows
-overriding the tin selection from the per-packet firewall marks. The fwmark
-field is a bitmask that is applied to the fwmark to select the tin.
-
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
----
- man/man8/tc-cake.8 | 16 ++++++++++++++++
- tc/q_cake.c | 24 ++++++++++++++++++++++++
- 2 files changed, 40 insertions(+)
-
-diff --git a/man/man8/tc-cake.8 b/man/man8/tc-cake.8
-index eda436e1..8c57eadd 100644
---- a/man/man8/tc-cake.8
-+++ b/man/man8/tc-cake.8
-@@ -91,6 +91,10 @@ TIME |
- LIMIT ]
- .br
- [
-+.BR fwmark
-+MASK ]
-+.br
-+[
- .BR ptm
- |
- .BR atm
-@@ -524,6 +528,18 @@ preset on the modern Internet is firmly discouraged.
- .br
- Voice (CS7, CS6, EF, VA, TOS4), 25% threshold, reduced Codel interval.
-
-+.PP
-+.B fwmark
-+MASK
-+.br
-+ This options turns on fwmark-based overriding of CAKE's tin selection.
-+If set, the option specifies a bitmask that will be applied to the fwmark
-+associated with each packet. If the result of this masking is non-zero, the
-+result will be right-shifted by the number of least-significant unset bits in
-+the mask value, and the result will be used as a the tin number for that packet.
-+This can be used to set policies in a firewall script that will override CAKE's
-+built-in tin selection.
-+
- .SH OTHER PARAMETERS
- .B memlimit
- LIMIT
-diff --git a/tc/q_cake.c b/tc/q_cake.c
-index e827e3f1..307a12c0 100644
---- a/tc/q_cake.c
-+++ b/tc/q_cake.c
-@@ -82,6 +82,7 @@ static void explain(void)
- " [ split-gso* | no-split-gso ]\n"
- " [ ack-filter | ack-filter-aggressive | no-ack-filter* ]\n"
- " [ memlimit LIMIT ]\n"
-+" [ fwmark MASK ]\n"
- " [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
- " [ mpu N ] [ ingress | egress* ]\n"
- " (* marks defaults)\n");
-@@ -106,6 +107,7 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
- int autorate = -1;
- int ingress = -1;
- int overhead = 0;
-+ int fwmark = -1;
- int wash = -1;
- int nat = -1;
- int atm = -1;
-@@ -332,6 +334,16 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
- "Illegal value for \"memlimit\": \"%s\"\n", *argv);
- return -1;
- }
-+ } else if (strcmp(*argv, "fwmark") == 0) {
-+ unsigned int fwm;
-+
-+ NEXT_ARG();
-+ if (get_u32(&fwm, *argv, 0)) {
-+ fprintf(stderr,
-+ "Illegal value for \"fwmark\": \"%s\"\n", *argv);
-+ return -1;
-+ }
-+ fwmark = fwm;
- } else if (strcmp(*argv, "help") == 0) {
- explain();
- return -1;
-@@ -376,6 +388,9 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
- if (memlimit)
- addattr_l(n, 1024, TCA_CAKE_MEMORY, &memlimit,
- sizeof(memlimit));
-+ if (fwmark != -1)
-+ addattr_l(n, 1024, TCA_CAKE_FWMARK, &fwmark,
-+ sizeof(fwmark));
- if (nat != -1)
- addattr_l(n, 1024, TCA_CAKE_NAT, &nat, sizeof(nat));
- if (wash != -1)
-@@ -409,6 +424,7 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
- struct rtattr *tb[TCA_CAKE_MAX + 1];
- unsigned int interval = 0;
- unsigned int memlimit = 0;
-+ unsigned int fwmark = 0;
- __u64 bandwidth = 0;
- int ack_filter = 0;
- int split_gso = 0;
-@@ -507,6 +523,10 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
- RTA_PAYLOAD(tb[TCA_CAKE_RTT]) >= sizeof(__u32)) {
- interval = rta_getattr_u32(tb[TCA_CAKE_RTT]);
- }
-+ if (tb[TCA_CAKE_FWMARK] &&
-+ RTA_PAYLOAD(tb[TCA_CAKE_FWMARK]) >= sizeof(__u32)) {
-+ fwmark = rta_getattr_u32(tb[TCA_CAKE_FWMARK]);
-+ }
-
- if (wash)
- print_string(PRINT_FP, NULL, "wash ", NULL);
-@@ -559,6 +579,10 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
- sprint_size(memlimit, b1));
- }
-
-+ if (fwmark)
-+ print_uint(PRINT_FP, NULL, "fwmark 0x%x ", fwmark);
-+ print_0xhex(PRINT_JSON, "fwmark", NULL, fwmark);
-+
- return 0;
- }
-
diff --git a/package/network/utils/iproute2/patches/090-tc-add-support-for-action-act_ctinfo.patch b/package/network/utils/iproute2/patches/090-tc-add-support-for-action-act_ctinfo.patch
index 6335cca03a..4e14a09eeb 100644
--- a/package/network/utils/iproute2/patches/090-tc-add-support-for-action-act_ctinfo.patch
+++ b/package/network/utils/iproute2/patches/090-tc-add-support-for-action-act_ctinfo.patch
@@ -77,16 +77,14 @@ diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index 95d0db2a..a6e7e176 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
-@@ -68,7 +68,8 @@ enum {
- TCA_ID_UNSPEC=0,
- TCA_ID_POLICE=1,
+@@ -105,6 +105,7 @@ enum tca_id {
+ TCA_ID_IFE = TCA_ACT_IFE,
+ TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
/* other actions go here */
-- __TCA_ID_MAX=255
+ TCA_ID_CTINFO=27,
-+ __TCA_ID_MAX = 255
+ __TCA_ID_MAX = 255
};
- #define TCA_ID_MAX __TCA_ID_MAX
diff --git a/include/uapi/linux/tc_act/tc_ctinfo.h b/include/uapi/linux/tc_act/tc_ctinfo.h
new file mode 100644
index 00000000..f5f26d95
diff --git a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
index 6795be74bf..23e41d7a05 100644
--- a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
+++ b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
@@ -1,6 +1,6 @@
--- a/tc/Makefile
+++ b/tc/Makefile
-@@ -120,6 +120,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
+@@ -121,6 +121,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
ifneq ($(IPT_LIB_DIR),)
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
endif
diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
index 64ab135589..10123a78c3 100644
--- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
+++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
@@ -1,6 +1,6 @@
--- a/tc/Makefile
+++ b/tc/Makefile
-@@ -107,7 +107,7 @@ LDLIBS += -L. -lm
+@@ -108,7 +108,7 @@ LDLIBS += -L. -lm
ifeq ($(SHARED_LIBS),y)
LDLIBS += -ldl
@@ -9,7 +9,7 @@
endif
TCLIB := tc_core.o
-@@ -137,7 +137,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
+@@ -138,7 +138,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
all: tc $(TCSO)
tc: $(TCOBJ) $(LIBNETLINK) libtc.a
@@ -18,7 +18,7 @@
libtc.a: $(TCLIB)
$(QUIET_AR)$(AR) rcs $@ $^
-@@ -159,6 +159,7 @@ install: all
+@@ -160,6 +160,7 @@ install: all
clean:
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \
rm -f emp_ematch.yacc.*
@@ -26,7 +26,7 @@
q_atm.so: q_atm.c
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
-@@ -198,4 +199,15 @@ static-syms.h: $(wildcard *.c)
+@@ -199,4 +200,15 @@ static-syms.h: $(wildcard *.c)
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
done > $@