summaryrefslogtreecommitdiff
path: root/sys-apps/iproute2/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/iproute2/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/iproute2/files')
-rw-r--r--sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch48
-rw-r--r--sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch37
-rw-r--r--sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch38
-rw-r--r--sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch37
-rw-r--r--sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch42
5 files changed, 202 insertions, 0 deletions
diff --git a/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
new file mode 100644
index 000000000000..fa12dad2d79e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
@@ -0,0 +1,48 @@
+http://bugs.gentoo.org/291907
+
+This patch was merged from two patches extracted from this thread:
+http://markmail.org/thread/qkd76gpdgefpjlfn
+
+tc_stab.c: small fixes to commandline help
+
+
+tc_core.c:
+As kernel part of things relies on cell align which is always set to -1,
+I also added it to userspace computation stage. This way if someone
+specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
+end with tsize supporting mtu 4096 suddenly, New default mtu is also set
+to 2048 (disregarding weirdness of setting mtu to such values).
+
+
+Unless I missed something, this is harmless and feels cleaner, but if it's
+not allowed, documentation will have to be changed back to 2047 + extra
+explanation as well.
+
+--- iproute2/tc/tc_core.c
++++ iproute2/tc/tc_core.c
+@@ -155,12 +155,12 @@
+ }
+
+ if (s->mtu == 0)
+- s->mtu = 2047;
++ s->mtu = 2048;
+ if (s->tsize == 0)
+ s->tsize = 512;
+
+ s->cell_log = 0;
+- while ((s->mtu >> s->cell_log) > s->tsize - 1)
++ while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
+ s->cell_log++;
+
+ *stab = malloc(s->tsize * sizeof(__u16));
+--- iproute2/tc/tc_stab.c
++++ iproute2/tc/tc_stab.c
+@@ -32,7 +32,7 @@
+ fprintf(stderr,
+ "Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n"
+ " [ overhead BYTES ] [ linklayer TYPE ] ...\n"
+- " mtu : max packet size we create rate map for {2047}\n"
++ " mtu : max packet size we create size table for {2048}\n"
+ " tsize : how many slots should size table have {512}\n"
+ " mpu : minimum packet size used in rate computations\n"
+ " overhead : per-packet size overhead used in rate computations\n"
diff --git a/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
new file mode 100644
index 000000000000..fc855dcf2209
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
@@ -0,0 +1,37 @@
+--- iproute2-4.11.0/ip/ipmonitor.c
++++ iproute2-4.11.0/ip/ipmonitor.c
+@@ -114,7 +114,6 @@
+ }
+ if (n->nlmsg_type == RTM_NEWPREFIX) {
+ print_headers(fp, "[PREFIX]", ctrl);
+- print_prefix(who, n, arg);
+ return 0;
+ }
+ if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
+--- iproute2-4.11.0/ip/iptunnel.c
++++ iproute2-4.11.0/ip/iptunnel.c
+@@ -589,13 +589,6 @@
+ break;
+ case AF_INET:
+ break;
+- /*
+- * This is silly enough but we have no easy way to make it
+- * protocol-independent because of unarranged structure between
+- * IPv4 and IPv6.
+- */
+- case AF_INET6:
+- return do_ip6tunnel(argc, argv);
+ default:
+ fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
+ exit(-1);
+--- iproute2-4.11.0/ip/Makefile
++++ iproute2-4.11.0/ip/Makefile
+@@ -1,6 +1,6 @@
+ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
+- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
+- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
++ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
++ ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o iptoken.o \
+ ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_dummy.o \
+ iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o \
+ iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \
diff --git a/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
new file mode 100644
index 000000000000..48cae701438e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
@@ -0,0 +1,38 @@
+From 2ac2f416072d9968a9ea2dd9f48168223a1147b0 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 18 Jul 2017 14:09:06 +0300
+Subject: [PATCH] Fix build with uClibc-ng
+
+Add a local definition for IPPROTO_MH to fix build with uClibc-ng. As of
+version 1.0.25, the uClibc-ng netinet/in.h header does not provide this
+definition. The kernel provided definition is masked by libc-compat.h. Add
+this local fix until uClibc-ng syncs netinet/in.h with glibc.
+
+This partially reverts upstream commit a9ae195a2169 (xfrm: get #define's from
+linux includes)
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: non upstreamable; local uClibc-ng compatibility fix
+---
+ ip/xfrm.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ip/xfrm.h b/ip/xfrm.h
+index 54d80ce5e949..50b85550fb45 100644
+--- a/ip/xfrm.h
++++ b/ip/xfrm.h
+@@ -30,6 +30,10 @@
+ #include <linux/xfrm.h>
+ #include <linux/ipsec.h>
+
++#ifndef IPPROTO_MH
++# define IPPROTO_MH 135
++#endif
++
+ #define XFRMS_RTA(x) ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
+ #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))
+
+--
+2.13.2
+
diff --git a/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch
new file mode 100644
index 000000000000..b29e1aa3e118
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch
@@ -0,0 +1,37 @@
+--- iproute2-4.2.0/ip/ipmonitor.c
++++ iproute2-4.2.0/ip/ipmonitor.c
+@@ -115,7 +115,6 @@
+ }
+ if (n->nlmsg_type == RTM_NEWPREFIX) {
+ print_headers(fp, "[PREFIX]", ctrl);
+- print_prefix(who, n, arg);
+ return 0;
+ }
+ if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
+--- iproute2-4.2.0/ip/iptunnel.c
++++ iproute2-4.2.0/ip/iptunnel.c
+@@ -637,13 +637,6 @@
+ break;
+ case AF_INET:
+ break;
+- /*
+- * This is silly enough but we have no easy way to make it
+- * protocol-independent because of unarranged structure between
+- * IPv4 and IPv6.
+- */
+- case AF_INET6:
+- return do_ip6tunnel(argc, argv);
+ default:
+ fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
+ exit(-1);
+--- iproute2-4.2.0/ip/Makefile
++++ iproute2-4.2.0/ip/Makefile
+@@ -1,6 +1,6 @@
+ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
+- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
+- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
++ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
++ ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o iptoken.o \
+ ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
+ iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
+ iplink_macvlan.o iplink_macvtap.o ipl2tp.o link_vti.o link_vti6.o \
diff --git a/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
new file mode 100644
index 000000000000..7ed9dfbad248
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
@@ -0,0 +1,42 @@
+--- iproute2-4.5.0/configure~ 2016-03-14 23:02:31.000000000 +0000
++++ iproute2-4.5.0/configure 2016-03-17 13:24:17.634743197 +0000
+@@ -169,10 +169,25 @@
+
+ check_ipt()
+ {
+- if ! grep TC_CONFIG_XT Config > /dev/null
++ if grep -q TC_CONFIG_XT Config
+ then
++ return
++ fi
++
++ cat >$TMPDIR/ipttest.c <<EOF
++#include <iptables.h>
++int main() { return 0; }
++EOF
++
++ if $CC -std=c90 -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL \
++ $(${PKG_CONFIG} libiptc --cflags --libs 2>/dev/null) -ldl >/dev/null 2>&1
++ then
++ echo "TC_CONFIG_IPT:=y" >>Config
+ echo "using iptables"
++ else
++ echo "no"
+ fi
++ rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest
+ }
+
+ check_ipt_lib_dir()
+--- iproute2-4.5.0/tc/Makefile~ 2016-03-14 23:02:31.000000000 +0000
++++ iproute2-4.5.0/tc/Makefile 2016-03-17 13:18:18.686689985 +0000
+@@ -88,7 +88,9 @@
+ CFLAGS += -DTC_CONFIG_XT_H
+ TCSO += m_xt_old.so
+ else
+- TCMODULES += m_ipt.o
++ ifeq ($(TC_CONFIG_IPT),y)
++ TCMODULES += m_ipt.o
++ endif
+ endif
+ endif
+ endif