From: Michael Tremer Date: Fri, 4 Aug 2017 20:20:01 +0000 (+0100) Subject: iproute2: Update to 4.12.0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ea14ff4e0223b0c300f7ba4972dd5576417ec20;p=ipfire-3.x.git iproute2: Update to 4.12.0 Signed-off-by: Michael Tremer --- diff --git a/iproute2/iproute2.nm b/iproute2/iproute2.nm index c432402a4..7ae96e931 100644 --- a/iproute2/iproute2.nm +++ b/iproute2/iproute2.nm @@ -4,8 +4,8 @@ ############################################################################### name = iproute2 -version = 3.14.0 -release = 3 +version = 4.12.0 +release = 1 groups = Networking/Tools url = http://www.linuxfoundation.org/en/Net:Iproute2 @@ -36,48 +36,13 @@ build export RPM_OPT_FLAGS = %{CFLAGS} %{LDFLAGS} export LIBDIR = %{libdir} + export SBINDIR = %{sbindir} export IPT_LIB_DIR = %{libdir}/xtables - install - # The installation routine that comes with that package - # is totally unusable for use, so do it manually. - - mkdir -pv \ - %{BUILDROOT}%{includedir} \ - %{BUILDROOT}%{sbindir} \ - %{BUILDROOT}%{mandir}/man{3,8} \ - %{BUILDROOT}%{datadir}/tc \ - %{BUILDROOT}%{libdir}/tc \ - %{BUILDROOT}%{sysconfdir}/iproute2 - - # Install binaries. - for bin in bridge/bridge genl/genl ip/{ifcfg,ip,routef,routel,rtmon,rtpr} \ - tc/tc misc/{arpd,ifstat,lnstat,nstat,rtacct,ss}; do - install -v -m 755 ${bin} %{BUILDROOT}%{sbindir} - done - ln -svf lnstat %{BUILDROOT}%{sbindir}/ctstat - ln -svf lnstat %{BUILDROOT}%{sbindir}/rtstat - - # Install libs. - install -v -m 755 tc/q_atm.so %{BUILDROOT}%{libdir}/tc - + install_cmds # libnetlink install -v -m 644 include/libnetlink.h %{BUILDROOT}%{includedir} install -v -m 644 lib/libnetlink.a %{BUILDROOT}%{libdir} - - # Install documentation. - install -v -m 644 man/man3/*.3 %{BUILDROOT}%{mandir}/man3 - install -v -m 644 man/man8/*.8 %{BUILDROOT}%{mandir}/man8 - ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/ctstat.8 - ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/rtstat.8 - ln -svf routel.8 %{BUILDROOT}%{mandir}/man8/routef.8 - - for sh in netem/normal.dist netem/pareto.dist netem/paretonormal.dist; do - install -v -m 644 ${sh} %{BUILDROOT}%{datadir}/tc - done - - # Install configuration. - install -v -m 644 etc/iproute2/* %{BUILDROOT}%{sysconfdir}/iproute2 end # Keep libnetlink.a. diff --git a/iproute2/patches/iproute2-2.6.35-print-route.patch b/iproute2/patches/iproute2-2.6.35-print-route.patch deleted file mode 100644 index 04f3cf773..000000000 --- a/iproute2/patches/iproute2-2.6.35-print-route.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ip/iproute.c b/ip/iproute.c -index 711576e..86c7ab7 100644 ---- a/ip/iproute.c -+++ b/ip/iproute.c -@@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) - if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN) - ip6_multiple_tables = 1; - -- if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED)) -+ if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED)) - return 0; - - if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) { diff --git a/iproute2/patches/iproute2-3.11.0-optflags.patch b/iproute2/patches/iproute2-3.11.0-optflags.patch deleted file mode 100644 index b5396b539..000000000 --- a/iproute2/patches/iproute2-3.11.0-optflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index 95266f5..1876ec4 100644 ---- a/Makefile -+++ b/Makefile -@@ -34,7 +34,7 @@ CCOPTS = -O2 - WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes - WFLAGS += -Wmissing-declarations -Wold-style-definition - --CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) -+CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(RPM_OPT_FLAGS) - YACCFLAGS = -d -t -v - - SUBDIRS=lib ip tc bridge misc netem genl man diff --git a/iproute2/patches/iproute2-3.11.0-rtt.patch b/iproute2/patches/iproute2-3.11.0-rtt.patch deleted file mode 100644 index 819837434..000000000 --- a/iproute2/patches/iproute2-3.11.0-rtt.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/lib/utils.c b/lib/utils.c -index dae1b51..8a1a65d 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -145,7 +145,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) - return -1; - - /* extra non-digits */ -- if (!p || p == arg || *p) -+ if (!p || p == arg) - return -1; - - /* over/underflow */ -@@ -155,7 +155,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) - res = strtoul(arg, &p, 0); - - /* empty string or trailing non-digits */ -- if (!p || p == arg || *p) -+ if (!p || p == arg) - return -1; - - /* overflow */ -@@ -165,8 +165,6 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) - t = (double)res; - } - -- if (p == arg) -- return -1; - *raw = 1; - - if (*p) { diff --git a/iproute2/patches/iproute2-3.11.0-tc-ok.patch b/iproute2/patches/iproute2-3.11.0-tc-ok.patch deleted file mode 100644 index fb8a13cc2..000000000 --- a/iproute2/patches/iproute2-3.11.0-tc-ok.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 3c4b5a852d5bb9070c7fb4428aa50f2e3e1f6e1b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 19 Sep 2013 11:25:49 +0200 -Subject: [PATCH] Confirm success for each tc -batch command -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If `tc -force -batch' is fed by a controlling program from a pipe, -it's not possible to recognize when a command has been processes -successfully. - -This patch adds an optional `-OK' option to the tc(8) tool, so `tc --force -OK -batch' will print "OK\n" to standard output on each -successfully completed tc command. - -Signed-off-by: Petr Písař ---- - man/man8/tc.8 | 8 +++++++- - tc/tc.c | 8 +++++++- - 2 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/man/man8/tc.8 b/man/man8/tc.8 -index e0acfeb..583eae2 100644 ---- a/man/man8/tc.8 -+++ b/man/man8/tc.8 -@@ -49,7 +49,7 @@ DEV - DEV - - .P --.B tc [ -force ] -b\fR[\fIatch\fR] \fB[ filename ] -+.B tc [ -force ] [ -OK ] -b\fR[\fIatch\fR] \fB[ filename ] - - .ti 8 - .IR FORMAT " := {" -@@ -440,6 +440,12 @@ First failure will cause termination of tc. - don't terminate tc on errors in batch mode. - If there were any errors during execution of the commands, the application return code will be non zero. - -+.TP -+.BR "\-OK" -+in batch mode, print -+.B OK -+and a new line on standard output after each successfully interpreted command. -+ - .SH HISTORY - .B tc - was written by Alexey N. Kuznetsov and added in Linux 2.2. -diff --git a/tc/tc.c b/tc/tc.c -index 9b50e74..b43bb47 100644 ---- a/tc/tc.c -+++ b/tc/tc.c -@@ -39,6 +39,7 @@ int batch_mode = 0; - int resolve_hosts = 0; - int use_iec = 0; - int force = 0; -+int ok = 0; - struct rtnl_handle rth; - - static void *BODY = NULL; /* cached handle dlopen(NULL) */ -@@ -183,7 +184,7 @@ noexist: - static void usage(void) - { - fprintf(stderr, "Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }\n" -- " tc [-force] -batch filename\n" -+ " tc [-force] [-OK] -batch filename\n" - "where OBJECT := { qdisc | class | filter | action | monitor }\n" - " OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [filename] }\n"); - } -@@ -251,6 +252,9 @@ static int batch(const char *name) - ret = 1; - if (!force) - break; -+ } else if (ok) { -+ printf("OK\n"); -+ fflush(stdout); - } - } - if (line) -@@ -288,6 +292,8 @@ int main(int argc, char **argv) - return 0; - } else if (matches(argv[1], "-force") == 0) { - ++force; -+ } else if (matches(argv[1], "-OK") == 0) { -+ ++ok; - } else if (matches(argv[1], "-batch") == 0) { - argc--; argv++; - if (argc <= 1) --- -1.8.3.1 - diff --git a/iproute2/patches/iproute2-3.12.0-lnstat-dump-to-stdout.patch b/iproute2/patches/iproute2-3.12.0-lnstat-dump-to-stdout.patch deleted file mode 100644 index d16a4bb26..000000000 --- a/iproute2/patches/iproute2-3.12.0-lnstat-dump-to-stdout.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/misc/lnstat.c b/misc/lnstat.c -index d6415ef..8608cfa 100644 ---- a/misc/lnstat.c -+++ b/misc/lnstat.c -@@ -351,7 +351,7 @@ int main(int argc, char **argv) - - switch (mode) { - case MODE_DUMP: -- lnstat_dump(stderr, lnstat_files); -+ lnstat_dump(stdout, lnstat_files); - break; - - case MODE_NORMAL: diff --git a/iproute2/patches/iproute2-3.12.0-lnstat-interval.patch b/iproute2/patches/iproute2-3.12.0-lnstat-interval.patch deleted file mode 100644 index b20f07948..000000000 --- a/iproute2/patches/iproute2-3.12.0-lnstat-interval.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/misc/lnstat.c b/misc/lnstat.c -index 8608cfa..8e8b1ba 100644 ---- a/misc/lnstat.c -+++ b/misc/lnstat.c -@@ -253,7 +253,7 @@ int main(int argc, char **argv) - MODE_JSON, - MODE_NORMAL, - } mode = MODE_NORMAL; -- unsigned long count = 1; -+ unsigned long count = 0; - struct table_hdr *header; - static struct field_params fp; - int num_req_files = 0; -@@ -366,7 +366,7 @@ int main(int argc, char **argv) - if (interval < 1 ) - interval = 1; - -- for (i = 0; i < count; i++) { -+ for (i = 0; i < count || !count; ) { - lnstat_update(lnstat_files); - if (mode == MODE_JSON) - print_json(stdout, lnstat_files, &fp); -@@ -377,8 +377,10 @@ int main(int argc, char **argv) - print_line(stdout, lnstat_files, &fp); - } - fflush(stdout); -- if (i < count - 1) -+ if (i < count - 1 || !count) - sleep(interval); -+ if (count) -+ ++i; - } - break; - } diff --git a/iproute2/patches/iproute2-3.4.0-kernel.patch b/iproute2/patches/iproute2-3.4.0-kernel.patch deleted file mode 100644 index 1e8372978..000000000 --- a/iproute2/patches/iproute2-3.4.0-kernel.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Makefile b/Makefile -index c107955..1e15c72 100644 ---- a/Makefile -+++ b/Makefile -@@ -7,6 +7,7 @@ DATADIR=$(PREFIX)/share - DOCDIR=$(DATADIR)/doc/iproute2 - MANDIR=$(DATADIR)/man - ARPDDIR=/var/lib/arpd -+KERNEL_INCLUDE=/usr/include - - # Path to db_185.h include - DBM_INCLUDE:=$(ROOTDIR)/usr/include diff --git a/iproute2/patches/iproute2-3.9.0-IPPROTO_IP_for_SA.patch b/iproute2/patches/iproute2-3.9.0-IPPROTO_IP_for_SA.patch deleted file mode 100644 index 6c150ecc2..000000000 --- a/iproute2/patches/iproute2-3.9.0-IPPROTO_IP_for_SA.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c -index 0495ff4..b1d4c6e 100644 ---- a/ip/ipxfrm.c -+++ b/ip/ipxfrm.c -@@ -1275,6 +1275,7 @@ static int xfrm_selector_upspec_parse(struct xfrm_selector *sel, - case IPPROTO_UDP: - case IPPROTO_SCTP: - case IPPROTO_DCCP: -+ case IPPROTO_IP: /* to allow shared SA for different protocols */ - break; - default: - fprintf(stderr, "\"sport\" and \"dport\" are invalid with PROTO value \"%s\"\n", strxf_proto(sel->proto)); diff --git a/iproute2/patches/man-pages.patch b/iproute2/patches/man-pages.patch deleted file mode 100644 index 94e5bc9ba..000000000 --- a/iproute2/patches/man-pages.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -up iproute2-2.6.29/man/man8/cbq.8.man iproute2-2.6.29/man/man8/cbq.8 ---- iproute2-2.6.29/man/man8/cbq.8.man 2009-09-24 14:05:44.868922557 +0200 -+++ iproute2-2.6.29/man/man8/cbq.8 2009-09-24 14:05:24.760143753 +0200 -@@ -0,0 +1 @@ -+.so man8/tc-cbq.8 -\ No newline at end of file -diff -up /dev/null iproute2-2.6.29/man/man8/ifcfg.8 ---- /dev/null 2009-09-22 09:26:40.270218984 +0200 -+++ iproute2-2.6.29/man/man8/ifcfg.8 2009-09-24 14:03:05.415151874 +0200 -@@ -0,0 +1,57 @@ -+.TH IFCFG 8 "September 24 2009" "iproute2" "Linux" -+.SH NAME -+ifcfg \- simplistic script which replaces ifconfig IP managment -+.SH SYNOPSIS -+.ad l -+.in +8 -+.ti -8 -+.B ifcfg -+.RI "[ " DEVICE " [ " :ALIAS: " ] ] [ " command " ] " ADDRESS " [ " LENGTH " ] [ " PEER " ] " -+.sp -+ -+.SH DESCRIPTION -+This manual page documents briefly the -+.B ifcfg -+command. -+.PP -+This is a simplistic script replacing one option of -+.B ifconfig -+, namely, IP address management. It not only adds -+addresses, but also carries out Duplicate Address Detection RFC-DHCP, -+sends unsolicited ARP to update the caches of other hosts sharing -+the interface, adds some control routes and restarts Router Discovery -+when it is necessary. -+ -+I strongly recommend using it -+.RI instead -+of -+.RI ifconfig -+both on hosts and on routers. -+ -+.SH IFCONFIG - COMMAND SYNTAX -+ -+.SS -+.TP -+.B DEVICE -+- it may have alias, suffix, separated by colon. -+ -+.TP -+.B command -+- add, delete or stop. -+ -+.TP -+.B address -+- optionally followed by prefix length. -+ -+.TP -+.B peer -+- optional peer address for pointpoint interfaces. -+ -+.SH EXAMPLE -+.nf ifcfg eth0 193.233.7.90/24 -+.fi -+This function determines, whether this is router or host. -+It returns 0, if the host is apparently not router. -+ -+.SH SEE ALSO -+.BR ip-cref.dvi