mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use latest iproute2 package for MPTCP upstream
This commit is contained in:
parent
fa07ce7e73
commit
6a0fa5b88c
16 changed files with 549 additions and 0 deletions
12
iproute2/patches/100-configure.patch
Normal file
12
iproute2/patches/100-configure.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -34,7 +34,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
- if $CC -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1; then
|
||||
+# OpenWrt: disable ATM support even if present on host system
|
||||
+ if [ 1 -eq 0 ]; then
|
||||
echo "TC_CONFIG_ATM:=y" >>$CONFIG
|
||||
echo yes
|
||||
else
|
59
iproute2/patches/110-darwin_fixes.patch
Normal file
59
iproute2/patches/110-darwin_fixes.patch
Normal file
|
@ -0,0 +1,59 @@
|
|||
--- a/netem/maketable.c
|
||||
+++ b/netem/maketable.c
|
||||
@@ -10,7 +10,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
--- a/netem/normal.c
|
||||
+++ b/netem/normal.c
|
||||
@@ -8,8 +8,12 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||
#include <linux/types.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
+#else
|
||||
+#define NETEM_DIST_SCALE 8192
|
||||
+#endif
|
||||
|
||||
#define TABLESIZE 16384
|
||||
#define TABLEFACTOR NETEM_DIST_SCALE
|
||||
--- a/netem/pareto.c
|
||||
+++ b/netem/pareto.c
|
||||
@@ -7,8 +7,12 @@
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
|
||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||
#include <linux/types.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
+#else
|
||||
+#define NETEM_DIST_SCALE 8192
|
||||
+#endif
|
||||
|
||||
static const double a=3.0;
|
||||
#define TABLESIZE 16384
|
||||
--- a/netem/paretonormal.c
|
||||
+++ b/netem/paretonormal.c
|
||||
@@ -14,10 +14,13 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||
#include <malloc.h>
|
||||
-
|
||||
#include <linux/types.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
+#else
|
||||
+#define NETEM_DIST_SCALE 8192
|
||||
+#endif
|
||||
|
||||
#define TABLESIZE 16384
|
||||
#define TABLEFACTOR NETEM_DIST_SCALE
|
12
iproute2/patches/115-add-config-xtlibdir.patch
Normal file
12
iproute2/patches/115-add-config-xtlibdir.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/tc/Makefile
|
||||
+++ b/tc/Makefile
|
||||
@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
|
||||
ifneq ($(IPT_LIB_DIR),)
|
||||
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
|
||||
endif
|
||||
+ifneq ($(XT_LIB_DIR),)
|
||||
+ CFLAGS += -DXT_LIB_DIR=\"$(XT_LIB_DIR)\"
|
||||
+endif
|
||||
|
||||
LEX := flex
|
||||
CFLAGS += -DYY_NO_INPUT
|
20
iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch
Normal file
20
iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/misc/Makefile
|
||||
+++ b/misc/Makefile
|
||||
@@ -2,13 +2,13 @@
|
||||
SSOBJ=ss.o ssfilter_check.o ssfilter.tab.o
|
||||
LNSTATOBJ=lnstat.o lnstat_util.o
|
||||
|
||||
-TARGETS=ss nstat ifstat rtacct lnstat
|
||||
+TARGETS=ss nstat
|
||||
|
||||
include ../config.mk
|
||||
|
||||
-ifeq ($(HAVE_BERKELEY_DB),y)
|
||||
- TARGETS += arpd
|
||||
-endif
|
||||
+#ifeq ($(HAVE_BERKELEY_DB),y)
|
||||
+# TARGETS += arpd
|
||||
+#endif
|
||||
|
||||
all: $(TARGETS)
|
||||
|
11
iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch
Normal file
11
iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s
|
||||
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
|
||||
YACCFLAGS = -d -t -v
|
||||
|
||||
-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa
|
||||
+SUBDIRS=lib ip tc bridge misc genl devlink rdma
|
||||
|
||||
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
|
||||
LDLIBS += $(LIBNETLINK)
|
9
iproute2/patches/140-allow_pfifo_fast.patch
Normal file
9
iproute2/patches/140-allow_pfifo_fast.patch
Normal file
|
@ -0,0 +1,9 @@
|
|||
--- a/tc/q_fifo.c
|
||||
+++ b/tc/q_fifo.c
|
||||
@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_
|
||||
|
||||
struct qdisc_util pfifo_fast_qdisc_util = {
|
||||
.id = "pfifo_fast",
|
||||
+ .parse_qopt = fifo_parse_opt,
|
||||
.print_qopt = prio_print_opt,
|
||||
};
|
11
iproute2/patches/140-keep_libmnl_optional.patch
Normal file
11
iproute2/patches/140-keep_libmnl_optional.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -387,7 +387,7 @@ check_selinux()
|
||||
|
||||
check_mnl()
|
||||
{
|
||||
- if ${PKG_CONFIG} libmnl --exists; then
|
||||
+ if [ "${HAVE_MNL}" = "y" ] && ${PKG_CONFIG} libmnl --exists; then
|
||||
echo "HAVE_MNL:=y" >>$CONFIG
|
||||
echo "yes"
|
||||
|
11
iproute2/patches/145-keep_libelf_optional.patch
Normal file
11
iproute2/patches/145-keep_libelf_optional.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -255,7 +255,7 @@ EOF
|
||||
|
||||
check_elf()
|
||||
{
|
||||
- if ${PKG_CONFIG} libelf --exists; then
|
||||
+ if [ "${HAVE_ELF}" = "y" ] && ${PKG_CONFIG} libelf --exists; then
|
||||
echo "HAVE_ELF:=y" >>$CONFIG
|
||||
echo "yes"
|
||||
|
11
iproute2/patches/150-keep_libcap_optional.patch
Normal file
11
iproute2/patches/150-keep_libcap_optional.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -445,7 +445,7 @@ EOF
|
||||
|
||||
check_cap()
|
||||
{
|
||||
- if ${PKG_CONFIG} libcap --exists; then
|
||||
+ if [ "${HAVE_CAP}" = "y" ] && ${PKG_CONFIG} libcap --exists; then
|
||||
echo "HAVE_CAP:=y" >>$CONFIG
|
||||
echo "yes"
|
||||
|
11
iproute2/patches/160-libnetlink-pic.patch
Normal file
11
iproute2/patches/160-libnetlink-pic.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/lib/Makefile
|
||||
+++ b/lib/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
include ../config.mk
|
||||
|
||||
-CFLAGS += -fPIC
|
||||
+CFLAGS += $(FPIC)
|
||||
|
||||
UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
||||
inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \
|
45
iproute2/patches/175-reduce-dynamic-syms.patch
Normal file
45
iproute2/patches/175-reduce-dynamic-syms.patch
Normal file
|
@ -0,0 +1,45 @@
|
|||
--- a/tc/Makefile
|
||||
+++ b/tc/Makefile
|
||||
@@ -114,7 +114,7 @@ LDLIBS += -L. -lm
|
||||
|
||||
ifeq ($(SHARED_LIBS),y)
|
||||
LDLIBS += -ldl
|
||||
-LDFLAGS += -Wl,-export-dynamic
|
||||
+LDFLAGS += -Wl,--dynamic-list=dynsyms.list
|
||||
endif
|
||||
|
||||
TCLIB := tc_core.o
|
||||
@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
||||
all: tc $(TCSO)
|
||||
|
||||
tc: $(TCOBJ) $(LIBNETLINK) libtc.a
|
||||
- $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
||||
+ $(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@
|
||||
|
||||
libtc.a: $(TCLIB)
|
||||
$(QUIET_AR)$(AR) rcs $@ $^
|
||||
@@ -166,6 +166,7 @@ install: all
|
||||
clean:
|
||||
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
|
||||
rm -f emp_ematch.tab.*
|
||||
+ rm -f dynsyms.list
|
||||
|
||||
q_atm.so: q_atm.c
|
||||
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
||||
@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c)
|
||||
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
||||
done > $@
|
||||
|
||||
+else
|
||||
+
|
||||
+tc: dynsyms.list
|
||||
+m_xt.so: dynsyms.list
|
||||
+dynsyms.list: $(wildcard *.c)
|
||||
+ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
|
||||
+ echo "{" > $@ ; \
|
||||
+ for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
|
||||
+ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:\1;:;p}' $$files ; \
|
||||
+ done >> $@ ; \
|
||||
+ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@
|
||||
+
|
||||
endif
|
41
iproute2/patches/180-drop_FAILED_POLICY.patch
Normal file
41
iproute2/patches/180-drop_FAILED_POLICY.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
From 4e7dbf76227e8c7be7897dc81def3011f637864d Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jogo@openwrt.org>
|
||||
Date: Thu, 30 May 2013 11:54:04 +0200
|
||||
Subject: [PATCH] add support for dropping with FAILED_POLICY
|
||||
|
||||
---
|
||||
include/linux/fib_rules.h | 4 ++++
|
||||
include/linux/rtnetlink.h | 1 +
|
||||
ip/rtm_map.c | 4 ++++
|
||||
3 files changed, 9 insertions(+)
|
||||
|
||||
--- a/ip/rtm_map.c
|
||||
+++ b/ip/rtm_map.c
|
||||
@@ -54,6 +54,8 @@ char *rtnl_rtntype_n2a(int id, char *buf
|
||||
return "nat";
|
||||
case RTN_XRESOLVE:
|
||||
return "xresolve";
|
||||
+ case RTN_FAILED_POLICY:
|
||||
+ return "failed_policy";
|
||||
default:
|
||||
snprintf(buf, len, "%d", id);
|
||||
return buf;
|
||||
@@ -89,6 +91,8 @@ int rtnl_rtntype_a2n(int *id, char *arg)
|
||||
res = RTN_UNICAST;
|
||||
else if (strcmp(arg, "throw") == 0)
|
||||
res = RTN_THROW;
|
||||
+ else if (strcmp(arg, "failed_policy") == 0)
|
||||
+ res = RTN_FAILED_POLICY;
|
||||
else {
|
||||
res = strtoul(arg, &end, 0);
|
||||
if (!end || end == arg || *end || res > 255)
|
||||
--- a/include/uapi/linux/rtnetlink.h
|
||||
+++ b/include/uapi/linux/rtnetlink.h
|
||||
@@ -256,6 +256,7 @@ enum {
|
||||
RTN_THROW, /* Not in this table */
|
||||
RTN_NAT, /* Translate this address */
|
||||
RTN_XRESOLVE, /* Use external resolver */
|
||||
+ RTN_FAILED_POLICY, /* Source address failed policy */
|
||||
__RTN_MAX
|
||||
};
|
||||
|
20
iproute2/patches/190-fix-nls-rpath-link.patch
Normal file
20
iproute2/patches/190-fix-nls-rpath-link.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -279,7 +279,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
- $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1
|
||||
+ $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1
|
||||
local ret=$?
|
||||
|
||||
rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
|
||||
@@ -297,7 +297,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
- $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1
|
||||
+ $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1
|
||||
local ret=$?
|
||||
|
||||
rm -f $TMPDIR/libbpf_sec_test.c $TMPDIR/libbpf_sec_test
|
19
iproute2/patches/200-drop_libbsd_dependency.patch
Normal file
19
iproute2/patches/200-drop_libbsd_dependency.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -431,14 +431,8 @@ EOF
|
||||
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
|
||||
echo "no"
|
||||
else
|
||||
- if ${PKG_CONFIG} libbsd --exists; then
|
||||
- echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
|
||||
- echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
|
||||
- echo "no"
|
||||
- else
|
||||
- echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
|
||||
- echo "yes"
|
||||
- fi
|
||||
+ echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
|
||||
+ echo "yes"
|
||||
fi
|
||||
rm -f $TMPDIR/strtest.c $TMPDIR/strtest
|
||||
}
|
11
iproute2/patches/300-selinux-configurable.patch
Normal file
11
iproute2/patches/300-selinux-configurable.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -374,7 +374,7 @@ check_libbpf()
|
||||
check_selinux()
|
||||
# SELinux is a compile time option in the ss utility
|
||||
{
|
||||
- if ${PKG_CONFIG} libselinux --exists; then
|
||||
+ if [ "${HAVE_SELINUX}" = "y" ] && ${PKG_CONFIG} libselinux --exists; then
|
||||
echo "HAVE_SELINUX:=y" >>$CONFIG
|
||||
echo "yes"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue