From 7410b1a1e2621f7b404f56253565ac3a009f3231 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 10 Aug 2016 16:13:27 +0200 Subject: [PATCH 001/111] Rebase package on top of iproute2-4.7.0 This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1365327 --- .gitignore | 2 +- iproute.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3bdca63..370013d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/iproute2-4.6.0.tar.xz +/iproute2-4.7.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 02c921e..9f71ad7 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.6.0 +Version: 4.7.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -161,6 +161,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Wed Aug 10 2016 Phil Sutter - 4.7.0-1 +- New version 4.7.0 + * Wed May 04 2016 Phil Sutter - 4.6.0-1 - New version 4.6.0 diff --git a/sources b/sources index a83d116..64f48ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d015e437e4f744d51d3a1a53341826d5 iproute2-4.6.0.tar.xz +d4b205830cdc2702f8a0cbd6232129cd iproute2-4.7.0.tar.xz From 31a378e37b8490d2e0c74678e0b000ec9be08e3d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 30 Nov 2016 10:20:10 +0100 Subject: [PATCH 002/111] Rebase package on top of iproute2-4.8.0 This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1383317 --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 9f71ad7..45a5b87 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.7.0 +Version: 4.8.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -161,6 +161,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Wed Nov 30 2016 Phil Sutter - 4.8.0-1 +- New version 4.8.0 + * Wed Aug 10 2016 Phil Sutter - 4.7.0-1 - New version 4.7.0 From 704fd20f8849d834637d586c9bae929e8e1691b0 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 30 Nov 2016 10:45:01 +0100 Subject: [PATCH 003/111] Update gitignore and sources files for new package version --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 370013d..e9f0a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /iproute2-4.7.0.tar.xz +/iproute2-4.8.0.tar.xz diff --git a/sources b/sources index 64f48ad..30b77dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d4b205830cdc2702f8a0cbd6232129cd iproute2-4.7.0.tar.xz +54c6411863cb16a4375aa5f788dca767 iproute2-4.8.0.tar.xz From d57a56be0957639839ae1f6d4939a526079fe49c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 13 Jan 2017 14:46:17 +0100 Subject: [PATCH 004/111] Resolve bz#1411127 for Rawhide, too --- ..._xt-Fix-segfault-with-iptables-1.6.0.patch | 36 +++++++++++++++++++ iproute.spec | 12 ++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch diff --git a/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch b/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch new file mode 100644 index 0000000..103a486 --- /dev/null +++ b/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch @@ -0,0 +1,36 @@ +From 34ea60b5b7645e96c600b8073dd82ac65144d711 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 12 Jan 2017 15:12:26 +0100 +Subject: [iproute PATCH] tc: m_xt: Fix segfault with iptables-1.6.0 + +Said iptables version introduced struct xtables_globals field +'compat_rev', a function pointer. Initializing it is mandatory as +libxtables calls it without existence check. + +Without this, tc segfaults when using the xt action like so: + +| tc filter add dev d0 parent ffff: u32 match u32 0 0 \ +| action xt -j MARK --set-mark 20 + +Signed-off-by: Phil Sutter +--- + tc/m_xt.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tc/m_xt.c b/tc/m_xt.c +index dbb54981462ee..57ed40d7aa3a8 100644 +--- a/tc/m_xt.c ++++ b/tc/m_xt.c +@@ -77,6 +77,9 @@ static struct xtables_globals tcipt_globals = { + .orig_opts = original_opts, + .opts = original_opts, + .exit_err = NULL, ++#if (XTABLES_VERSION_CODE >= 11) ++ .compat_rev = xtables_compatible_revision, ++#endif + }; + + /* +-- +2.11.0 + diff --git a/iproute.spec b/iproute.spec index 45a5b87..3ca0abc 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -16,6 +16,12 @@ Source2: avpkt # https://github.com/pavlix/iproute2/commits/fedora Patch1: 0001-Documentation-fixes.patch +# Fix for bz#1411127 +# +# Accepted upstream: +# https://patchwork.ozlabs.org/patch/714480/ +Patch2: 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch + License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -78,6 +84,7 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 +%patch2 -p1 %build export CFLAGS="%{optflags}" @@ -161,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Fri Jan 13 2017 Phil Sutter - 4.8.0-2 +- Fix segfault in xt action + * Wed Nov 30 2016 Phil Sutter - 4.8.0-1 - New version 4.8.0 From 4858e6e51e7f27bc8bc38f2e39d19250e6e2de9c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Sat, 28 Jan 2017 12:01:48 +0100 Subject: [PATCH 005/111] Rebase package on top of iproute2-4.9.0 --- .gitignore | 1 + iproute.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e9f0a3f..b6ef565 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /iproute2-4.7.0.tar.xz /iproute2-4.8.0.tar.xz +/iproute2-4.9.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 3ca0abc..ead1ebd 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.8.0 -Release: 2%{?dist} +Version: 4.9.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -168,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Sat Jan 28 2017 Phil Sutter - 4.9.0-1 +- New version 4.9.0 + * Fri Jan 13 2017 Phil Sutter - 4.8.0-2 - Fix segfault in xt action diff --git a/sources b/sources index 30b77dd..b2364b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -54c6411863cb16a4375aa5f788dca767 iproute2-4.8.0.tar.xz +SHA512 (iproute2-4.9.0.tar.xz) = 0d974d7c001eac75def0d90b628e432d9847024843d02a6cd27266ff30e3f7a9c874fa91115da74db5f321c2e815b486a847059ca6df3aa8ea49432ffa39a889 From 4608d0c11f05f76505d1cd4d9d9ca87d27e7842a Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Sat, 28 Jan 2017 14:04:26 +0100 Subject: [PATCH 006/111] Fix for failing 'make install' --- ...pages-add-man-page-for-skbmod-action.patch | 58 +++++++++++++++++++ iproute.spec | 9 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-man-pages-add-man-page-for-skbmod-action.patch diff --git a/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch b/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch new file mode 100644 index 0000000..881d287 --- /dev/null +++ b/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch @@ -0,0 +1,58 @@ +From 25ee240c3e80b772dc596fc28013a3f0e2291ab3 Mon Sep 17 00:00:00 2001 +From: Jiri Benc +Date: Wed, 18 Jan 2017 13:37:25 +0100 +Subject: [PATCH] Revert "man pages: add man page for skbmod action" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit a40995d1c79e5a1b8711f6cd26eca9807fc4dd50. + +The patch is missing the actual tc-skbmod.8 file which causes 'make +install' to fail: + +install -m 0755 -d /tmp/ip/usr/share/man/man8 +install -m 0644 ip-address.8 ip-link.8 ip-route.8 ip.8 arpd.8 lnstat.8 +routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 tc.8 tc-bfifo.8 tc-bpf.8 tc-cbq.8 +tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-fq.8 tc-drr.8 tc-ematch.8 +tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-pie.8 tc-mqprio.8 tc-netem.8 tc-pfifo.8 +tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 +bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 ip-addrlabel.8 ip-fou.8 ip-gue.8 +ip-l2tp.8 ip-macsec.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 +ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 ip-tcp_metrics.8 +ip-netconf.8 ip-token.8 tipc.8 tipc-bearer.8 tipc-link.8 tipc-media.8 +tipc-nametable.8 tipc-node.8 tipc-socket.8 tc-basic.8 tc-cgroup.8 tc-flow.8 +tc-flower.8 tc-fw.8 tc-route.8 tc-tcindex.8 tc-u32.8 tc-matchall.8 +tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 +tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 tc-skbmod.8 +tc-tunnel_key.8 devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 +devlink-sb.8 /tmp/ip/usr/share/man/man8 +install: cannot stat ‘tc-skbmod.8’: No such file or directory +make[2]: *** [install] Error 1 +make[1]: *** [install] Error 2 + +Signed-off-by: Jiri Benc + +Conflicts: + man/man8/Makefile +-> Context changes due to missing other new man pages. +--- + man/man8/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/man8/Makefile b/man/man8/Makefile +index de6f249b..4ad96ce4 100644 +--- a/man/man8/Makefile ++++ b/man/man8/Makefile +@@ -16,7 +16,7 @@ MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss. + tc-basic.8 tc-cgroup.8 tc-flow.8 tc-flower.8 tc-fw.8 tc-route.8 \ + tc-tcindex.8 tc-u32.8 tc-matchall.8 \ + tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 \ +- tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 tc-skbmod.8 \ ++ tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 \ + devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 devlink-sb.8 + + all: $(TARGETS) +-- +2.11.0 + diff --git a/iproute.spec b/iproute.spec index ead1ebd..9cbbad0 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -22,6 +22,9 @@ Patch1: 0001-Documentation-fixes.patch # https://patchwork.ozlabs.org/patch/714480/ Patch2: 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch +# Fix 'make install' +Patch3: 0001-Revert-man-pages-add-man-page-for-skbmod-action.patch + License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -85,6 +88,7 @@ The libnetlink static library. %setup -q -n %{name}2-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -168,6 +172,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Sat Jan 28 2017 Phil Sutter - 4.9.0-2 +- Fix for failing 'make install' + * Sat Jan 28 2017 Phil Sutter - 4.9.0-1 - New version 4.9.0 From 92106c2795ad573fe5e64651b4bf74c73591b864 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Thu, 2 Feb 2017 13:54:21 +0100 Subject: [PATCH 007/111] - Release bump for iptables-1.6.1 (libxtables.so.12) --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 9cbbad0..e0a6835 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.9.0 -Release: 2%{?dist} +Release: 3%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -172,6 +172,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Thu Feb 2 2017 Thomas Woerner - 4.9.0-3 +- Release bump for iptables-1.6.1 (libxtables.so.12) + * Sat Jan 28 2017 Phil Sutter - 4.9.0-2 - Fix for failing 'make install' From 5362d1ec6009ae1343fdd257bd15a4f752fcb008 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 16:31:32 +0000 Subject: [PATCH 008/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index e0a6835..ce13f45 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.9.0 -Release: 3%{?dist} +Release: 4%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -172,6 +172,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/libnetlink.h %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 4.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Feb 2 2017 Thomas Woerner - 4.9.0-3 - Release bump for iptables-1.6.1 (libxtables.so.12) From e068a451ec021ecabde090967691d595f8588e1b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 14 Mar 2017 14:41:35 +0100 Subject: [PATCH 009/111] Rebase package on top of iproute2-4.10.0 --- ...pages-add-man-page-for-skbmod-action.patch | 58 ------------------- ..._xt-Fix-segfault-with-iptables-1.6.0.patch | 36 ------------ iproute.spec | 32 +++++----- 3 files changed, 14 insertions(+), 112 deletions(-) delete mode 100644 0001-Revert-man-pages-add-man-page-for-skbmod-action.patch delete mode 100644 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch diff --git a/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch b/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch deleted file mode 100644 index 881d287..0000000 --- a/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 25ee240c3e80b772dc596fc28013a3f0e2291ab3 Mon Sep 17 00:00:00 2001 -From: Jiri Benc -Date: Wed, 18 Jan 2017 13:37:25 +0100 -Subject: [PATCH] Revert "man pages: add man page for skbmod action" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reverts commit a40995d1c79e5a1b8711f6cd26eca9807fc4dd50. - -The patch is missing the actual tc-skbmod.8 file which causes 'make -install' to fail: - -install -m 0755 -d /tmp/ip/usr/share/man/man8 -install -m 0644 ip-address.8 ip-link.8 ip-route.8 ip.8 arpd.8 lnstat.8 -routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 tc.8 tc-bfifo.8 tc-bpf.8 tc-cbq.8 -tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-fq.8 tc-drr.8 tc-ematch.8 -tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-pie.8 tc-mqprio.8 tc-netem.8 tc-pfifo.8 -tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 -bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 ip-addrlabel.8 ip-fou.8 ip-gue.8 -ip-l2tp.8 ip-macsec.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 -ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 ip-tcp_metrics.8 -ip-netconf.8 ip-token.8 tipc.8 tipc-bearer.8 tipc-link.8 tipc-media.8 -tipc-nametable.8 tipc-node.8 tipc-socket.8 tc-basic.8 tc-cgroup.8 tc-flow.8 -tc-flower.8 tc-fw.8 tc-route.8 tc-tcindex.8 tc-u32.8 tc-matchall.8 -tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 -tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 tc-skbmod.8 -tc-tunnel_key.8 devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 -devlink-sb.8 /tmp/ip/usr/share/man/man8 -install: cannot stat ‘tc-skbmod.8’: No such file or directory -make[2]: *** [install] Error 1 -make[1]: *** [install] Error 2 - -Signed-off-by: Jiri Benc - -Conflicts: - man/man8/Makefile --> Context changes due to missing other new man pages. ---- - man/man8/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/man8/Makefile b/man/man8/Makefile -index de6f249b..4ad96ce4 100644 ---- a/man/man8/Makefile -+++ b/man/man8/Makefile -@@ -16,7 +16,7 @@ MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss. - tc-basic.8 tc-cgroup.8 tc-flow.8 tc-flower.8 tc-fw.8 tc-route.8 \ - tc-tcindex.8 tc-u32.8 tc-matchall.8 \ - tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 \ -- tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 tc-skbmod.8 \ -+ tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 \ - devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 devlink-sb.8 - - all: $(TARGETS) --- -2.11.0 - diff --git a/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch b/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch deleted file mode 100644 index 103a486..0000000 --- a/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 34ea60b5b7645e96c600b8073dd82ac65144d711 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 12 Jan 2017 15:12:26 +0100 -Subject: [iproute PATCH] tc: m_xt: Fix segfault with iptables-1.6.0 - -Said iptables version introduced struct xtables_globals field -'compat_rev', a function pointer. Initializing it is mandatory as -libxtables calls it without existence check. - -Without this, tc segfaults when using the xt action like so: - -| tc filter add dev d0 parent ffff: u32 match u32 0 0 \ -| action xt -j MARK --set-mark 20 - -Signed-off-by: Phil Sutter ---- - tc/m_xt.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tc/m_xt.c b/tc/m_xt.c -index dbb54981462ee..57ed40d7aa3a8 100644 ---- a/tc/m_xt.c -+++ b/tc/m_xt.c -@@ -77,6 +77,9 @@ static struct xtables_globals tcipt_globals = { - .orig_opts = original_opts, - .opts = original_opts, - .exit_err = NULL, -+#if (XTABLES_VERSION_CODE >= 11) -+ .compat_rev = xtables_compatible_revision, -+#endif - }; - - /* --- -2.11.0 - diff --git a/iproute.spec b/iproute.spec index ce13f45..7cc38a5 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,30 +1,21 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.9.0 -Release: 4%{?dist} +Version: 4.10.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: cbq-0000.example Source2: avpkt -# manpage/help improvements -# -# * Piece by piece absorbed upstream. -# -# https://github.com/pavlix/iproute2/commits/fedora +# Fedora local docs changes: +# - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links +# to tc-cbq.8. +# - Drop reference to Debian from ss.8 man page. +# - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch -# Fix for bz#1411127 -# -# Accepted upstream: -# https://patchwork.ozlabs.org/patch/714480/ -Patch2: 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch - -# Fix 'make install' -Patch3: 0001-Revert-man-pages-add-man-page-for-skbmod-action.patch - License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -87,8 +78,6 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -170,8 +159,15 @@ rm -rf '%{buildroot}%{_docdir}' %{_mandir}/man3/* %{_libdir}/libnetlink.a %{_includedir}/libnetlink.h +%{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Mar 14 2017 Phil Sutter - 4.10.0-1 +- Ship new header iproute2/bpf_elf.h +- Document content of remaining docs fixup patch in spec file +- Drop patches already applied upstream +- New version 4.10.0 + * Fri Feb 10 2017 Fedora Release Engineering - 4.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 1a5ae27414b1d278b724901d105633b6d30de85c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 14 Mar 2017 14:49:30 +0100 Subject: [PATCH 010/111] Update gitignore and sources files for new package version --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b6ef565..52ced98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /iproute2-4.7.0.tar.xz /iproute2-4.8.0.tar.xz /iproute2-4.9.0.tar.xz +/iproute2-4.10.0.tar.xz diff --git a/sources b/sources index b2364b7..72be43e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.9.0.tar.xz) = 0d974d7c001eac75def0d90b628e432d9847024843d02a6cd27266ff30e3f7a9c874fa91115da74db5f321c2e815b486a847059ca6df3aa8ea49432ffa39a889 +SHA512 (iproute2-4.10.0.tar.xz) = e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b From d0d65fdc0cb89633018dbb50a142232daf5d32d8 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 14 Mar 2017 14:41:35 +0100 Subject: [PATCH 011/111] Rebase package on top of iproute2-4.10.0 --- .gitignore | 1 + ...pages-add-man-page-for-skbmod-action.patch | 58 ------------------- ..._xt-Fix-segfault-with-iptables-1.6.0.patch | 36 ------------ iproute.spec | 32 +++++----- sources | 2 +- 5 files changed, 16 insertions(+), 113 deletions(-) delete mode 100644 0001-Revert-man-pages-add-man-page-for-skbmod-action.patch delete mode 100644 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch diff --git a/.gitignore b/.gitignore index b6ef565..52ced98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /iproute2-4.7.0.tar.xz /iproute2-4.8.0.tar.xz /iproute2-4.9.0.tar.xz +/iproute2-4.10.0.tar.xz diff --git a/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch b/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch deleted file mode 100644 index 881d287..0000000 --- a/0001-Revert-man-pages-add-man-page-for-skbmod-action.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 25ee240c3e80b772dc596fc28013a3f0e2291ab3 Mon Sep 17 00:00:00 2001 -From: Jiri Benc -Date: Wed, 18 Jan 2017 13:37:25 +0100 -Subject: [PATCH] Revert "man pages: add man page for skbmod action" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reverts commit a40995d1c79e5a1b8711f6cd26eca9807fc4dd50. - -The patch is missing the actual tc-skbmod.8 file which causes 'make -install' to fail: - -install -m 0755 -d /tmp/ip/usr/share/man/man8 -install -m 0644 ip-address.8 ip-link.8 ip-route.8 ip.8 arpd.8 lnstat.8 -routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 tc.8 tc-bfifo.8 tc-bpf.8 tc-cbq.8 -tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-fq.8 tc-drr.8 tc-ematch.8 -tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-pie.8 tc-mqprio.8 tc-netem.8 tc-pfifo.8 -tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 -bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 ip-addrlabel.8 ip-fou.8 ip-gue.8 -ip-l2tp.8 ip-macsec.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 -ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 ip-tcp_metrics.8 -ip-netconf.8 ip-token.8 tipc.8 tipc-bearer.8 tipc-link.8 tipc-media.8 -tipc-nametable.8 tipc-node.8 tipc-socket.8 tc-basic.8 tc-cgroup.8 tc-flow.8 -tc-flower.8 tc-fw.8 tc-route.8 tc-tcindex.8 tc-u32.8 tc-matchall.8 -tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 -tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 tc-skbmod.8 -tc-tunnel_key.8 devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 -devlink-sb.8 /tmp/ip/usr/share/man/man8 -install: cannot stat ‘tc-skbmod.8’: No such file or directory -make[2]: *** [install] Error 1 -make[1]: *** [install] Error 2 - -Signed-off-by: Jiri Benc - -Conflicts: - man/man8/Makefile --> Context changes due to missing other new man pages. ---- - man/man8/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/man8/Makefile b/man/man8/Makefile -index de6f249b..4ad96ce4 100644 ---- a/man/man8/Makefile -+++ b/man/man8/Makefile -@@ -16,7 +16,7 @@ MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss. - tc-basic.8 tc-cgroup.8 tc-flow.8 tc-flower.8 tc-fw.8 tc-route.8 \ - tc-tcindex.8 tc-u32.8 tc-matchall.8 \ - tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 \ -- tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 tc-skbmod.8 \ -+ tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8 tc-ife.8 \ - devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8 devlink-sb.8 - - all: $(TARGETS) --- -2.11.0 - diff --git a/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch b/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch deleted file mode 100644 index 103a486..0000000 --- a/0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 34ea60b5b7645e96c600b8073dd82ac65144d711 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 12 Jan 2017 15:12:26 +0100 -Subject: [iproute PATCH] tc: m_xt: Fix segfault with iptables-1.6.0 - -Said iptables version introduced struct xtables_globals field -'compat_rev', a function pointer. Initializing it is mandatory as -libxtables calls it without existence check. - -Without this, tc segfaults when using the xt action like so: - -| tc filter add dev d0 parent ffff: u32 match u32 0 0 \ -| action xt -j MARK --set-mark 20 - -Signed-off-by: Phil Sutter ---- - tc/m_xt.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tc/m_xt.c b/tc/m_xt.c -index dbb54981462ee..57ed40d7aa3a8 100644 ---- a/tc/m_xt.c -+++ b/tc/m_xt.c -@@ -77,6 +77,9 @@ static struct xtables_globals tcipt_globals = { - .orig_opts = original_opts, - .opts = original_opts, - .exit_err = NULL, -+#if (XTABLES_VERSION_CODE >= 11) -+ .compat_rev = xtables_compatible_revision, -+#endif - }; - - /* --- -2.11.0 - diff --git a/iproute.spec b/iproute.spec index ce13f45..7cc38a5 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,30 +1,21 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.9.0 -Release: 4%{?dist} +Version: 4.10.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: cbq-0000.example Source2: avpkt -# manpage/help improvements -# -# * Piece by piece absorbed upstream. -# -# https://github.com/pavlix/iproute2/commits/fedora +# Fedora local docs changes: +# - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links +# to tc-cbq.8. +# - Drop reference to Debian from ss.8 man page. +# - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch -# Fix for bz#1411127 -# -# Accepted upstream: -# https://patchwork.ozlabs.org/patch/714480/ -Patch2: 0001-tc-m_xt-Fix-segfault-with-iptables-1.6.0.patch - -# Fix 'make install' -Patch3: 0001-Revert-man-pages-add-man-page-for-skbmod-action.patch - License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -87,8 +78,6 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -170,8 +159,15 @@ rm -rf '%{buildroot}%{_docdir}' %{_mandir}/man3/* %{_libdir}/libnetlink.a %{_includedir}/libnetlink.h +%{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Mar 14 2017 Phil Sutter - 4.10.0-1 +- Ship new header iproute2/bpf_elf.h +- Document content of remaining docs fixup patch in spec file +- Drop patches already applied upstream +- New version 4.10.0 + * Fri Feb 10 2017 Fedora Release Engineering - 4.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index b2364b7..72be43e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.9.0.tar.xz) = 0d974d7c001eac75def0d90b628e432d9847024843d02a6cd27266ff30e3f7a9c874fa91115da74db5f321c2e815b486a847059ca6df3aa8ea49432ffa39a889 +SHA512 (iproute2-4.10.0.tar.xz) = e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b From 63284ad5e99dfd2c7df3ca63ccab601218479ff9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 17 Mar 2017 22:51:24 +0100 Subject: [PATCH 012/111] Add two fixes to 4.10.0 release from upstream --- 0001-Documentation-fixes.patch | 34 ++++++++++++----- ...rrect-type-when-calling-flower_icmp_.patch | 38 +++++++++++++++++++ ...t-for-valid-type-in-bpf_get_work_dir.patch | 38 +++++++++++++++++++ iproute.spec | 11 +++++- 4 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch create mode 100644 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch diff --git a/0001-Documentation-fixes.patch b/0001-Documentation-fixes.patch index 0a149e6..3269037 100644 --- a/0001-Documentation-fixes.patch +++ b/0001-Documentation-fixes.patch @@ -1,13 +1,26 @@ -diff -Nurp iproute2-4.5.0.orig/man/man8/cbq.8 iproute2-4.5.0/man/man8/cbq.8 ---- iproute2-4.5.0.orig/man/man8/cbq.8 1970-01-01 01:00:00.000000000 +0100 -+++ iproute2-4.5.0/man/man8/cbq.8 2016-03-18 13:17:00.673773197 +0100 +From 2332a21bd43ca69ad38a30109881867b9c5c2ea0 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 17 Mar 2017 22:47:27 +0100 +Subject: [PATCH] Documentation fixes + +--- + man/man8/cbq.8 | 1 + + man/man8/ss.8 | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + create mode 100644 man/man8/cbq.8 + +diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 +new file mode 100644 +index 00000000..bef35201 +--- /dev/null ++++ b/man/man8/cbq.8 @@ -0,0 +1 @@ +.so man8/tc-cbq.8 -\ No newline at end of file -diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8 ---- iproute2-4.5.0.orig/man/man8/ss.8 2016-03-18 13:16:45.046773197 +0100 -+++ iproute2-4.5.0/man/man8/ss.8 2016-03-18 13:17:05.910773197 +0100 -@@ -136,7 +136,7 @@ Read filter information from FILE. +diff --git a/man/man8/ss.8 b/man/man8/ss.8 +index 4ef11523..3898bdbd 100644 +--- a/man/man8/ss.8 ++++ b/man/man8/ss.8 +@@ -142,7 +142,7 @@ Read filter information from FILE. Each line of FILE is interpreted like single command line option. If FILE is - stdin is used. .TP .B FILTER := [ state STATE-FILTER ] [ EXPRESSION ] @@ -16,7 +29,7 @@ diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8 .SH STATE-FILTER -@@ -191,7 +191,7 @@ Find all local processes connected to X +@@ -197,7 +197,7 @@ Find all local processes connected to X server. List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers. .SH SEE ALSO .BR ip (8), @@ -25,3 +38,6 @@ diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8 .br .BR RFC " 793 " - https://tools.ietf.org/rfc/rfc793.txt (TCP states) +-- +2.11.0 + diff --git a/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch b/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch new file mode 100644 index 0000000..1ca3e04 --- /dev/null +++ b/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch @@ -0,0 +1,38 @@ +From 2706951bc0dad80596f172e9197452163bc9e067 Mon Sep 17 00:00:00 2001 +From: Simon Horman +Date: Wed, 8 Feb 2017 13:04:31 +0100 +Subject: [PATCH] tc: flower: use correct type when calling + flower_icmp_attr_type + +Use enum flower_icmp_field rather than bool as type of third parameter +when calling flower_icmp_attr_type. + +Fixes: eb3b5696f163 ("tc: flower: support matching on ICMP type and code") +Signed-off-by: Simon Horman +(cherry picked from commit 81f6e5a7279eaab826ba8b291b98fb2e89df0572) +--- + tc/f_flower.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tc/f_flower.c b/tc/f_flower.c +index 145a8566..75a3fbbc 100644 +--- a/tc/f_flower.c ++++ b/tc/f_flower.c +@@ -752,10 +752,12 @@ static int flower_print_opt(struct filter_util *qu, FILE *f, + if (nl_type >= 0) + flower_print_port(f, "src_port", tb[nl_type]); + +- nl_type = flower_icmp_attr_type(eth_type, ip_proto, false); ++ nl_type = flower_icmp_attr_type(eth_type, ip_proto, ++ FLOWER_ICMP_FIELD_TYPE); + if (nl_type >= 0) + flower_print_icmp(f, "icmp_type", tb[nl_type]); +- nl_type = flower_icmp_attr_type(eth_type, ip_proto, true); ++ nl_type = flower_icmp_attr_type(eth_type, ip_proto, ++ FLOWER_ICMP_FIELD_CODE); + if (nl_type >= 0) + flower_print_icmp(f, "icmp_code", tb[nl_type]); + +-- +2.11.0 + diff --git a/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch b/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch new file mode 100644 index 0000000..6b40d60 --- /dev/null +++ b/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch @@ -0,0 +1,38 @@ +From 305197a2378ffb581f1eca3ec804f76690be7b5a Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Mon, 6 Mar 2017 13:06:00 +0100 +Subject: [PATCH] bpf: test for valid type in bpf_get_work_dir + +Jan-Erik reported an assertion in bpf_prog_to_subdir() failed where +type was BPF_PROG_TYPE_UNSPEC, which is only used in bpf_init_env() +to auto-mount and cache the bpf fs mount point. + +Therefore, make sure when bpf_init_env() is called multiple times +(f.e. eBPF classifier with eBPF action attached) and bpf_mnt_cached +is set already that the type is also valid. In bpf_init_env(), we're +only interested in the mount point and not a type-specific subdir. + +Fixes: e42256699cac ("bpf: make tc's bpf loader generic and move into lib") +Reported-by: Jan-Erik Rediger +Signed-off-by: Daniel Borkmann +(cherry picked from commit 51361a9f1cfca81259c68515cb24fbaace03136a) +--- + lib/bpf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/bpf.c b/lib/bpf.c +index 64e199b3..fef9cfcd 100644 +--- a/lib/bpf.c ++++ b/lib/bpf.c +@@ -596,7 +596,7 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type) + if (bpf_mnt_cached) { + const char *out = mnt; + +- if (out) { ++ if (out && type) { + snprintf(bpf_tmp, sizeof(bpf_tmp), "%s%s/", + out, bpf_prog_to_subdir(type)); + out = bpf_tmp; +-- +2.11.0 + diff --git a/iproute.spec b/iproute.spec index 7cc38a5..80bccdb 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.10.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -16,6 +16,10 @@ Source2: avpkt # - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch +# upstream fixes for commits in 4.10.0 release +Patch2: 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch +Patch3: 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch + License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -78,6 +82,8 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -162,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Mar 17 2017 Phil Sutter - 4.10.0-2 +- Add two fixes to 4.10.0 release from upstream. + * Tue Mar 14 2017 Phil Sutter - 4.10.0-1 - Ship new header iproute2/bpf_elf.h - Document content of remaining docs fixup patch in spec file From 12cefecf0f82357786de733418b857d6b44f2693 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 17 Mar 2017 22:51:24 +0100 Subject: [PATCH 013/111] Add two fixes to 4.10.0 release from upstream --- 0001-Documentation-fixes.patch | 34 ++++++++++++----- ...rrect-type-when-calling-flower_icmp_.patch | 38 +++++++++++++++++++ ...t-for-valid-type-in-bpf_get_work_dir.patch | 38 +++++++++++++++++++ iproute.spec | 11 +++++- 4 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch create mode 100644 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch diff --git a/0001-Documentation-fixes.patch b/0001-Documentation-fixes.patch index 0a149e6..3269037 100644 --- a/0001-Documentation-fixes.patch +++ b/0001-Documentation-fixes.patch @@ -1,13 +1,26 @@ -diff -Nurp iproute2-4.5.0.orig/man/man8/cbq.8 iproute2-4.5.0/man/man8/cbq.8 ---- iproute2-4.5.0.orig/man/man8/cbq.8 1970-01-01 01:00:00.000000000 +0100 -+++ iproute2-4.5.0/man/man8/cbq.8 2016-03-18 13:17:00.673773197 +0100 +From 2332a21bd43ca69ad38a30109881867b9c5c2ea0 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 17 Mar 2017 22:47:27 +0100 +Subject: [PATCH] Documentation fixes + +--- + man/man8/cbq.8 | 1 + + man/man8/ss.8 | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + create mode 100644 man/man8/cbq.8 + +diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 +new file mode 100644 +index 00000000..bef35201 +--- /dev/null ++++ b/man/man8/cbq.8 @@ -0,0 +1 @@ +.so man8/tc-cbq.8 -\ No newline at end of file -diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8 ---- iproute2-4.5.0.orig/man/man8/ss.8 2016-03-18 13:16:45.046773197 +0100 -+++ iproute2-4.5.0/man/man8/ss.8 2016-03-18 13:17:05.910773197 +0100 -@@ -136,7 +136,7 @@ Read filter information from FILE. +diff --git a/man/man8/ss.8 b/man/man8/ss.8 +index 4ef11523..3898bdbd 100644 +--- a/man/man8/ss.8 ++++ b/man/man8/ss.8 +@@ -142,7 +142,7 @@ Read filter information from FILE. Each line of FILE is interpreted like single command line option. If FILE is - stdin is used. .TP .B FILTER := [ state STATE-FILTER ] [ EXPRESSION ] @@ -16,7 +29,7 @@ diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8 .SH STATE-FILTER -@@ -191,7 +191,7 @@ Find all local processes connected to X +@@ -197,7 +197,7 @@ Find all local processes connected to X server. List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers. .SH SEE ALSO .BR ip (8), @@ -25,3 +38,6 @@ diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8 .br .BR RFC " 793 " - https://tools.ietf.org/rfc/rfc793.txt (TCP states) +-- +2.11.0 + diff --git a/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch b/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch new file mode 100644 index 0000000..1ca3e04 --- /dev/null +++ b/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch @@ -0,0 +1,38 @@ +From 2706951bc0dad80596f172e9197452163bc9e067 Mon Sep 17 00:00:00 2001 +From: Simon Horman +Date: Wed, 8 Feb 2017 13:04:31 +0100 +Subject: [PATCH] tc: flower: use correct type when calling + flower_icmp_attr_type + +Use enum flower_icmp_field rather than bool as type of third parameter +when calling flower_icmp_attr_type. + +Fixes: eb3b5696f163 ("tc: flower: support matching on ICMP type and code") +Signed-off-by: Simon Horman +(cherry picked from commit 81f6e5a7279eaab826ba8b291b98fb2e89df0572) +--- + tc/f_flower.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tc/f_flower.c b/tc/f_flower.c +index 145a8566..75a3fbbc 100644 +--- a/tc/f_flower.c ++++ b/tc/f_flower.c +@@ -752,10 +752,12 @@ static int flower_print_opt(struct filter_util *qu, FILE *f, + if (nl_type >= 0) + flower_print_port(f, "src_port", tb[nl_type]); + +- nl_type = flower_icmp_attr_type(eth_type, ip_proto, false); ++ nl_type = flower_icmp_attr_type(eth_type, ip_proto, ++ FLOWER_ICMP_FIELD_TYPE); + if (nl_type >= 0) + flower_print_icmp(f, "icmp_type", tb[nl_type]); +- nl_type = flower_icmp_attr_type(eth_type, ip_proto, true); ++ nl_type = flower_icmp_attr_type(eth_type, ip_proto, ++ FLOWER_ICMP_FIELD_CODE); + if (nl_type >= 0) + flower_print_icmp(f, "icmp_code", tb[nl_type]); + +-- +2.11.0 + diff --git a/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch b/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch new file mode 100644 index 0000000..6b40d60 --- /dev/null +++ b/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch @@ -0,0 +1,38 @@ +From 305197a2378ffb581f1eca3ec804f76690be7b5a Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Mon, 6 Mar 2017 13:06:00 +0100 +Subject: [PATCH] bpf: test for valid type in bpf_get_work_dir + +Jan-Erik reported an assertion in bpf_prog_to_subdir() failed where +type was BPF_PROG_TYPE_UNSPEC, which is only used in bpf_init_env() +to auto-mount and cache the bpf fs mount point. + +Therefore, make sure when bpf_init_env() is called multiple times +(f.e. eBPF classifier with eBPF action attached) and bpf_mnt_cached +is set already that the type is also valid. In bpf_init_env(), we're +only interested in the mount point and not a type-specific subdir. + +Fixes: e42256699cac ("bpf: make tc's bpf loader generic and move into lib") +Reported-by: Jan-Erik Rediger +Signed-off-by: Daniel Borkmann +(cherry picked from commit 51361a9f1cfca81259c68515cb24fbaace03136a) +--- + lib/bpf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/bpf.c b/lib/bpf.c +index 64e199b3..fef9cfcd 100644 +--- a/lib/bpf.c ++++ b/lib/bpf.c +@@ -596,7 +596,7 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type) + if (bpf_mnt_cached) { + const char *out = mnt; + +- if (out) { ++ if (out && type) { + snprintf(bpf_tmp, sizeof(bpf_tmp), "%s%s/", + out, bpf_prog_to_subdir(type)); + out = bpf_tmp; +-- +2.11.0 + diff --git a/iproute.spec b/iproute.spec index 7cc38a5..80bccdb 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.10.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -16,6 +16,10 @@ Source2: avpkt # - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch +# upstream fixes for commits in 4.10.0 release +Patch2: 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch +Patch3: 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch + License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -78,6 +82,8 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -162,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Mar 17 2017 Phil Sutter - 4.10.0-2 +- Add two fixes to 4.10.0 release from upstream. + * Tue Mar 14 2017 Phil Sutter - 4.10.0-1 - Ship new header iproute2/bpf_elf.h - Document content of remaining docs fixup patch in spec file From 7e4e9ce2e4135c7ef949da11542e6bf6a8ba73f9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 11 May 2017 23:14:09 +0200 Subject: [PATCH 014/111] don't build docs for module builds to limit dependencies --- iproute.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/iproute.spec b/iproute.spec index 80bccdb..868260b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.10.0 -Release: 2%{?dist} +Release: 3%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -28,8 +28,9 @@ BuildRequires: iptables-devel >= 1.4.5 BuildRequires: libdb-devel BuildRequires: libmnl-devel BuildRequires: libselinux-devel -BuildRequires: linuxdoc-tools BuildRequires: pkgconfig +%if ! 0%{?_module_build} +BuildRequires: linuxdoc-tools BuildRequires: psutils BuildRequires: tex(cm-super-t1.enc) BuildRequires: tex(dvips) @@ -39,6 +40,7 @@ BuildRequires: tex(fullpage.sty) %if 0%{?fedora} BuildRequires: linux-atm-libs-devel %endif +%endif # For the UsrMove transition period Conflicts: filesystem < 3 Provides: /sbin/ip @@ -62,6 +64,7 @@ The Traffic Control utility manages queueing disciplines, their classes and attached filters and actions. It is the standard tool to configure QoS in Linux. +%if ! 0%{?_module_build} %package doc Summary: Documentation for iproute2 utilities with examples Group: Applications/System @@ -69,6 +72,7 @@ License: GPLv2+ %description doc The iproute documentation contains howtos and examples of settings. +%endif %package devel Summary: iproute development files @@ -91,7 +95,9 @@ export LIBDIR=/%{_libdir} export IPT_LIB_DIR=/%{_lib}/xtables ./configure make %{?_smp_mflags} +%if ! 0%{?_module_build} make -C doc +%endif %install export DESTDIR='%{buildroot}' @@ -153,11 +159,13 @@ rm -rf '%{buildroot}%{_docdir}' %config(noreplace) %{_sysconfdir}/sysconfig/cbq/* %{_datadir}/bash-completion/completions/tc +%if ! 0%{?_module_build} %files doc %{!?_licensedir:%global license %%doc} %license COPYING %doc doc/*.ps %doc examples +%endif %files devel %{!?_licensedir:%global license %%doc} @@ -168,6 +176,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu May 11 2017 Karsten Hopp - 4.10.0-3 +- don't build docs for module builds to limit dependencies + * Fri Mar 17 2017 Phil Sutter - 4.10.0-2 - Add two fixes to 4.10.0 release from upstream. From a5ccbe04be84aa013509158540a24b3a6208a2fc Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 23 May 2017 13:31:58 +0200 Subject: [PATCH 015/111] Rebase package on top of iproute2-4.11.0 --- iproute.spec | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/iproute.spec b/iproute.spec index 868260b..33c3d17 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.10.0 -Release: 3%{?dist} +Version: 4.11.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -16,10 +16,6 @@ Source2: avpkt # - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch -# upstream fixes for commits in 4.10.0 release -Patch2: 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch -Patch3: 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch - License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -58,6 +54,7 @@ Group: Applications/System License: GPLv2+ Obsoletes: %{name} < 4.5.0-3 Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: tc %description tc The Traffic Control utility manages queueing disciplines, their classes and @@ -86,8 +83,6 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -176,6 +171,10 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue May 23 2017 Phil Sutter - 4.11.0-1 +- Add virtual capability to tc subpackage so it's easier found +- New version 4.11.0 + * Thu May 11 2017 Karsten Hopp - 4.10.0-3 - don't build docs for module builds to limit dependencies From 6da80e439c39242866e8a04e7c9b6807596500e9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 23 May 2017 14:36:29 +0200 Subject: [PATCH 016/111] Update gitignore and sources files for new package version --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 52ced98..581d394 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /iproute2-4.8.0.tar.xz /iproute2-4.9.0.tar.xz /iproute2-4.10.0.tar.xz +/iproute2-4.11.0.tar.xz diff --git a/sources b/sources index 72be43e..045e47d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.10.0.tar.xz) = e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b +SHA512 (iproute2-4.11.0.tar.xz) = e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa From b66e3704a96dd64fe5af4892fcf86f3ff8ef2ea9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 21 Jul 2017 17:04:46 +0200 Subject: [PATCH 017/111] Rebase package on top of iproute2-4.12.0 --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 581d394..7065a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /iproute2-4.9.0.tar.xz /iproute2-4.10.0.tar.xz /iproute2-4.11.0.tar.xz +/iproute2-4.12.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 33c3d17..44f78d9 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.11.0 +Version: 4.12.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -171,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Jul 21 2017 Phil Sutter - 4.12.0-1 +- New version 4.12.0 + * Tue May 23 2017 Phil Sutter - 4.11.0-1 - Add virtual capability to tc subpackage so it's easier found - New version 4.11.0 diff --git a/sources b/sources index 045e47d..60df61a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.11.0.tar.xz) = e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa +SHA512 (iproute2-4.12.0.tar.xz) = 275147f71e7c4698654f0d6d0981ab42f6f108066508c15cfcd5d9e0d3aaf8d33291968d9f06cb03f5494d801cfabf8d53308aaf56fc4fa92c52b137e970a3b0 From bb3824115154b146434bf957ad4c88e38cedf624 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 13:39:24 +0000 Subject: [PATCH 018/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 44f78d9..4e2efdb 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.12.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -171,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 4.12.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Jul 21 2017 Phil Sutter - 4.12.0-1 - New version 4.12.0 From 480bcfc508bc2da06ee8d26fad644ed60858fa7e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 23:50:34 +0000 Subject: [PATCH 019/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 4e2efdb..eb0ca8e 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.12.0 -Release: 2%{?dist} +Release: 3%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -171,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 4.12.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 4.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From a329ddabba6709feedee0cc6395c84ea71bef949 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 19 Sep 2017 19:56:50 +0200 Subject: [PATCH 020/111] Rebase package on top of iproute2-4.13.0 --- .gitignore | 1 + iproute.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7065a5b..832eb2c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /iproute2-4.10.0.tar.xz /iproute2-4.11.0.tar.xz /iproute2-4.12.0.tar.xz +/iproute2-4.13.0.tar.xz diff --git a/iproute.spec b/iproute.spec index eb0ca8e..bcb274c 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.12.0 -Release: 3%{?dist} +Version: 4.13.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -171,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Sep 19 2017 Phil Sutter - 4.13.0-1 +- New version 4.13.0 + * Wed Aug 02 2017 Fedora Release Engineering - 4.12.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index 60df61a..ba1a9cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.12.0.tar.xz) = 275147f71e7c4698654f0d6d0981ab42f6f108066508c15cfcd5d9e0d3aaf8d33291968d9f06cb03f5494d801cfabf8d53308aaf56fc4fa92c52b137e970a3b0 +SHA512 (iproute2-4.13.0.tar.xz) = f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a From f41cef03d3fd07d596aa847c8559ad2d19c81cb2 Mon Sep 17 00:00:00 2001 From: Mike Gahagan Date: Thu, 28 Sep 2017 13:39:29 -0400 Subject: [PATCH 021/111] initial commit of tests from upstreamfirst project --- tests/bridge-utility/Makefile | 64 ++++++ tests/bridge-utility/PURPOSE | 3 + tests/bridge-utility/runtest.sh | 268 ++++++++++++++++++++++++++ tests/ip-neigh-sanity-test/Makefile | 63 ++++++ tests/ip-neigh-sanity-test/PURPOSE | 3 + tests/ip-neigh-sanity-test/runtest.sh | 234 ++++++++++++++++++++++ tests/ip-rule-sanity-test/Makefile | 63 ++++++ tests/ip-rule-sanity-test/PURPOSE | 3 + tests/ip-rule-sanity-test/runtest.sh | 107 ++++++++++ tests/tests.yml | 15 ++ 10 files changed, 823 insertions(+) create mode 100644 tests/bridge-utility/Makefile create mode 100644 tests/bridge-utility/PURPOSE create mode 100755 tests/bridge-utility/runtest.sh create mode 100644 tests/ip-neigh-sanity-test/Makefile create mode 100644 tests/ip-neigh-sanity-test/PURPOSE create mode 100644 tests/ip-neigh-sanity-test/runtest.sh create mode 100644 tests/ip-rule-sanity-test/Makefile create mode 100644 tests/ip-rule-sanity-test/PURPOSE create mode 100644 tests/ip-rule-sanity-test/runtest.sh create mode 100644 tests/tests.yml diff --git a/tests/bridge-utility/Makefile b/tests/bridge-utility/Makefile new file mode 100644 index 0000000..a7f394f --- /dev/null +++ b/tests/bridge-utility/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/iproute/Sanity/bridge-utility +# Description: Test basic bridge funcionality +# Author: David Spurek +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/iproute/Sanity/bridge-utility +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: David Spurek " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic bridge funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Requires: bridge-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/bridge-utility/PURPOSE b/tests/bridge-utility/PURPOSE new file mode 100644 index 0000000..f3bce23 --- /dev/null +++ b/tests/bridge-utility/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/bridge-utility +Description: Test basic bridge funcionality +Author: David Spurek diff --git a/tests/bridge-utility/runtest.sh b/tests/bridge-utility/runtest.sh new file mode 100755 index 0000000..0d510c3 --- /dev/null +++ b/tests/bridge-utility/runtest.sh @@ -0,0 +1,268 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/iproute/Sanity/bridge-utility +# Description: Test basic bridge funcionality +# Author: David Spurek +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +PACKAGES="$PACKAGE" +rlIsRHEL 6 && PACKAGES=( ${PACKAGES[@]} "bridge-utils" ) +vxlan_name="testvxlan" +bridge_name="testbridge" +lsmod | grep dummy +dummy_loaded=$? + +rlJournalStart + rlPhaseStartSetup + # Check reqiured packages. + for P in ${PACKAGES[@]}; do rlCheckRpm $P || rlDie "Package $P is missing"; done + + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + no_dummy=0 + if [ $dummy_loaded -eq 1 ] ; then + # dummy module doesn't loaded before the test + modprobe dummy numdummies=2 + else + # dummy module loaded before the test, backup number of loaded dummy devices (nmdumies parameter), it is doesn't show under /sys/module/dummy/parameters + dummies_count=`ip a | grep dummy | tail -n 1 | sed -r 's/.*dummy([0-9]+).*/\1/'` + if [ -z $dummies_count] ; then + # dummy module is loaded but no dummy device exists + no_dummy=1 + else + # get correct count, dummy0 is the first + let "dummies_count=$dummies_count+1" + fi + rmmod dummy + modprobe dummy numdummies=2 + fi + rlRun "ip addr flush dev dummy0" + rlRun "ip link set dummy0 up" + rlRun "ip addr flush dev dummy1" + rlRun "ip link set dummy1 up" + rlRun "ip addr add 127.0.0.13/24 dev dummy0" 0 "Setting IPv4 address to +dummy0 interface" + rlRun "ip addr add 127.0.0.14/24 dev dummy1" 0 "Setting IPv4 address to +dummy1 interface" + rlPhaseEnd + + rlPhaseStartTest "Test bridge fdb basic funcionality with vxlan device" + rlRun "ip link add $vxlan_name type vxlan id 10 group 239.0.0.10 ttl 4 dev dummy0" 0 "add vxlan interface" + rlRun "ip addr add 192.168.1.1/24 broadcast 192.168.1.255 dev $vxlan_name" 0 "setting address to vxlan interface" + rlRun "ip -d link show $vxlan_name" 0 "show details about vxlan device" + + vxlan_ether_address=`ip -d link show $vxlan_name | grep link/ether | awk '{print $2}'` + echo "ethernet address of vxlan device is: $vxlan_ether_address" + + # add new entry to bridge fdb database (device must by type vxlan) + rlRun "bridge fdb add $vxlan_ether_address dst 192.19.0.2 dev $vxlan_name" + + # check if entry was successfuly added + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.2" bridge_show.out "-i" + + # try replace entry in bridge fdb database + rlRun "bridge fdb replace $vxlan_ether_address dst 192.19.0.3 dev $vxlan_name" + + # check if entry was successfuly changed + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.3" bridge_show.out "-i" + + rlRun "bridge fdb del $vxlan_ether_address dev $vxlan_name" + + # check if entry was successfuly deleted + # 'default' entry added by ip link command should be still listed + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertNotGrep "$vxlan_ether_address dst 192.19.0.2" bridge_show.out "-i" + rlAssertGrep "dst 239.0.0.10 via dummy0" bridge_show.out "-i" + + # add new entry to bridge fdb database with port,vni and via options + rlRun "bridge fdb add $vxlan_ether_address dst 192.19.0.2 dev $vxlan_name port 10000 vni 100 via dummy0" + # check if entry was successfuly added + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.2 port 10000 vni 100 via dummy0" bridge_show.out "-i" + + rlRun "bridge fdb del $vxlan_ether_address dev $vxlan_name" + + # add new entry to bridge fdb database with self option + rlRun "bridge fdb add $vxlan_ether_address dst 192.19.0.2 dev $vxlan_name self" + # check if entry was successfuly added + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.2 self" bridge_show.out "-i" + + # replace entry in bridge fdb database with temp option + rlRun "bridge fdb replace $vxlan_ether_address dst 192.19.0.2 dev $vxlan_name temp" + # check if entry was successfuly changed + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.2 self static" bridge_show.out "-i" + + # replace entry in bridge fdb database with local option + rlRun "bridge fdb replace $vxlan_ether_address dst 192.19.0.2 dev $vxlan_name local" + # check if entry was successfuly changed + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.2 self permanent" bridge_show.out "-i" + + # replace entry in bridge fdb database with router option + rlRun "bridge fdb replace $vxlan_ether_address dst 192.19.0.2 dev $vxlan_name router" + # check if entry was successfuly changed + bridge fdb show dev $vxlan_name &> bridge_show.out + cat bridge_show.out + rlAssertGrep "$vxlan_ether_address dst 192.19.0.2 self router permanent" bridge_show.out "-i" + + rlRun "bridge fdb del $vxlan_ether_address dev $vxlan_name" + rlRun "ip link del $vxlan_name" 0 + rlPhaseEnd + + rlPhaseStartTest "Test bridge fdb basic funcionality with bridge device, test bridge link set command" + # on rhels < 7 must be bridge device added with brctl (add type bridge is not supported) + rlIsRHEL '>=7' && rlRun "ip link add $bridge_name type bridge" 0 || rlRun "brctl addbr $bridge_name" 0 + + if rlIsRHEL '>=7'; then + rlRun "ip link set dummy0 master $bridge_name" 0 "Add dummy interface to bridge" + rlRun "bridge link show dev dummy0" + # test bridge link set, command is not supported on rhel < 7 (->ndo_bridge_setlink() is not in our kernel.) + + rlRun "bridge link set dev dummy0 cost 10" + rlRun "bridge link show dev dummy0 &> bridge_show.out" 0 + cat bridge_show.out + rlAssertGrep "dummy0.*cost 10 $" bridge_show.out "-i" + + # add new entry to bridge fdb database with self option + rlRun "bridge fdb add 00:1b:21:55:23:61 dev dummy0 self" + bridge fdb show dev dummy0 &> bridge_show.out + cat bridge_show.out + rlAssertGrep "00:1b:21:55:23:61 self" bridge_show.out "-i" + # add new entry to bridge fdb database with master option + rlRun "bridge fdb add 00:1b:21:55:23:62 dev dummy0 master" + bridge fdb show dev dummy0 &> bridge_show.out + cat bridge_show.out + rlAssertGrep "00:1b:21:55:23:62 vlan 1" bridge_show.out "-i" + + # add new entry to bridge fdb database with master and self options (entries for both should be added) + rlRun "bridge fdb add 00:1b:21:55:23:63 dev dummy0 self master" + bridge fdb show dev dummy0 &> bridge_show.out + cat bridge_show.out + rlAssertGrep "00:1b:21:55:23:63 self" bridge_show.out "-i" + rlAssertGrep "00:1b:21:55:23:63 vlan 1" bridge_show.out "-i" + + else + rlRun "brctl addif $bridge_name dummy0" 0 "Add dummy interface to bridge" + rlRun "brctl show $bridge_name" + fi + + rlIsRHEL '>=7' && rlRun "ip link set dummy0 nomaster" 0 "Remove dummy vlan interface from bridge" || rlRun "brctl delif $bridge_name dummy0" 0 "Remove dummy interface from bridge" + + rlIsRHEL '>=7' && rlRun "ip link del $bridge_name" 0 || rlRun "brctl delbr $bridge_name" 0 + rlPhaseEnd + + rlPhaseStartTest "Test bridge vlan basic funcionality" + # on rhels < 7 must be bridge device added with brctl (add type bridge is not supported) + rlIsRHEL '>=7' && rlRun "ip link add $bridge_name type bridge" 0 || rlRun "brctl addbr $bridge_name" 0 + + rlRun "ip link add link dummy0 name dummy0.10 type vlan id 10" + if rlIsRHEL '>=7' ; then + rlRun "ip link set dummy0.10 master $bridge_name" 0 "Add dummy vlan interface to bridge" + rlRun "bridge link show dev dummy0.10" + else + rlRun "brctl addif $bridge_name dummy0.10" 0 "Add dummy vlan interface to bridge" + rlRun "brctl show $bridge_name" + fi + # bridge vlan is not supported on rhel < 6.8 + if rlIsRHEL '>=7' || rlIsRHEL '>=6.8' || rlIsFedora; then + rlRun "bridge vlan add dev dummy0.10 vid 5" 0 + else + rlRun "bridge vlan add dev dummy0.10 vid 5" 2 + fi + + # test correct funcionality only on rhel 7 + if rlIsRHEL '>=7' ; then + bridge vlan &> bridge_vlan.out + cat bridge_vlan.out + #rlAssertGrep "dummy0.10.*5" bridge_vlan.out "-i" + #rlAssertGrep "dummy0.10.*10" bridge_vlan.out "-i" + rlRun "grep -A 2 'dummy0.10' bridge_vlan.out | grep '5'" + + rlRun "bridge vlan del dev dummy0.10 vid 5" + bridge vlan &> bridge_vlan.out + cat bridge_vlan.out + #rlAssertNotGrep "dummy0.10" bridge_vlan.out "-i" + rlRun "grep -A 2 'dummy0.10' bridge_vlan.out | grep '5'" 1 + fi + rlIsRHEL '>=7' && rlRun "ip link set dummy0.10 nomaster" 0 "Remove dummy vlan interface from bridge" || rlRun "brctl delif $bridge_name dummy0.10" 0 "Remove dummy vlan interface from bridge" + + rlRun "ip link del dev dummy0.10" + + rlIsRHEL '>=7' && rlRun "ip link del $bridge_name" 0 || rlRun "brctl delbr $bridge_name" 0 + rlPhaseEnd + + rlPhaseStartTest "Test bridge mdb basic funcionality" + rlRun "bridge mdb show" 0 + rlPhaseEnd + + if rlIsRHEL '>=7'; then + rlPhaseStartTest + rlRun "ip link add test_bridge type bridge" + rlRun "bridge fdb show | grep 'dev test_bridge' | grep 'master test_bridge'" + rlRun "ip link del test_bridge" + rlPhaseEnd + fi + + rlPhaseStartCleanup + rlRun "ip route flush dev dummy0" + rlRun "ip link set dummy0 down" + rlRun "ip addr flush dev dummy0" + rlRun "ip route flush dev dummy1" + rlRun "ip link set dummy1 down" + rlRun "ip addr flush dev dummy1" + if [ $dummy_loaded -eq 1 ] ; then + rmmod dummy + else + rmmod dummy + if [ $no_dummy -eq 1 ] ; then + # load dummy module and delete dummy0 with ip link + modprobe dummy + rlIsRHEL '>=7' && rlRun "ip link del dummy0" + else + modprobe dummy numdummies=$dummies_count + fi + fi + rlRun "service network restart" 0,1 "Restarting network, just for sure" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/ip-neigh-sanity-test/Makefile b/tests/ip-neigh-sanity-test/Makefile new file mode 100644 index 0000000..fdff35f --- /dev/null +++ b/tests/ip-neigh-sanity-test/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/iproute/Sanity/ip-neigh-sanity-test +# Description: Test basic ip neigh functionality +# Author: Jaroslav Aster +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-neigh-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Jaroslav Aster " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip neigh funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-neigh-sanity-test/PURPOSE b/tests/ip-neigh-sanity-test/PURPOSE new file mode 100644 index 0000000..189a8e2 --- /dev/null +++ b/tests/ip-neigh-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-neigh-sanity-test +Description: Test basic ip neigh funcionality +Author: Jaroslav Aster diff --git a/tests/ip-neigh-sanity-test/runtest.sh b/tests/ip-neigh-sanity-test/runtest.sh new file mode 100644 index 0000000..0930b01 --- /dev/null +++ b/tests/ip-neigh-sanity-test/runtest.sh @@ -0,0 +1,234 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/iproute/Sanity/ip-neigh-sanity-test +# Description: Test basic ip neigh funcionality +# Author: Jaroslav Aster +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" +TEST_IFACE="test-iface" +TEST_IP4_PREFIX="192.168.100" +TEST_IP6_PREFIX="2000::" +TEST_MAC_PREFIX="00:c0:7b:7d:00" +rlIsRHEL '>=7' && MAN_PAGE="ip-neighbour" || MAN_PAGE="ip" +MESSAGES="/var/log/messages" +TMP_MESSAGES="$(mktemp)" + + +create_dummy_iface() +{ + rlRun "ip link add name ${TEST_IFACE} type dummy" 0 "Creating dummy interface: '${TEST_IFACE}'." +} + +delete_dummy_iface() +{ + rlRun "ip link del ${TEST_IFACE}" 0 "Removing dummy interface: '${TEST_IFACE}'." + rlRun "rmmod dummy" 0,1 "Removing dummy module." +} + + +rlJournalStart + rlPhaseStartSetup + rlCheckRpm "$PACKAGE" + create_dummy_iface + rlPhaseEnd + + if rlIsRHEL '>=7'; then + rlPhaseStartTest + for word in add del change replace show flush all proxy to dev nud unused permanent reachable probe failed incomplete stale delay noarp none; do + if ! { [ "$word" = "unused" ] || [ "$word" = "all" ]; }; then + rlRun "ip n help 2>&1 | grep -e '[^[:alnum:]]${word}[^[:alnum:]]'" 0 "Checking there is '${word}' in ip neighbour help." + fi + rlRun "man ${MAN_PAGE} | col -b | grep -e '[^[:alnum:]]${word}[^[:alnum:]]'" 0 "Checking there is '${word}' in ${MAN_PAGE} man page." + done + rlPhaseEnd + fi + + rlPhaseStartTest "Functional Test" + rlLogInfo "IPv4" + rlRun "ip neigh add ${TEST_IP4_PREFIX}.1 lladdr ${TEST_MAC_PREFIX}:c6 dev ${TEST_IFACE} nud permanent" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.1 | grep 'PERMANENT'" + + rlRun "ip neigh add ${TEST_IP4_PREFIX}.2 lladdr ${TEST_MAC_PREFIX}:c7 dev ${TEST_IFACE}" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.2 | grep 'PERMANENT'" + + rlRun "ip neigh add ${TEST_IP4_PREFIX}.3 lladdr ${TEST_MAC_PREFIX}:c8 dev ${TEST_IFACE} nud noarp" + rlRun "ip neigh show nud all ${TEST_IP4_PREFIX}.3 | grep 'NOARP'" + + rlRun "ip neigh add ${TEST_IP4_PREFIX}.4 lladdr ${TEST_MAC_PREFIX}:c9 dev ${TEST_IFACE} nud noarp" + rlRun "ip neigh show nud all ${TEST_IP4_PREFIX}.4 | grep 'NOARP'" + + rlRun "ip neigh add lladdr ${TEST_MAC_PREFIX}:ce dev ${TEST_IFACE} proxy ${TEST_IP4_PREFIX}.10" + rlIsRHEL ">=7" && rlRun "ip neigh show proxy | grep ${TEST_IP4_PREFIX}.10" + + rlRun "test $(ip neigh show dev ${TEST_IFACE} | wc -l) -eq 2" 0 "There are two items in neighbours." + + rlRun "ip neigh del ${TEST_IP4_PREFIX}.1 dev ${TEST_IFACE}" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.1 | grep 'FAILED'" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.2 lladdr ${TEST_MAC_PREFIX}:ca dev ${TEST_IFACE} nud reachable" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.2 | grep 'REACHABLE'" + + rlRun "ip neigh replace ${TEST_IP4_PREFIX}.3 lladdr ${TEST_MAC_PREFIX}:cb dev ${TEST_IFACE} nud permanent" + rlRun "ip neigh show nud all ${TEST_IP4_PREFIX}.3 | grep 'PERMANENT'" + + rlRun "test $(ip neigh show dev ${TEST_IFACE} nud permanent | wc -l) -eq 1" 0 "There is one permanent item in neighbours." + rlRun "test $(ip neigh show dev ${TEST_IFACE} nud reachable | wc -l) -eq 1" 0 "There is one reachable item in neighbours." + rlRun "test $(ip neigh show dev ${TEST_IFACE} nud noarp | wc -l) -eq 1" 0 "There is one noarp item in neighbours." + rlRun "test $(ip neigh show dev ${TEST_IFACE} nud failed | wc -l) -eq 1" 0 "There is one failed item in neighbours." + rlIsRHEL ">=7" && rlRun "test $(ip neigh show dev ${TEST_IFACE} proxy | wc -l) -eq 1" 0 "There is one proxy item in neighbours." + rlRun "test $(ip neigh show dev ${TEST_IFACE} | grep -e PERMANENT -e REACHABLE -e FAILED | wc -l) -eq 3" 0 "There are three permanent or reachable or failed items in neighbours." + + rlRun "ip neigh show dev ${TEST_IFACE} unused" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.4 dev ${TEST_IFACE} nud delay" + rlRun "ip neigh flush ${TEST_IP4_PREFIX}.4 dev ${TEST_IFACE}" + rlRun "ip neigh show nud all | grep '${TEST_IP4_PREFIX}.4'" + + rlRun "ip -s neigh flush ${TEST_IP4_PREFIX}.4 dev ${TEST_IFACE}" + rlRun "ip -s -s neigh flush ${TEST_IP4_PREFIX}.4 dev ${TEST_IFACE}" + + rlRun "ip neigh add ${TEST_IP4_PREFIX}.11 lladdr ${TEST_MAC_PREFIX}:c8 dev ${TEST_IFACE} nud permanent" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep 'PERMANENT'" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.11 dev ${TEST_IFACE} nud reachable" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep 'REACHABLE'" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.11 dev ${TEST_IFACE} nud probe" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep 'PROBE'" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.11 lladdr ${TEST_MAC_PREFIX}:c9 dev ${TEST_IFACE} nud failed" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep 'FAILED'" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.11 dev ${TEST_IFACE} nud incomplete" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep 'INCOMPLETE'" + + rlRun "ip neigh replace ${TEST_IP4_PREFIX}.11 lladdr ${TEST_MAC_PREFIX}:cb dev ${TEST_IFACE} nud stale" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep '${TEST_MAC_PREFIX}:cb' | grep 'STALE'" + + rlRun "ip neigh replace ${TEST_IP4_PREFIX}.11 dev ${TEST_IFACE} nud delay" + rlRun "ip neigh show ${TEST_IP4_PREFIX}.11 | grep -e 'DELAY' -e 'PROBE'" + + rlRun "ip neigh replace ${TEST_IP4_PREFIX}.11 dev ${TEST_IFACE} nud noarp" + rlRun "ip neigh show nud all ${TEST_IP4_PREFIX}.11 | grep 'NOARP'" + + rlRun "ip neigh change ${TEST_IP4_PREFIX}.11 dev ${TEST_IFACE} nud none" + rlRun "ip neigh show nud none | grep ${TEST_IP4_PREFIX}.11" + + rlRun "ip neigh show ${TEST_IP4_PREFIX}.0/24" + + rlLogInfo "IPv6" + rlRun "ip -6 neigh add ${TEST_IP6_PREFIX}1 lladdr ${TEST_MAC_PREFIX}:c6 dev ${TEST_IFACE} nud permanent" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}1 | grep 'PERMANENT'" + + rlRun "ip -6 neigh add ${TEST_IP6_PREFIX}2 lladdr ${TEST_MAC_PREFIX}:c7 dev ${TEST_IFACE}" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}2 | grep 'PERMANENT'" + + rlRun "ip -6 neigh add ${TEST_IP6_PREFIX}3 lladdr ${TEST_MAC_PREFIX}:c8 dev ${TEST_IFACE} nud noarp" + rlRun "ip -6 neigh show nud all ${TEST_IP6_PREFIX}3 | grep 'NOARP'" + + rlRun "ip -6 neigh add ${TEST_IP6_PREFIX}4 lladdr ${TEST_MAC_PREFIX}:c9 dev ${TEST_IFACE} nud noarp" + rlRun "ip -6 neigh show nud all ${TEST_IP6_PREFIX}4 | grep 'NOARP'" + + rlRun "ip -6 neigh add lladdr ${TEST_MAC_PREFIX}:ce dev ${TEST_IFACE} proxy ${TEST_IP6_PREFIX}10" + rlIsRHEL ">=7" && rlRun "ip -6 neigh show proxy | grep ${TEST_IP6_PREFIX}10" + + rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} | wc -l) -eq 2" 0 "There are two items in neighbours." + + rlRun "ip -6 neigh del ${TEST_IP6_PREFIX}1 dev ${TEST_IFACE}" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}1 | grep 'FAILED'" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}2 lladdr ${TEST_MAC_PREFIX}:ca dev ${TEST_IFACE} nud reachable" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}2 | grep 'REACHABLE'" + + rlRun "ip -6 neigh replace ${TEST_IP6_PREFIX}3 lladdr ${TEST_MAC_PREFIX}:cb dev ${TEST_IFACE} nud permanent" + rlRun "ip -6 neigh show nud all ${TEST_IP6_PREFIX}3 | grep 'PERMANENT'" + + rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} nud permanent | wc -l) -eq 1" 0 "There is one permanent item in neighbours." + rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} nud reachable | wc -l) -eq 1" 0 "There is one reachable item in neighbours." + rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} nud noarp | wc -l) -eq 1" 0 "There is one noarp item in neighbours." + rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} nud failed | wc -l) -eq 1" 0 "There is one failed item in neighbours." + rlIsRHEL ">=7" && rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} proxy | wc -l) -eq 1" 0 "There is one proxy item in neighbours." + rlRun "test $(ip -6 neigh show dev ${TEST_IFACE} | grep -e PERMANENT -e REACHABLE -e FAILED | wc -l) -eq 3" 0 "There are three permanent or reachable or failed items in neighbours." + + rlRun "ip -6 neigh show dev ${TEST_IFACE} unused" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}4 dev ${TEST_IFACE} nud delay" + rlRun "ip -6 neigh flush ${TEST_IP6_PREFIX}4 dev ${TEST_IFACE}" + rlRun "ip -6 neigh show nud all | grep '${TEST_IP6_PREFIX}4'" + + rlRun "ip -6 -s neigh flush ${TEST_IP6_PREFIX}4 dev ${TEST_IFACE}" + rlRun "ip -6 -s -s neigh flush ${TEST_IP6_PREFIX}4 dev ${TEST_IFACE}" + + rlRun "ip -6 neigh add ${TEST_IP6_PREFIX}11 lladdr ${TEST_MAC_PREFIX}:c8 dev ${TEST_IFACE} nud permanent" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep 'PERMANENT'" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}11 dev ${TEST_IFACE} nud reachable" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep 'REACHABLE'" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}11 dev ${TEST_IFACE} nud probe" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep 'PROBE'" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}11 lladdr ${TEST_MAC_PREFIX}:c9 dev ${TEST_IFACE} nud failed" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep 'FAILED'" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}11 dev ${TEST_IFACE} nud incomplete" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep 'INCOMPLETE'" + + rlRun "ip -6 neigh replace ${TEST_IP6_PREFIX}11 lladdr ${TEST_MAC_PREFIX}:cb dev ${TEST_IFACE} nud stale" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep '${TEST_MAC_PREFIX}:cb' | grep 'STALE'" + + rlRun "ip -6 neigh replace ${TEST_IP6_PREFIX}11 dev ${TEST_IFACE} nud delay" + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}11 | grep -e 'DELAY' -e 'PROBE'" + + rlRun "ip -6 neigh replace ${TEST_IP6_PREFIX}11 dev ${TEST_IFACE} nud noarp" + rlRun "ip -6 neigh show nud all ${TEST_IP6_PREFIX}11 | grep 'NOARP'" + + rlRun "ip -6 neigh change ${TEST_IP6_PREFIX}11 dev ${TEST_IFACE} nud none" + rlRun "ip -6 neigh show nud none | grep ${TEST_IP6_PREFIX}11" + + rlRun "ip -6 neigh show ${TEST_IP6_PREFIX}0/24" + rlPhaseEnd + + rlPhaseStartTest + pushd /tmp # because of coredump file + tail -f -n 0 "$MESSAGES" > "$TMP_MESSAGES" & + tail_pid="$!" + rlRun "ip neigh add ${TEST_IP4_PREFIX}.11 lladdr ${TEST_MAC_PREFIX}:c16 dev ${TEST_IFACE} nud permanent" 1,255 + kill "$tail_pid" + rlRun "grep -i -e 'segfault' -e 'unhandled signal' -e 'User process fault' ${TMP_MESSAGES}" 1 "Checking there is no segfault in /var/log/messages." + popd + rlPhaseEnd + + rlPhaseStartCleanup + delete_dummy_iface + rlRun "rm ${TMP_MESSAGES}" 0 "Removing tmp files and dirs." + rlPhaseEnd + + rlJournalPrintText +rlJournalEnd diff --git a/tests/ip-rule-sanity-test/Makefile b/tests/ip-rule-sanity-test/Makefile new file mode 100644 index 0000000..13181bc --- /dev/null +++ b/tests/ip-rule-sanity-test/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/iproute/Sanity/ip-rule-sanity-test +# Description: Test basic ip rule functionality +# Author: Jaroslav Aster +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-rule-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Jaroslav Aster " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip rule funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-rule-sanity-test/PURPOSE b/tests/ip-rule-sanity-test/PURPOSE new file mode 100644 index 0000000..ecffb48 --- /dev/null +++ b/tests/ip-rule-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-rule-sanity-test +Description: Test basic ip rule funcionality +Author: Jaroslav Aster diff --git a/tests/ip-rule-sanity-test/runtest.sh b/tests/ip-rule-sanity-test/runtest.sh new file mode 100644 index 0000000..d094b20 --- /dev/null +++ b/tests/ip-rule-sanity-test/runtest.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/iproute/Sanity/ip-rule-sanity-test +# Description: Test basic ip rule funcionality +# Author: Jaroslav Aster +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" +DEFAULT_IFACE="$(ip route show | grep default | sed 's/.*dev \([^ ]\+\) .*/\1/' | head -n 1)" +rlIsRHEL '>=7' && IP_RULE_MANPAGE="ip-rule" || IP_RULE_MANPAGE="ip" + + +rlJournalStart + rlPhaseStartSetup + rlCheckRpm "$PACKAGE" + rlPhaseEnd + + rlPhaseStartTest "Basic sanity test" + rlRun "ip rule list" + + rlRun "ip rule add from 172.29.0.0/24 to 172.29.1.0/24 table 1110" + rlRun "ip rule add not from 172.29.0.0/24 to 172.29.1.0/24 table 1111" + rlRun "ip -6 rule add from 2404:6800:4003:801::1015/32 to 2404:6800:4003:801::1014/32 table 1111" + rlIsRHEL '>=7' && rlRun "ip rule add oif ${DEFAULT_IFACE} table 1111" + rlRun "ip rule add iif ${DEFAULT_IFACE} tos 10 table 1112" + rlRun "ip rule add fwmark 123 pref 100 table 1112" + rlRun "ip rule add not fwmark 124 pref 101 unreachable" + rlRun "ip rule add fwmark 125 pref 102 prohibit" + rlRun "ip rule add fwmark 126 pref 103 unicast" + rlRun "ip rule add from 172.29.2.0/24 tos 10 blackhole" + rlRun "ip rule add from 172.29.0.0/24 tos 6 prio 99 goto 103" + + rlRun "ip rule list" + + rlRun "ip rule list | grep 'from 172.29.0.0/24 to 172.29.1.0/24'" + rlRun "ip rule list | grep 'not from 172.29.0.0/24 to 172.29.1.0/24'" + rlRun "ip -6 rule list | grep 'from 2404:6800:4003:801::1015/32 to 2404:6800:4003:801::1014/32'" + rlIsRHEL '>=7' && rlRun "ip rule list | grep 'oif ${DEFAULT_IFACE}'" + ! rlIsFedora && rlRun "ip rule list | grep 'tos lowdelay iif ${DEFAULT_IFACE}'" + rlRun "ip rule list | grep 'from all fwmark 0x7b'" + rlRun "ip rule list | grep 'not from all fwmark 0x7c unreachable'" + rlRun "ip rule list | grep 'from all fwmark 0x7d prohibit'" + rlRun "ip rule list | grep 'from all fwmark 0x7e'" + ! rlIsFedora && rlRun "ip rule list | grep 'from 172.29.2.0/24 tos lowdelay blackhole'" + rlRun "ip rule list | grep 'from 172.29.0.0/24 tos 0x06 goto 103'" + + rlRun "ip rule list" + + rlRun "ip rule del from 172.29.0.0/24 to 172.29.1.0/24" + rlRun "ip rule del not from 172.29.0.0/24 to 172.29.1.0/24" + rlRun "ip -6 rule del from 2404:6800:4003:801::1015/32 to 2404:6800:4003:801::1014/32" + rlIsRHEL '>=7' && rlRun "ip rule del oif ${DEFAULT_IFACE}" + ! rlIsFedora && rlRun "ip rule del iif ${DEFAULT_IFACE} tos lowdelay" + rlRun "ip rule del fwmark 123 pref 100" + rlRun "ip rule del not fwmark 124 pref 101 unreachable" + rlRun "ip rule del fwmark 125 pref 102 prohibit" + rlRun "ip rule del fwmark 126 pref 103 unicast" + rlRun "ip rule del from 172.29.2.0/24 tos 10 blackhole" + rlRun "ip rule del from 172.29.0.0/24 tos 6 prio 99 goto 103" + + rlRun "ip rule list" + rlPhaseEnd + + if rlIsRHEL '>=7'; then + rlPhaseStartTest + saved_rule=$(ip rule list | grep '^0' | cut -d : -f 2 | head -n 1) + rlRun "ip rule del prio 0" 0 "Removing rule with prio 0." + rlRun "ip rule add prio 0 ${saved_rule}" 0 "Re-creating rule with prio 0." + rlRun "man ${IP_RULE_MANPAGE} | col -b | grep 'Rule 0 is special. It cannot be deleted or overridden.'" 1 + rlPhaseEnd + fi + + rlPhaseStartTest + rlRun "man ${IP_RULE_MANPAGE} | col -b | grep 'reject'" 1 + rlRun "ip rule help 2>&1 | grep 'reject'" 1 + rlPhaseEnd + + rlPhaseStartCleanup + rlPhaseEnd + + rlJournalPrintText +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..9231de6 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,15 @@ +--- +# Tests that run in all contexts +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + - atomic + tests: + - ip-neigh-sanity-test + - ip-rule-sanity-test + - bridge-utility + required_packages: + - iproute + - bridge-utils From e4fcc0347f72d52a6fd6c48c50ac09f652d15041 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Nov 2017 14:56:50 +0100 Subject: [PATCH 022/111] Rebase package on top of iproute2-4.14.1 --- .gitignore | 1 + iproute.spec | 9 ++++----- sources | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 832eb2c..320a98c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /iproute2-4.11.0.tar.xz /iproute2-4.12.0.tar.xz /iproute2-4.13.0.tar.xz +/iproute2-4.14.1.tar.xz diff --git a/iproute.spec b/iproute.spec index bcb274c..414176b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.13.0 +Version: 4.14.1 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -90,9 +90,6 @@ export LIBDIR=/%{_libdir} export IPT_LIB_DIR=/%{_lib}/xtables ./configure make %{?_smp_mflags} -%if ! 0%{?_module_build} -make -C doc -%endif %install export DESTDIR='%{buildroot}' @@ -158,7 +155,6 @@ rm -rf '%{buildroot}%{_docdir}' %files doc %{!?_licensedir:%global license %%doc} %license COPYING -%doc doc/*.ps %doc examples %endif @@ -171,6 +167,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Nov 15 2017 Phil Sutter - 4.14.1-1 +- New version 4.14.1 + * Tue Sep 19 2017 Phil Sutter - 4.13.0-1 - New version 4.13.0 diff --git a/sources b/sources index ba1a9cc..4c14c03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.13.0.tar.xz) = f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a +SHA512 (iproute2-4.14.1.tar.xz) = e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c From 73be52ab687b39a1543ee634e87161960b9bf228 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Nov 2017 15:30:14 +0100 Subject: [PATCH 023/111] Drop unused build dependencies --- iproute.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/iproute.spec b/iproute.spec index 414176b..def2bfd 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.14.1 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -26,13 +26,6 @@ BuildRequires: libmnl-devel BuildRequires: libselinux-devel BuildRequires: pkgconfig %if ! 0%{?_module_build} -BuildRequires: linuxdoc-tools -BuildRequires: psutils -BuildRequires: tex(cm-super-t1.enc) -BuildRequires: tex(dvips) -BuildRequires: tex(ecrm1000.tfm) -BuildRequires: tex(latex) -BuildRequires: tex(fullpage.sty) %if 0%{?fedora} BuildRequires: linux-atm-libs-devel %endif @@ -167,6 +160,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Nov 15 2017 Phil Sutter - 4.14.1-2 +- Drop unused build dependencies + * Wed Nov 15 2017 Phil Sutter - 4.14.1-1 - New version 4.14.1 From 314af1dda2b64c3f9b83e1e901daa206ee736a45 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 11 Dec 2017 17:12:56 +0100 Subject: [PATCH 024/111] iproute-4.14.1-3 - Add upstream suggested backports. - Make use of %%autosetup macro. --- 0001-Documentation-fixes.patch | 12 ++++++------ iproute.spec | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/0001-Documentation-fixes.patch b/0001-Documentation-fixes.patch index 3269037..c3a9185 100644 --- a/0001-Documentation-fixes.patch +++ b/0001-Documentation-fixes.patch @@ -1,4 +1,4 @@ -From 2332a21bd43ca69ad38a30109881867b9c5c2ea0 Mon Sep 17 00:00:00 2001 +From 34f2e1640c6d6a051116478011eb58f995a24076 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 17 Mar 2017 22:47:27 +0100 Subject: [PATCH] Documentation fixes @@ -11,16 +11,16 @@ Subject: [PATCH] Documentation fixes diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 new file mode 100644 -index 00000000..bef35201 +index 0000000000000..bef35201f4eab --- /dev/null +++ b/man/man8/cbq.8 @@ -0,0 +1 @@ +.so man8/tc-cbq.8 diff --git a/man/man8/ss.8 b/man/man8/ss.8 -index 4ef11523..3898bdbd 100644 +index 8565ccb4814aa..5a85bee6a4b7a 100644 --- a/man/man8/ss.8 +++ b/man/man8/ss.8 -@@ -142,7 +142,7 @@ Read filter information from FILE. +@@ -319,7 +319,7 @@ Read filter information from FILE. Each line of FILE is interpreted like single command line option. If FILE is - stdin is used. .TP .B FILTER := [ state STATE-FILTER ] [ EXPRESSION ] @@ -29,7 +29,7 @@ index 4ef11523..3898bdbd 100644 .SH STATE-FILTER -@@ -197,7 +197,7 @@ Find all local processes connected to X server. +@@ -374,7 +374,7 @@ Find all local processes connected to X server. List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers. .SH SEE ALSO .BR ip (8), @@ -39,5 +39,5 @@ index 4ef11523..3898bdbd 100644 .BR RFC " 793 " - https://tools.ietf.org/rfc/rfc793.txt (TCP states) -- -2.11.0 +2.13.1 diff --git a/iproute.spec b/iproute.spec index def2bfd..1746357 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.14.1 -Release: 2%{?dist} +Release: 3%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -15,6 +15,14 @@ Source2: avpkt # - Drop reference to Debian from ss.8 man page. # - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch +# Suggested backports by Fixes: tag. +Patch2: 0002-tc-move-action-cookie-print-out-of-the-stats-if.patch +Patch3: 0003-tc-remove-action-cookie-len-from-printout.patch +Patch4: 0004-link_gre6-Detect-invalid-encaplimit-values.patch +Patch5: 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch +Patch6: 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch +Patch7: 0007-ss-remove-duplicate-assignment.patch +Patch8: 0008-tc-bash-completion-add-missing-classid-keyword.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -74,8 +82,7 @@ Provides: iproute-static = %{version}-%{release} The libnetlink static library. %prep -%setup -q -n %{name}2-%{version} -%patch1 -p1 +%autosetup -p1 -n %{name}2-%{version} %build export CFLAGS="%{optflags}" @@ -160,6 +167,10 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Mon Dec 11 2017 Phil Sutter - 4.14.1-3 +- Add upstream suggested backports. +- Make use of %%autosetup macro. + * Wed Nov 15 2017 Phil Sutter - 4.14.1-2 - Drop unused build dependencies From c35ca473097203298a4a132a51edcec5145084de Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 11 Dec 2017 17:42:14 +0100 Subject: [PATCH 025/111] Add missing patch files --- ...ion-cookie-print-out-of-the-stats-if.patch | 50 ++++ ...move-action-cookie-len-from-printout.patch | 31 +++ ...re6-Detect-invalid-encaplimit-values.patch | 31 +++ ...x-inconsistency-in-example-descripti.patch | 34 +++ ...ll-NEXT_ARG_FWD-in-__parse_action_co.patch | 224 ++++++++++++++++++ 0007-ss-remove-duplicate-assignment.patch | 33 +++ ...mpletion-add-missing-classid-keyword.patch | 31 +++ iproute.spec | 5 +- 8 files changed, 438 insertions(+), 1 deletion(-) create mode 100644 0002-tc-move-action-cookie-print-out-of-the-stats-if.patch create mode 100644 0003-tc-remove-action-cookie-len-from-printout.patch create mode 100644 0004-link_gre6-Detect-invalid-encaplimit-values.patch create mode 100644 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch create mode 100644 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch create mode 100644 0007-ss-remove-duplicate-assignment.patch create mode 100644 0008-tc-bash-completion-add-missing-classid-keyword.patch diff --git a/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch b/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch new file mode 100644 index 0000000..28c78a3 --- /dev/null +++ b/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch @@ -0,0 +1,50 @@ +From 06ed8e1fc690683fb1226a23548c81b7032fe7fe Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Sat, 25 Nov 2017 11:07:56 +0100 +Subject: [PATCH] tc: move action cookie print out of the stats if + +Cookie print was made dependent on show_stats for no good reason. Fix +this bu pushing cookie print ot of the stats if. + +Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") +Signed-off-by: Jiri Pirko +(cherry picked from commit abff45b8026e24dedfe05376d8fedc1a8fe43402) +--- + tc/m_action.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/tc/m_action.c b/tc/m_action.c +index 402228bbf833d..704708f70aaac 100644 +--- a/tc/m_action.c ++++ b/tc/m_action.c +@@ -302,19 +302,18 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg) + return err; + + if (show_stats && tb[TCA_ACT_STATS]) { +- + fprintf(f, "\tAction statistics:\n"); + print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL); +- if (tb[TCA_ACT_COOKIE]) { +- int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); +- char b1[strsz * 2 + 1]; +- +- fprintf(f, "\n\tcookie len %d %s ", strsz, +- hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), +- strsz, b1, sizeof(b1))); +- } + fprintf(f, "\n"); + } ++ if (tb[TCA_ACT_COOKIE]) { ++ int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); ++ char b1[strsz * 2 + 1]; ++ ++ fprintf(f, "\tcookie len %d %s\n", strsz, ++ hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), ++ strsz, b1, sizeof(b1))); ++ } + + return 0; + } +-- +2.13.1 + diff --git a/0003-tc-remove-action-cookie-len-from-printout.patch b/0003-tc-remove-action-cookie-len-from-printout.patch new file mode 100644 index 0000000..7ef2fcb --- /dev/null +++ b/0003-tc-remove-action-cookie-len-from-printout.patch @@ -0,0 +1,31 @@ +From 903d2bee8c6f156790758f7e9131490b70475ecd Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Sat, 25 Nov 2017 11:07:57 +0100 +Subject: [PATCH] tc: remove action cookie len from printout + +Make the output same as input and avoid printout of unnecessary len. + +Suggested-by: Stephen Hemminger +Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") +Signed-off-by: Jiri Pirko +(cherry picked from commit 81051c60c24ad083cfcb46271e6450675763c722) +--- + tc/m_action.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tc/m_action.c b/tc/m_action.c +index 704708f70aaac..951ca973f4806 100644 +--- a/tc/m_action.c ++++ b/tc/m_action.c +@@ -310,7 +310,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg) + int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); + char b1[strsz * 2 + 1]; + +- fprintf(f, "\tcookie len %d %s\n", strsz, ++ fprintf(f, "\tcookie %s\n", + hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), + strsz, b1, sizeof(b1))); + } +-- +2.13.1 + diff --git a/0004-link_gre6-Detect-invalid-encaplimit-values.patch b/0004-link_gre6-Detect-invalid-encaplimit-values.patch new file mode 100644 index 0000000..af51d99 --- /dev/null +++ b/0004-link_gre6-Detect-invalid-encaplimit-values.patch @@ -0,0 +1,31 @@ +From 6ecadd9b426bb05c31ec92c01e5352ac05d4e676 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Tue, 28 Nov 2017 16:49:58 +0100 +Subject: [PATCH] link_gre6: Detect invalid encaplimit values + +Looks like a typo: get_u8() returns 0 on success and -1 on error, so the +error checking here was ineffective. + +Fixes: a11b7b71a6eba ("link_gre6: really support encaplimit option") +Signed-off-by: Phil Sutter +(cherry picked from commit 56708ae7c9535859223c5b68097b35bf0fae677c) +--- + ip/link_gre6.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ip/link_gre6.c b/ip/link_gre6.c +index 7d07932a60f01..06dcd6756ec41 100644 +--- a/ip/link_gre6.c ++++ b/ip/link_gre6.c +@@ -364,7 +364,7 @@ get_failed: + } else { + __u8 uval; + +- if (get_u8(&uval, *argv, 0) < -1) ++ if (get_u8(&uval, *argv, 0)) + invarg("invalid ELIM", *argv); + encap_limit = uval; + flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT; +-- +2.13.1 + diff --git a/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch b/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch new file mode 100644 index 0000000..3a7a7ce --- /dev/null +++ b/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch @@ -0,0 +1,34 @@ +From 04475ab5abc836d24b88622bca50af452be65920 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Wed, 29 Nov 2017 18:34:09 +0100 +Subject: [PATCH] man: tc-csum.8: Fix inconsistency in example description + +Commit 6bbe5e6290db5 ("man: tc-csum.8: Fix example") changed both source +and destination IP addresses in example code but missed to update the +example's description accordingly. + +Fixes: 6bbe5e6290db5 ("man: tc-csum.8: Fix example") +Signed-off-by: Phil Sutter +(cherry picked from commit 6bf156415a588fa1c975be9a18a1579f63a936a2) +--- + man/man8/tc-csum.8 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/man/man8/tc-csum.8 b/man/man8/tc-csum.8 +index 409ab71791cce..65724b88d0b68 100644 +--- a/man/man8/tc-csum.8 ++++ b/man/man8/tc-csum.8 +@@ -53,8 +53,8 @@ SCTP header + .B SWEETS + These are merely syntactic sugar and ignored internally. + .SH EXAMPLES +-The following performs stateless NAT for incoming packets from 192.168.1.100 to +-new destination 18.52.86.120 (0x12345678 in hex). Assuming these are UDP ++The following performs stateless NAT for incoming packets from 192.0.2.100 to ++new destination 198.51.100.1. Assuming these are UDP + packets, both IP and UDP checksums have to be recalculated: + + .RS +-- +2.13.1 + diff --git a/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch b/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch new file mode 100644 index 0000000..518108f --- /dev/null +++ b/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch @@ -0,0 +1,224 @@ +From 03ce79e357f3afefe8d1409a98b5ae03c611d611 Mon Sep 17 00:00:00 2001 +From: Michal Privoznik +Date: Fri, 8 Dec 2017 11:18:07 +0100 +Subject: [PATCH] tc: util: Don't call NEXT_ARG_FWD() in + __parse_action_control() + +Not all callers want parse_action_control*() to advance the +arguments. For instance act_parse_police() does the argument +advancing itself. + +Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") +Signed-off-by: Michal Privoznik +(cherry picked from commit 3572e01a090a298e2f4c4f796bad6639b652e031) +--- + tc/m_bpf.c | 1 + + tc/m_connmark.c | 1 + + tc/m_csum.c | 1 + + tc/m_gact.c | 10 +++++----- + tc/m_ife.c | 1 + + tc/m_mirred.c | 4 +++- + tc/m_nat.c | 1 + + tc/m_pedit.c | 1 + + tc/m_sample.c | 1 + + tc/m_skbedit.c | 1 + + tc/m_skbmod.c | 1 + + tc/m_tunnel_key.c | 1 + + tc/m_vlan.c | 1 + + tc/tc_util.c | 1 - + 14 files changed, 19 insertions(+), 7 deletions(-) + +diff --git a/tc/m_bpf.c b/tc/m_bpf.c +index e3d0a2b118384..8b091a72951c3 100644 +--- a/tc/m_bpf.c ++++ b/tc/m_bpf.c +@@ -125,6 +125,7 @@ opt_bpf: + + parse_action_control_dflt(&argc, &argv, &parm.action, + false, TC_ACT_PIPE); ++ NEXT_ARG_FWD(); + + if (argc) { + if (matches(*argv, "index") == 0) { +diff --git a/tc/m_connmark.c b/tc/m_connmark.c +index 37d7185415490..47c7a8c2b17e7 100644 +--- a/tc/m_connmark.c ++++ b/tc/m_connmark.c +@@ -82,6 +82,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, + } + + parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_PIPE); ++ NEXT_ARG_FWD(); + + if (argc) { + if (matches(*argv, "index") == 0) { +diff --git a/tc/m_csum.c b/tc/m_csum.c +index 7b156734f64c5..e1352c0820f69 100644 +--- a/tc/m_csum.c ++++ b/tc/m_csum.c +@@ -124,6 +124,7 @@ parse_csum(struct action_util *a, int *argc_p, + } + + parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); ++ NEXT_ARG_FWD(); + + if (argc) { + if (matches(*argv, "index") == 0) { +diff --git a/tc/m_gact.c b/tc/m_gact.c +index 38949e903be36..7ea2d431f89f9 100644 +--- a/tc/m_gact.c ++++ b/tc/m_gact.c +@@ -88,14 +88,13 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, + if (argc < 0) + return -1; + +- +- if (matches(*argv, "gact") == 0) { +- argc--; +- argv++; +- } else if (parse_action_control(&argc, &argv, &p.action, false) == -1) { ++ if (matches(*argv, "gact") != 0 && ++ parse_action_control(&argc, &argv, &p.action, false) == -1) { + usage(); /* does not return */ + } + ++ NEXT_ARG_FWD(); ++ + #ifdef CONFIG_GACT_PROB + if (argc > 0) { + if (matches(*argv, "random") == 0) { +@@ -115,6 +114,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, + if (parse_action_control(&argc, &argv, + &pp.paction, false) == -1) + usage(); ++ NEXT_ARG_FWD(); + if (get_u16(&pp.pval, *argv, 10)) { + fprintf(stderr, "Illegal probability val 0x%x\n", pp.pval); + return -1; +diff --git a/tc/m_ife.c b/tc/m_ife.c +index 8d0fd31fb9440..34b8e03e7e589 100644 +--- a/tc/m_ife.c ++++ b/tc/m_ife.c +@@ -160,6 +160,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p, + + parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_mirred.c b/tc/m_mirred.c +index 2384bda1ff045..b09b016c2ca39 100644 +--- a/tc/m_mirred.c ++++ b/tc/m_mirred.c +@@ -170,8 +170,10 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p, + } + + +- if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) ++ if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) { + parse_action_control(&argc, &argv, &p.action, false); ++ NEXT_ARG_FWD(); ++ } + + if (argc) { + if (iok && matches(*argv, "index") == 0) { +diff --git a/tc/m_nat.c b/tc/m_nat.c +index 31b68fb6bd784..bb455f080b3a4 100644 +--- a/tc/m_nat.c ++++ b/tc/m_nat.c +@@ -117,6 +117,7 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct + + parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_pedit.c b/tc/m_pedit.c +index 5d89ab1d832ab..3391be95da38c 100644 +--- a/tc/m_pedit.c ++++ b/tc/m_pedit.c +@@ -673,6 +673,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, + + parse_action_control_dflt(&argc, &argv, &sel.sel.action, false, TC_ACT_OK); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_sample.c b/tc/m_sample.c +index ff5ee6bd1ef63..31774c0e806b4 100644 +--- a/tc/m_sample.c ++++ b/tc/m_sample.c +@@ -100,6 +100,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p, + + parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c +index aa374fcb33ed9..c41a7bb082dad 100644 +--- a/tc/m_skbedit.c ++++ b/tc/m_skbedit.c +@@ -123,6 +123,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, + parse_action_control_dflt(&argc, &argv, &sel.action, + false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c +index ba79308ba8354..00318d42642a5 100644 +--- a/tc/m_skbmod.c ++++ b/tc/m_skbmod.c +@@ -125,6 +125,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p, + + parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c +index 1cdd03560c357..2dc91879c2375 100644 +--- a/tc/m_tunnel_key.c ++++ b/tc/m_tunnel_key.c +@@ -175,6 +175,7 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p, + parse_action_control_dflt(&argc, &argv, &parm.action, + false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_vlan.c b/tc/m_vlan.c +index cccb4996b05f3..0b2966ce82e53 100644 +--- a/tc/m_vlan.c ++++ b/tc/m_vlan.c +@@ -137,6 +137,7 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p, + parse_action_control_dflt(&argc, &argv, &parm.action, + false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/tc_util.c b/tc/tc_util.c +index b39e5508235ed..173097d2c28a0 100644 +--- a/tc/tc_util.c ++++ b/tc/tc_util.c +@@ -524,7 +524,6 @@ static int __parse_action_control(int *argc_p, char ***argv_p, int *result_p, + } + result |= jump_cnt; + } +- NEXT_ARG_FWD(); + *argc_p = argc; + *argv_p = argv; + *result_p = result; +-- +2.13.1 + diff --git a/0007-ss-remove-duplicate-assignment.patch b/0007-ss-remove-duplicate-assignment.patch new file mode 100644 index 0000000..4388296 --- /dev/null +++ b/0007-ss-remove-duplicate-assignment.patch @@ -0,0 +1,33 @@ +From 79a9bf3743acb9ebaa22e6f8eaa5a817172cca78 Mon Sep 17 00:00:00 2001 +From: Roman Mashak +Date: Mon, 11 Dec 2017 16:24:31 -0500 +Subject: [PATCH] ss: remove duplicate assignment + +Fixes: 8250bc9ff4e5 ("ss: Unify inet sockets output") +Signed-off-by: Roman Mashak +Signed-off-by: Stephen Hemminger +(cherry picked from commit 9f1a9ae88862f0e5b1beef4bef582be0d8edf3d9) + +Conflicts: + misc/ss.c +-> Context changed due to missing commit 00ac78d39c29f + ("ss: print tcpi_rcv_ssthresh"). +--- + misc/ss.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/misc/ss.c b/misc/ss.c +index 45a0c330ec55f..cc1b930a19bcb 100644 +--- a/misc/ss.c ++++ b/misc/ss.c +@@ -2227,7 +2227,6 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, + s.sacked = info->tcpi_sacked; + s.fackets = info->tcpi_fackets; + s.reordering = info->tcpi_reordering; +- s.rcv_space = info->tcpi_rcv_space; + s.cwnd = info->tcpi_snd_cwnd; + + if (info->tcpi_snd_ssthresh < 0xFFFF) +-- +2.13.1 + diff --git a/0008-tc-bash-completion-add-missing-classid-keyword.patch b/0008-tc-bash-completion-add-missing-classid-keyword.patch new file mode 100644 index 0000000..d3bbec1 --- /dev/null +++ b/0008-tc-bash-completion-add-missing-classid-keyword.patch @@ -0,0 +1,31 @@ +From 1ac0ee2bae7fc79d7be922832de67f9df68f635f Mon Sep 17 00:00:00 2001 +From: Davide Caratti +Date: Tue, 12 Dec 2017 16:45:15 +0100 +Subject: [PATCH] tc: bash-completion: add missing 'classid' keyword + +users of 'matchall' filter can specify a value for the class id: update +bash-completion accordingly. + +Fixes: b32c0b64fa2b ("tc: bash-completion: Add support for matchall") +Signed-off-by: Davide Caratti +(cherry picked from commit 88b428f03f7c1fa64331105f54d42806cece77be) +--- + bash-completion/tc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bash-completion/tc b/bash-completion/tc +index 80d12972c8f3c..29bca5d9354d3 100644 +--- a/bash-completion/tc ++++ b/bash-completion/tc +@@ -450,7 +450,7 @@ _tc_filter_options() + return 0 + ;; + matchall) +- _tc_once_attr 'action skip_sw skip_hw' ++ _tc_once_attr 'action classid skip_sw skip_hw' + return 0 + ;; + flower) +-- +2.13.1 + diff --git a/iproute.spec b/iproute.spec index 1746357..67657e9 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.14.1 -Release: 3%{?dist} +Release: 4%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -167,6 +167,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Mon Dec 11 2017 Phil Sutter - 4.14.1-4 +- Add missing patch files. + * Mon Dec 11 2017 Phil Sutter - 4.14.1-3 - Add upstream suggested backports. - Make use of %%autosetup macro. From b38c2a515484cc860ed0276d15954085a57ed877 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 17:36:19 +0000 Subject: [PATCH 026/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 67657e9..e294334 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.14.1 -Release: 4%{?dist} +Release: 5%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -167,6 +167,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 4.14.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Dec 11 2017 Phil Sutter - 4.14.1-4 - Add missing patch files. From a5ae4db5d351ea241699da7561f0c6dbac54218b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 9 Feb 2018 11:06:00 +0100 Subject: [PATCH 027/111] Use LDFLAGS defaults from redhat-rpm-config --- iproute.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index e294334..1d02701 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.14.1 -Release: 5%{?dist} +Release: 6%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -86,6 +86,7 @@ The libnetlink static library. %build export CFLAGS="%{optflags}" +export LDFLAGS="%{build_ldflags}" export LIBDIR=/%{_libdir} export IPT_LIB_DIR=/%{_lib}/xtables ./configure @@ -167,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Feb 9 2018 Florian Weimer - 4.14.1-6 +- Use LDFLAGS defaults from redhat-rpm-config + * Wed Feb 07 2018 Fedora Release Engineering - 4.14.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 56a5d45dbbf643a385202781f0b9858ef2adca48 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 9 Feb 2018 18:18:26 +0100 Subject: [PATCH 028/111] Rebase package on top of iproute2-4.15.0 --- .gitignore | 1 + 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch | 21 ++ 0001-Documentation-fixes.patch | 43 ---- ...Reduce-scope-of-_dev_map_lookup-call.patch | 46 ++++ ...rrect-type-when-calling-flower_icmp_.patch | 38 --- ...ion-cookie-print-out-of-the-stats-if.patch | 50 ---- ...t-for-valid-type-in-bpf_get_work_dir.patch | 38 --- ...tect-dev_map_lookup-from-wrong-input.patch | 35 +++ ...move-action-cookie-len-from-printout.patch | 31 --- ...re6-Detect-invalid-encaplimit-values.patch | 31 --- 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch | 32 +++ ...x-inconsistency-in-example-descripti.patch | 34 --- ...port-index-exists-before-operate-on-.patch | 35 +++ ...ma-Check-return-value-of-strdup-call.patch | 32 +++ ...ll-NEXT_ARG_FWD-in-__parse_action_co.patch | 224 ------------------ 0007-ss-remove-duplicate-assignment.patch | 33 --- ...mpletion-add-missing-classid-keyword.patch | 31 --- iproute.spec | 23 +- sources | 2 +- 19 files changed, 214 insertions(+), 566 deletions(-) create mode 100644 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch delete mode 100644 0001-Documentation-fixes.patch create mode 100644 0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch delete mode 100644 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch delete mode 100644 0002-tc-move-action-cookie-print-out-of-the-stats-if.patch delete mode 100644 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch create mode 100644 0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch delete mode 100644 0003-tc-remove-action-cookie-len-from-printout.patch delete mode 100644 0004-link_gre6-Detect-invalid-encaplimit-values.patch create mode 100644 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch delete mode 100644 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch create mode 100644 0005-rdma-Check-that-port-index-exists-before-operate-on-.patch create mode 100644 0006-rdma-Check-return-value-of-strdup-call.patch delete mode 100644 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch delete mode 100644 0007-ss-remove-duplicate-assignment.patch delete mode 100644 0008-tc-bash-completion-add-missing-classid-keyword.patch diff --git a/.gitignore b/.gitignore index 320a98c..7380701 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /iproute2-4.12.0.tar.xz /iproute2-4.13.0.tar.xz /iproute2-4.14.1.tar.xz +/iproute2-4.15.0.tar.xz diff --git a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch new file mode 100644 index 0000000..998d9fa --- /dev/null +++ b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch @@ -0,0 +1,21 @@ +From 2d6460e474e96c4ee474fc7b5b55ab04eeac4984 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 17 Mar 2017 22:47:27 +0100 +Subject: [PATCH 1/6] Add cbq.8 as an alias to tc-cbq.8 + +Signed-off-by: Phil Sutter +--- + man/man8/cbq.8 | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 man/man8/cbq.8 + +diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 +new file mode 100644 +index 0000000000000..bef35201f4eab +--- /dev/null ++++ b/man/man8/cbq.8 +@@ -0,0 +1 @@ ++.so man8/tc-cbq.8 +-- +2.15.1 + diff --git a/0001-Documentation-fixes.patch b/0001-Documentation-fixes.patch deleted file mode 100644 index c3a9185..0000000 --- a/0001-Documentation-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 34f2e1640c6d6a051116478011eb58f995a24076 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Fri, 17 Mar 2017 22:47:27 +0100 -Subject: [PATCH] Documentation fixes - ---- - man/man8/cbq.8 | 1 + - man/man8/ss.8 | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - create mode 100644 man/man8/cbq.8 - -diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 -new file mode 100644 -index 0000000000000..bef35201f4eab ---- /dev/null -+++ b/man/man8/cbq.8 -@@ -0,0 +1 @@ -+.so man8/tc-cbq.8 -diff --git a/man/man8/ss.8 b/man/man8/ss.8 -index 8565ccb4814aa..5a85bee6a4b7a 100644 ---- a/man/man8/ss.8 -+++ b/man/man8/ss.8 -@@ -319,7 +319,7 @@ Read filter information from FILE. - Each line of FILE is interpreted like single command line option. If FILE is - stdin is used. - .TP - .B FILTER := [ state STATE-FILTER ] [ EXPRESSION ] --Please take a look at the official documentation (Debian package iproute-doc) for details regarding filters. -+Please take a look at the official documentation (package iproute\-doc) for details regarding filters. - - .SH STATE-FILTER - -@@ -374,7 +374,7 @@ Find all local processes connected to X server. - List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers. - .SH SEE ALSO - .BR ip (8), --.BR /usr/share/doc/iproute-doc/ss.html " (package iproutedoc)", -+.BR /usr/share/doc/iproute-doc/ss.ps " (package iproute\-doc)", - .br - .BR RFC " 793 " - - https://tools.ietf.org/rfc/rfc793.txt (TCP states) --- -2.13.1 - diff --git a/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch b/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch new file mode 100644 index 0000000..f0c1291 --- /dev/null +++ b/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch @@ -0,0 +1,46 @@ +From 8e8e7113d680fd344181dbaeafa5f7c4bae4805b Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:50 +0200 +Subject: [PATCH 2/6] rdma: Reduce scope of _dev_map_lookup call + +There is no external users of _dev_map_lookup function, +so let's limit its scope to be local. + +Fixes: 40df8263a0f0 ("rdma: Add dev object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit 0fc8c30b4e3ef4c6fc1c3142f9d906ec71d46ab8) +Signed-off-by: Phil Sutter +--- + rdma/rdma.h | 1 - + rdma/utils.c | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/rdma/rdma.h b/rdma/rdma.h +index d551eb2966e11..c07493c912423 100644 +--- a/rdma/rdma.h ++++ b/rdma/rdma.h +@@ -78,7 +78,6 @@ int rd_exec_cmd(struct rd *rd, const struct rd_cmd *c, const char *str); + */ + void rd_free_devmap(struct rd *rd); + struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index); +-struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name); + + /* + * Netlink +diff --git a/rdma/utils.c b/rdma/utils.c +index eb4377cf2e185..6ce1fd70e058f 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -236,7 +236,7 @@ int rd_recv_msg(struct rd *rd, mnl_cb_t callback, void *data, unsigned int seq) + return ret; + } + +-struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name) ++static struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name) + { + struct dev_map *dev_map; + +-- +2.15.1 + diff --git a/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch b/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch deleted file mode 100644 index 1ca3e04..0000000 --- a/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2706951bc0dad80596f172e9197452163bc9e067 Mon Sep 17 00:00:00 2001 -From: Simon Horman -Date: Wed, 8 Feb 2017 13:04:31 +0100 -Subject: [PATCH] tc: flower: use correct type when calling - flower_icmp_attr_type - -Use enum flower_icmp_field rather than bool as type of third parameter -when calling flower_icmp_attr_type. - -Fixes: eb3b5696f163 ("tc: flower: support matching on ICMP type and code") -Signed-off-by: Simon Horman -(cherry picked from commit 81f6e5a7279eaab826ba8b291b98fb2e89df0572) ---- - tc/f_flower.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tc/f_flower.c b/tc/f_flower.c -index 145a8566..75a3fbbc 100644 ---- a/tc/f_flower.c -+++ b/tc/f_flower.c -@@ -752,10 +752,12 @@ static int flower_print_opt(struct filter_util *qu, FILE *f, - if (nl_type >= 0) - flower_print_port(f, "src_port", tb[nl_type]); - -- nl_type = flower_icmp_attr_type(eth_type, ip_proto, false); -+ nl_type = flower_icmp_attr_type(eth_type, ip_proto, -+ FLOWER_ICMP_FIELD_TYPE); - if (nl_type >= 0) - flower_print_icmp(f, "icmp_type", tb[nl_type]); -- nl_type = flower_icmp_attr_type(eth_type, ip_proto, true); -+ nl_type = flower_icmp_attr_type(eth_type, ip_proto, -+ FLOWER_ICMP_FIELD_CODE); - if (nl_type >= 0) - flower_print_icmp(f, "icmp_code", tb[nl_type]); - --- -2.11.0 - diff --git a/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch b/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch deleted file mode 100644 index 28c78a3..0000000 --- a/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 06ed8e1fc690683fb1226a23548c81b7032fe7fe Mon Sep 17 00:00:00 2001 -From: Jiri Pirko -Date: Sat, 25 Nov 2017 11:07:56 +0100 -Subject: [PATCH] tc: move action cookie print out of the stats if - -Cookie print was made dependent on show_stats for no good reason. Fix -this bu pushing cookie print ot of the stats if. - -Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") -Signed-off-by: Jiri Pirko -(cherry picked from commit abff45b8026e24dedfe05376d8fedc1a8fe43402) ---- - tc/m_action.c | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) - -diff --git a/tc/m_action.c b/tc/m_action.c -index 402228bbf833d..704708f70aaac 100644 ---- a/tc/m_action.c -+++ b/tc/m_action.c -@@ -302,19 +302,18 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg) - return err; - - if (show_stats && tb[TCA_ACT_STATS]) { -- - fprintf(f, "\tAction statistics:\n"); - print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL); -- if (tb[TCA_ACT_COOKIE]) { -- int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); -- char b1[strsz * 2 + 1]; -- -- fprintf(f, "\n\tcookie len %d %s ", strsz, -- hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), -- strsz, b1, sizeof(b1))); -- } - fprintf(f, "\n"); - } -+ if (tb[TCA_ACT_COOKIE]) { -+ int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); -+ char b1[strsz * 2 + 1]; -+ -+ fprintf(f, "\tcookie len %d %s\n", strsz, -+ hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), -+ strsz, b1, sizeof(b1))); -+ } - - return 0; - } --- -2.13.1 - diff --git a/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch b/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch deleted file mode 100644 index 6b40d60..0000000 --- a/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 305197a2378ffb581f1eca3ec804f76690be7b5a Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann -Date: Mon, 6 Mar 2017 13:06:00 +0100 -Subject: [PATCH] bpf: test for valid type in bpf_get_work_dir - -Jan-Erik reported an assertion in bpf_prog_to_subdir() failed where -type was BPF_PROG_TYPE_UNSPEC, which is only used in bpf_init_env() -to auto-mount and cache the bpf fs mount point. - -Therefore, make sure when bpf_init_env() is called multiple times -(f.e. eBPF classifier with eBPF action attached) and bpf_mnt_cached -is set already that the type is also valid. In bpf_init_env(), we're -only interested in the mount point and not a type-specific subdir. - -Fixes: e42256699cac ("bpf: make tc's bpf loader generic and move into lib") -Reported-by: Jan-Erik Rediger -Signed-off-by: Daniel Borkmann -(cherry picked from commit 51361a9f1cfca81259c68515cb24fbaace03136a) ---- - lib/bpf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/bpf.c b/lib/bpf.c -index 64e199b3..fef9cfcd 100644 ---- a/lib/bpf.c -+++ b/lib/bpf.c -@@ -596,7 +596,7 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type) - if (bpf_mnt_cached) { - const char *out = mnt; - -- if (out) { -+ if (out && type) { - snprintf(bpf_tmp, sizeof(bpf_tmp), "%s%s/", - out, bpf_prog_to_subdir(type)); - out = bpf_tmp; --- -2.11.0 - diff --git a/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch b/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch new file mode 100644 index 0000000..2d5419d --- /dev/null +++ b/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch @@ -0,0 +1,35 @@ +From b171f889bdc8d4e11af8bc6ea947860536d7ade8 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:51 +0200 +Subject: [PATCH 3/6] rdma: Protect dev_map_lookup from wrong input + +Despite the fact that all callers to dev_map_lookup are ensuring that +there is always device name prior to call to that function, it is better +and safer to check that in the dev_map_lookup itself. + +Fixes: 40df8263a0f0 ("rdma: Add dev object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit 99da90326e6af8e17400a01cf48bb60606dd22a6) +Signed-off-by: Phil Sutter +--- + rdma/utils.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rdma/utils.c b/rdma/utils.c +index 6ce1fd70e058f..bb29fa1a2386e 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -253,6 +253,9 @@ struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index) + char *dev_name; + char *slash; + ++ if (rd_no_arg(rd)) ++ return NULL; ++ + dev_name = strdup(rd_argv(rd)); + if (allow_port_index) { + slash = strrchr(dev_name, '/'); +-- +2.15.1 + diff --git a/0003-tc-remove-action-cookie-len-from-printout.patch b/0003-tc-remove-action-cookie-len-from-printout.patch deleted file mode 100644 index 7ef2fcb..0000000 --- a/0003-tc-remove-action-cookie-len-from-printout.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 903d2bee8c6f156790758f7e9131490b70475ecd Mon Sep 17 00:00:00 2001 -From: Jiri Pirko -Date: Sat, 25 Nov 2017 11:07:57 +0100 -Subject: [PATCH] tc: remove action cookie len from printout - -Make the output same as input and avoid printout of unnecessary len. - -Suggested-by: Stephen Hemminger -Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") -Signed-off-by: Jiri Pirko -(cherry picked from commit 81051c60c24ad083cfcb46271e6450675763c722) ---- - tc/m_action.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tc/m_action.c b/tc/m_action.c -index 704708f70aaac..951ca973f4806 100644 ---- a/tc/m_action.c -+++ b/tc/m_action.c -@@ -310,7 +310,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg) - int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); - char b1[strsz * 2 + 1]; - -- fprintf(f, "\tcookie len %d %s\n", strsz, -+ fprintf(f, "\tcookie %s\n", - hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), - strsz, b1, sizeof(b1))); - } --- -2.13.1 - diff --git a/0004-link_gre6-Detect-invalid-encaplimit-values.patch b/0004-link_gre6-Detect-invalid-encaplimit-values.patch deleted file mode 100644 index af51d99..0000000 --- a/0004-link_gre6-Detect-invalid-encaplimit-values.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 6ecadd9b426bb05c31ec92c01e5352ac05d4e676 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Tue, 28 Nov 2017 16:49:58 +0100 -Subject: [PATCH] link_gre6: Detect invalid encaplimit values - -Looks like a typo: get_u8() returns 0 on success and -1 on error, so the -error checking here was ineffective. - -Fixes: a11b7b71a6eba ("link_gre6: really support encaplimit option") -Signed-off-by: Phil Sutter -(cherry picked from commit 56708ae7c9535859223c5b68097b35bf0fae677c) ---- - ip/link_gre6.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ip/link_gre6.c b/ip/link_gre6.c -index 7d07932a60f01..06dcd6756ec41 100644 ---- a/ip/link_gre6.c -+++ b/ip/link_gre6.c -@@ -364,7 +364,7 @@ get_failed: - } else { - __u8 uval; - -- if (get_u8(&uval, *argv, 0) < -1) -+ if (get_u8(&uval, *argv, 0)) - invarg("invalid ELIM", *argv); - encap_limit = uval; - flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT; --- -2.13.1 - diff --git a/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch b/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch new file mode 100644 index 0000000..746c9c6 --- /dev/null +++ b/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch @@ -0,0 +1,32 @@ +From f17a763593248d354a3af9ffbba260fedb2a9eeb Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:53 +0200 +Subject: [PATCH 4/6] rdma: Fix misspelled SYS_IMAGE_GUID + +SYS_IMAGE_GUIG is actually SYS_IMAGE_GUID. + +Fixes: da990ab40a92 ("rdma: Add link object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit 4e2eb9fdf911971c8a6615e4b07656047ada0093) +Signed-off-by: Phil Sutter +--- + rdma/link.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rdma/link.c b/rdma/link.c +index 3a4b00bd533b1..f0eaccbb8be70 100644 +--- a/rdma/link.c ++++ b/rdma/link.c +@@ -30,7 +30,7 @@ static const char *caps_to_str(uint32_t idx) + x(PKEY_NVRAM, 8) \ + x(LED_INFO, 9) \ + x(SM_DISABLED, 10) \ +- x(SYS_IMAGE_GUIG, 11) \ ++ x(SYS_IMAGE_GUID, 11) \ + x(PKEY_SW_EXT_PORT_TRAP, 12) \ + x(EXTENDED_SPEEDS, 14) \ + x(CM, 16) \ +-- +2.15.1 + diff --git a/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch b/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch deleted file mode 100644 index 3a7a7ce..0000000 --- a/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 04475ab5abc836d24b88622bca50af452be65920 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Wed, 29 Nov 2017 18:34:09 +0100 -Subject: [PATCH] man: tc-csum.8: Fix inconsistency in example description - -Commit 6bbe5e6290db5 ("man: tc-csum.8: Fix example") changed both source -and destination IP addresses in example code but missed to update the -example's description accordingly. - -Fixes: 6bbe5e6290db5 ("man: tc-csum.8: Fix example") -Signed-off-by: Phil Sutter -(cherry picked from commit 6bf156415a588fa1c975be9a18a1579f63a936a2) ---- - man/man8/tc-csum.8 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/man/man8/tc-csum.8 b/man/man8/tc-csum.8 -index 409ab71791cce..65724b88d0b68 100644 ---- a/man/man8/tc-csum.8 -+++ b/man/man8/tc-csum.8 -@@ -53,8 +53,8 @@ SCTP header - .B SWEETS - These are merely syntactic sugar and ignored internally. - .SH EXAMPLES --The following performs stateless NAT for incoming packets from 192.168.1.100 to --new destination 18.52.86.120 (0x12345678 in hex). Assuming these are UDP -+The following performs stateless NAT for incoming packets from 192.0.2.100 to -+new destination 198.51.100.1. Assuming these are UDP - packets, both IP and UDP checksums have to be recalculated: - - .RS --- -2.13.1 - diff --git a/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch b/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch new file mode 100644 index 0000000..9262f73 --- /dev/null +++ b/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch @@ -0,0 +1,35 @@ +From bde8ace828708b5d49ce650163c6a411065dafb4 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:54 +0200 +Subject: [PATCH 5/6] rdma: Check that port index exists before operate on link + layer + +Link layer operates on port layer, hence it should check +it existence before execution commands. + +Fixes: da990ab40a92 ("rdma: Add link object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit e3dee3c81f7fba93ae8c84f6c2fb5009c0764d65) +Signed-off-by: Phil Sutter +--- + rdma/link.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rdma/link.c b/rdma/link.c +index f0eaccbb8be70..d93922890bb7f 100644 +--- a/rdma/link.c ++++ b/rdma/link.c +@@ -277,6 +277,9 @@ static int link_one_show(struct rd *rd) + { 0 } + }; + ++ if (!rd->port_idx) ++ return 0; ++ + return rd_exec_cmd(rd, cmds, "parameter"); + } + +-- +2.15.1 + diff --git a/0006-rdma-Check-return-value-of-strdup-call.patch b/0006-rdma-Check-return-value-of-strdup-call.patch new file mode 100644 index 0000000..8bbc5d1 --- /dev/null +++ b/0006-rdma-Check-return-value-of-strdup-call.patch @@ -0,0 +1,32 @@ +From cda8da1af7517ee2fffb5bbedcf7488701ba332e Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 31 Jan 2018 10:11:56 +0200 +Subject: [PATCH 6/6] rdma: Check return value of strdup call + +Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool") +Signed-off-by: Leon Romanovsky +Signed-off-by: Stephen Hemminger +(cherry picked from commit 5f8265536f6f511ec62d3a0ee7e1324a8720f7e3) +Signed-off-by: Phil Sutter +--- + rdma/utils.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/rdma/utils.c b/rdma/utils.c +index bb29fa1a2386e..47ca2969706fb 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -67,6 +67,10 @@ static struct dev_map *dev_map_alloc(const char *dev_name) + if (!dev_map) + return NULL; + dev_map->dev_name = strdup(dev_name); ++ if (!dev_map->dev_name) { ++ free(dev_map); ++ return NULL; ++ } + + return dev_map; + } +-- +2.15.1 + diff --git a/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch b/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch deleted file mode 100644 index 518108f..0000000 --- a/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 03ce79e357f3afefe8d1409a98b5ae03c611d611 Mon Sep 17 00:00:00 2001 -From: Michal Privoznik -Date: Fri, 8 Dec 2017 11:18:07 +0100 -Subject: [PATCH] tc: util: Don't call NEXT_ARG_FWD() in - __parse_action_control() - -Not all callers want parse_action_control*() to advance the -arguments. For instance act_parse_police() does the argument -advancing itself. - -Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") -Signed-off-by: Michal Privoznik -(cherry picked from commit 3572e01a090a298e2f4c4f796bad6639b652e031) ---- - tc/m_bpf.c | 1 + - tc/m_connmark.c | 1 + - tc/m_csum.c | 1 + - tc/m_gact.c | 10 +++++----- - tc/m_ife.c | 1 + - tc/m_mirred.c | 4 +++- - tc/m_nat.c | 1 + - tc/m_pedit.c | 1 + - tc/m_sample.c | 1 + - tc/m_skbedit.c | 1 + - tc/m_skbmod.c | 1 + - tc/m_tunnel_key.c | 1 + - tc/m_vlan.c | 1 + - tc/tc_util.c | 1 - - 14 files changed, 19 insertions(+), 7 deletions(-) - -diff --git a/tc/m_bpf.c b/tc/m_bpf.c -index e3d0a2b118384..8b091a72951c3 100644 ---- a/tc/m_bpf.c -+++ b/tc/m_bpf.c -@@ -125,6 +125,7 @@ opt_bpf: - - parse_action_control_dflt(&argc, &argv, &parm.action, - false, TC_ACT_PIPE); -+ NEXT_ARG_FWD(); - - if (argc) { - if (matches(*argv, "index") == 0) { -diff --git a/tc/m_connmark.c b/tc/m_connmark.c -index 37d7185415490..47c7a8c2b17e7 100644 ---- a/tc/m_connmark.c -+++ b/tc/m_connmark.c -@@ -82,6 +82,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, - } - - parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_PIPE); -+ NEXT_ARG_FWD(); - - if (argc) { - if (matches(*argv, "index") == 0) { -diff --git a/tc/m_csum.c b/tc/m_csum.c -index 7b156734f64c5..e1352c0820f69 100644 ---- a/tc/m_csum.c -+++ b/tc/m_csum.c -@@ -124,6 +124,7 @@ parse_csum(struct action_util *a, int *argc_p, - } - - parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); -+ NEXT_ARG_FWD(); - - if (argc) { - if (matches(*argv, "index") == 0) { -diff --git a/tc/m_gact.c b/tc/m_gact.c -index 38949e903be36..7ea2d431f89f9 100644 ---- a/tc/m_gact.c -+++ b/tc/m_gact.c -@@ -88,14 +88,13 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, - if (argc < 0) - return -1; - -- -- if (matches(*argv, "gact") == 0) { -- argc--; -- argv++; -- } else if (parse_action_control(&argc, &argv, &p.action, false) == -1) { -+ if (matches(*argv, "gact") != 0 && -+ parse_action_control(&argc, &argv, &p.action, false) == -1) { - usage(); /* does not return */ - } - -+ NEXT_ARG_FWD(); -+ - #ifdef CONFIG_GACT_PROB - if (argc > 0) { - if (matches(*argv, "random") == 0) { -@@ -115,6 +114,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, - if (parse_action_control(&argc, &argv, - &pp.paction, false) == -1) - usage(); -+ NEXT_ARG_FWD(); - if (get_u16(&pp.pval, *argv, 10)) { - fprintf(stderr, "Illegal probability val 0x%x\n", pp.pval); - return -1; -diff --git a/tc/m_ife.c b/tc/m_ife.c -index 8d0fd31fb9440..34b8e03e7e589 100644 ---- a/tc/m_ife.c -+++ b/tc/m_ife.c -@@ -160,6 +160,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p, - - parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_mirred.c b/tc/m_mirred.c -index 2384bda1ff045..b09b016c2ca39 100644 ---- a/tc/m_mirred.c -+++ b/tc/m_mirred.c -@@ -170,8 +170,10 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p, - } - - -- if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) -+ if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) { - parse_action_control(&argc, &argv, &p.action, false); -+ NEXT_ARG_FWD(); -+ } - - if (argc) { - if (iok && matches(*argv, "index") == 0) { -diff --git a/tc/m_nat.c b/tc/m_nat.c -index 31b68fb6bd784..bb455f080b3a4 100644 ---- a/tc/m_nat.c -+++ b/tc/m_nat.c -@@ -117,6 +117,7 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct - - parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_pedit.c b/tc/m_pedit.c -index 5d89ab1d832ab..3391be95da38c 100644 ---- a/tc/m_pedit.c -+++ b/tc/m_pedit.c -@@ -673,6 +673,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, - - parse_action_control_dflt(&argc, &argv, &sel.sel.action, false, TC_ACT_OK); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_sample.c b/tc/m_sample.c -index ff5ee6bd1ef63..31774c0e806b4 100644 ---- a/tc/m_sample.c -+++ b/tc/m_sample.c -@@ -100,6 +100,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p, - - parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c -index aa374fcb33ed9..c41a7bb082dad 100644 ---- a/tc/m_skbedit.c -+++ b/tc/m_skbedit.c -@@ -123,6 +123,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, - parse_action_control_dflt(&argc, &argv, &sel.action, - false, TC_ACT_PIPE); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c -index ba79308ba8354..00318d42642a5 100644 ---- a/tc/m_skbmod.c -+++ b/tc/m_skbmod.c -@@ -125,6 +125,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p, - - parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c -index 1cdd03560c357..2dc91879c2375 100644 ---- a/tc/m_tunnel_key.c -+++ b/tc/m_tunnel_key.c -@@ -175,6 +175,7 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p, - parse_action_control_dflt(&argc, &argv, &parm.action, - false, TC_ACT_PIPE); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/m_vlan.c b/tc/m_vlan.c -index cccb4996b05f3..0b2966ce82e53 100644 ---- a/tc/m_vlan.c -+++ b/tc/m_vlan.c -@@ -137,6 +137,7 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p, - parse_action_control_dflt(&argc, &argv, &parm.action, - false, TC_ACT_PIPE); - -+ NEXT_ARG_FWD(); - if (argc) { - if (matches(*argv, "index") == 0) { - NEXT_ARG(); -diff --git a/tc/tc_util.c b/tc/tc_util.c -index b39e5508235ed..173097d2c28a0 100644 ---- a/tc/tc_util.c -+++ b/tc/tc_util.c -@@ -524,7 +524,6 @@ static int __parse_action_control(int *argc_p, char ***argv_p, int *result_p, - } - result |= jump_cnt; - } -- NEXT_ARG_FWD(); - *argc_p = argc; - *argv_p = argv; - *result_p = result; --- -2.13.1 - diff --git a/0007-ss-remove-duplicate-assignment.patch b/0007-ss-remove-duplicate-assignment.patch deleted file mode 100644 index 4388296..0000000 --- a/0007-ss-remove-duplicate-assignment.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 79a9bf3743acb9ebaa22e6f8eaa5a817172cca78 Mon Sep 17 00:00:00 2001 -From: Roman Mashak -Date: Mon, 11 Dec 2017 16:24:31 -0500 -Subject: [PATCH] ss: remove duplicate assignment - -Fixes: 8250bc9ff4e5 ("ss: Unify inet sockets output") -Signed-off-by: Roman Mashak -Signed-off-by: Stephen Hemminger -(cherry picked from commit 9f1a9ae88862f0e5b1beef4bef582be0d8edf3d9) - -Conflicts: - misc/ss.c --> Context changed due to missing commit 00ac78d39c29f - ("ss: print tcpi_rcv_ssthresh"). ---- - misc/ss.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/misc/ss.c b/misc/ss.c -index 45a0c330ec55f..cc1b930a19bcb 100644 ---- a/misc/ss.c -+++ b/misc/ss.c -@@ -2227,7 +2227,6 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, - s.sacked = info->tcpi_sacked; - s.fackets = info->tcpi_fackets; - s.reordering = info->tcpi_reordering; -- s.rcv_space = info->tcpi_rcv_space; - s.cwnd = info->tcpi_snd_cwnd; - - if (info->tcpi_snd_ssthresh < 0xFFFF) --- -2.13.1 - diff --git a/0008-tc-bash-completion-add-missing-classid-keyword.patch b/0008-tc-bash-completion-add-missing-classid-keyword.patch deleted file mode 100644 index d3bbec1..0000000 --- a/0008-tc-bash-completion-add-missing-classid-keyword.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1ac0ee2bae7fc79d7be922832de67f9df68f635f Mon Sep 17 00:00:00 2001 -From: Davide Caratti -Date: Tue, 12 Dec 2017 16:45:15 +0100 -Subject: [PATCH] tc: bash-completion: add missing 'classid' keyword - -users of 'matchall' filter can specify a value for the class id: update -bash-completion accordingly. - -Fixes: b32c0b64fa2b ("tc: bash-completion: Add support for matchall") -Signed-off-by: Davide Caratti -(cherry picked from commit 88b428f03f7c1fa64331105f54d42806cece77be) ---- - bash-completion/tc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bash-completion/tc b/bash-completion/tc -index 80d12972c8f3c..29bca5d9354d3 100644 ---- a/bash-completion/tc -+++ b/bash-completion/tc -@@ -450,7 +450,7 @@ _tc_filter_options() - return 0 - ;; - matchall) -- _tc_once_attr 'action skip_sw skip_hw' -+ _tc_once_attr 'action classid skip_sw skip_hw' - return 0 - ;; - flower) --- -2.13.1 - diff --git a/iproute.spec b/iproute.spec index 1d02701..c3b6fb7 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.14.1 -Release: 6%{?dist} +Version: 4.15.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -12,17 +12,13 @@ Source2: avpkt # Fedora local docs changes: # - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links # to tc-cbq.8. -# - Drop reference to Debian from ss.8 man page. -# - We ship ss.ps instead of ss.html. -Patch1: 0001-Documentation-fixes.patch +Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch # Suggested backports by Fixes: tag. -Patch2: 0002-tc-move-action-cookie-print-out-of-the-stats-if.patch -Patch3: 0003-tc-remove-action-cookie-len-from-printout.patch -Patch4: 0004-link_gre6-Detect-invalid-encaplimit-values.patch -Patch5: 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch -Patch6: 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch -Patch7: 0007-ss-remove-duplicate-assignment.patch -Patch8: 0008-tc-bash-completion-add-missing-classid-keyword.patch +Patch2: 0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch +Patch3: 0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch +Patch4: 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch +Patch5: 0005-rdma-Check-that-port-index-exists-before-operate-on-.patch +Patch6: 0006-rdma-Check-return-value-of-strdup-call.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -168,6 +164,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Feb 09 2018 Phil Sutter - 4.15.0-1 +- New version 4.15.0 + * Fri Feb 9 2018 Florian Weimer - 4.14.1-6 - Use LDFLAGS defaults from redhat-rpm-config diff --git a/sources b/sources index 4c14c03..15cb26e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.14.1.tar.xz) = e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c +SHA512 (iproute2-4.15.0.tar.xz) = bcc54b8dc83d7b0e759a2de77eb38fed483d7f7f82698f482e0259000f2f55ba79c556b721730eb999e85c865ad136fd7549304ebe936545e02e848ba7f698bc From ec833118f522e3b992dc6b5784ae2c8928c4a329 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 1 Jun 2018 16:19:54 +0200 Subject: [PATCH 029/111] Rebase package on top of iproute2-4.16.0 --- .gitignore | 1 + 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch | 6 +- ...ma-Ignore-unknown-netlink-attributes.patch | 37 +++++++++ ...Reduce-scope-of-_dev_map_lookup-call.patch | 46 ----------- ...ge-fix-typo-in-hairpin-error-message.patch | 32 ++++++++ ...tect-dev_map_lookup-from-wrong-input.patch | 35 --------- 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch | 32 -------- ...et-family-for-default-any-all-addres.patch | 49 ++++++++++++ ...rrect-size-of-message-to-avoid-spuri.patch | 38 ++++++++++ ...port-index-exists-before-operate-on-.patch | 35 --------- ...p-capabilities-if-net_admin-i-is-set.patch | 76 +++++++++++++++++++ ...ma-Check-return-value-of-strdup-call.patch | 32 -------- 0007-tc-allow-0-for-percent-options.patch | 34 +++++++++ iproute.spec | 16 ++-- sources | 2 +- 15 files changed, 281 insertions(+), 190 deletions(-) create mode 100644 0002-rdma-Ignore-unknown-netlink-attributes.patch delete mode 100644 0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch create mode 100644 0003-bridge-fix-typo-in-hairpin-error-message.patch delete mode 100644 0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch delete mode 100644 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch create mode 100644 0004-utils-Do-not-reset-family-for-default-any-all-addres.patch create mode 100644 0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch delete mode 100644 0005-rdma-Check-that-port-index-exists-before-operate-on-.patch create mode 100644 0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch delete mode 100644 0006-rdma-Check-return-value-of-strdup-call.patch create mode 100644 0007-tc-allow-0-for-percent-options.patch diff --git a/.gitignore b/.gitignore index 7380701..70178d6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /iproute2-4.13.0.tar.xz /iproute2-4.14.1.tar.xz /iproute2-4.15.0.tar.xz +/iproute2-4.16.0.tar.xz diff --git a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch index 998d9fa..b3bea75 100644 --- a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch +++ b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch @@ -1,7 +1,7 @@ -From 2d6460e474e96c4ee474fc7b5b55ab04eeac4984 Mon Sep 17 00:00:00 2001 +From d0a7e6eaa550dc7930ea53268637ff2186c7ddc6 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 17 Mar 2017 22:47:27 +0100 -Subject: [PATCH 1/6] Add cbq.8 as an alias to tc-cbq.8 +Subject: [PATCH] Add cbq.8 as an alias to tc-cbq.8 Signed-off-by: Phil Sutter --- @@ -17,5 +17,5 @@ index 0000000000000..bef35201f4eab @@ -0,0 +1 @@ +.so man8/tc-cbq.8 -- -2.15.1 +2.17.0 diff --git a/0002-rdma-Ignore-unknown-netlink-attributes.patch b/0002-rdma-Ignore-unknown-netlink-attributes.patch new file mode 100644 index 0000000..d788856 --- /dev/null +++ b/0002-rdma-Ignore-unknown-netlink-attributes.patch @@ -0,0 +1,37 @@ +From 1264732c29782e314d02ac3fb494909d8815fa02 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Tue, 3 Apr 2018 10:28:42 +0300 +Subject: [PATCH] rdma: Ignore unknown netlink attributes + +The check if netlink attributes supplied more than maximum supported +is to strict and may lead to backward compatibility issues with old +application with a newer kernel that supports new attribute. + +CC: Steve Wise +Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool") +Signed-off-by: Leon Romanovsky +Reviewed-by: Steve Wise +Signed-off-by: Stephen Hemminger +(cherry picked from commit fda0a61dde744abe69d4227f62b66238460c9011) +Signed-off-by: Phil Sutter +--- + rdma/utils.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/rdma/utils.c b/rdma/utils.c +index f9460162ce369..910b3800eade5 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -383,7 +383,8 @@ int rd_attr_cb(const struct nlattr *attr, void *data) + int type; + + if (mnl_attr_type_valid(attr, RDMA_NLDEV_ATTR_MAX) < 0) +- return MNL_CB_ERROR; ++ /* We received uknown attribute */ ++ return MNL_CB_OK; + + type = mnl_attr_get_type(attr); + +-- +2.17.0 + diff --git a/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch b/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch deleted file mode 100644 index f0c1291..0000000 --- a/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8e8e7113d680fd344181dbaeafa5f7c4bae4805b Mon Sep 17 00:00:00 2001 -From: Leon Romanovsky -Date: Wed, 27 Dec 2017 09:57:50 +0200 -Subject: [PATCH 2/6] rdma: Reduce scope of _dev_map_lookup call - -There is no external users of _dev_map_lookup function, -so let's limit its scope to be local. - -Fixes: 40df8263a0f0 ("rdma: Add dev object") -Signed-off-by: Leon Romanovsky -Signed-off-by: David Ahern -(cherry picked from commit 0fc8c30b4e3ef4c6fc1c3142f9d906ec71d46ab8) -Signed-off-by: Phil Sutter ---- - rdma/rdma.h | 1 - - rdma/utils.c | 2 +- - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/rdma/rdma.h b/rdma/rdma.h -index d551eb2966e11..c07493c912423 100644 ---- a/rdma/rdma.h -+++ b/rdma/rdma.h -@@ -78,7 +78,6 @@ int rd_exec_cmd(struct rd *rd, const struct rd_cmd *c, const char *str); - */ - void rd_free_devmap(struct rd *rd); - struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index); --struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name); - - /* - * Netlink -diff --git a/rdma/utils.c b/rdma/utils.c -index eb4377cf2e185..6ce1fd70e058f 100644 ---- a/rdma/utils.c -+++ b/rdma/utils.c -@@ -236,7 +236,7 @@ int rd_recv_msg(struct rd *rd, mnl_cb_t callback, void *data, unsigned int seq) - return ret; - } - --struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name) -+static struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name) - { - struct dev_map *dev_map; - --- -2.15.1 - diff --git a/0003-bridge-fix-typo-in-hairpin-error-message.patch b/0003-bridge-fix-typo-in-hairpin-error-message.patch new file mode 100644 index 0000000..97e6f29 --- /dev/null +++ b/0003-bridge-fix-typo-in-hairpin-error-message.patch @@ -0,0 +1,32 @@ +From c302ef700895f0808bb107a2fa560c14c8f3e643 Mon Sep 17 00:00:00 2001 +From: Guillaume Nault +Date: Fri, 6 Apr 2018 13:33:49 +0200 +Subject: [PATCH] bridge: fix typo in hairpin error message + +No 'g' to hairpin. + +Fixes: 64108901b737 ("bridge: Add support for setting bridge port attributes") +Signed-off-by: Guillaume Nault +Signed-off-by: Stephen Hemminger +(cherry picked from commit ef3671781644bd1722e55db4ad9d31047da0e42d) +Signed-off-by: Phil Sutter +--- + bridge/link.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bridge/link.c b/bridge/link.c +index 870ebe0504777..a19bc1097024e 100644 +--- a/bridge/link.c ++++ b/bridge/link.c +@@ -304,7 +304,7 @@ static int brlink_modify(int argc, char **argv) + return -1; + } else if (strcmp(*argv, "hairpin") == 0) { + NEXT_ARG(); +- if (!on_off("hairping", &hairpin, *argv)) ++ if (!on_off("hairpin", &hairpin, *argv)) + return -1; + } else if (strcmp(*argv, "fastleave") == 0) { + NEXT_ARG(); +-- +2.17.0 + diff --git a/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch b/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch deleted file mode 100644 index 2d5419d..0000000 --- a/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b171f889bdc8d4e11af8bc6ea947860536d7ade8 Mon Sep 17 00:00:00 2001 -From: Leon Romanovsky -Date: Wed, 27 Dec 2017 09:57:51 +0200 -Subject: [PATCH 3/6] rdma: Protect dev_map_lookup from wrong input - -Despite the fact that all callers to dev_map_lookup are ensuring that -there is always device name prior to call to that function, it is better -and safer to check that in the dev_map_lookup itself. - -Fixes: 40df8263a0f0 ("rdma: Add dev object") -Signed-off-by: Leon Romanovsky -Signed-off-by: David Ahern -(cherry picked from commit 99da90326e6af8e17400a01cf48bb60606dd22a6) -Signed-off-by: Phil Sutter ---- - rdma/utils.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/rdma/utils.c b/rdma/utils.c -index 6ce1fd70e058f..bb29fa1a2386e 100644 ---- a/rdma/utils.c -+++ b/rdma/utils.c -@@ -253,6 +253,9 @@ struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index) - char *dev_name; - char *slash; - -+ if (rd_no_arg(rd)) -+ return NULL; -+ - dev_name = strdup(rd_argv(rd)); - if (allow_port_index) { - slash = strrchr(dev_name, '/'); --- -2.15.1 - diff --git a/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch b/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch deleted file mode 100644 index 746c9c6..0000000 --- a/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f17a763593248d354a3af9ffbba260fedb2a9eeb Mon Sep 17 00:00:00 2001 -From: Leon Romanovsky -Date: Wed, 27 Dec 2017 09:57:53 +0200 -Subject: [PATCH 4/6] rdma: Fix misspelled SYS_IMAGE_GUID - -SYS_IMAGE_GUIG is actually SYS_IMAGE_GUID. - -Fixes: da990ab40a92 ("rdma: Add link object") -Signed-off-by: Leon Romanovsky -Signed-off-by: David Ahern -(cherry picked from commit 4e2eb9fdf911971c8a6615e4b07656047ada0093) -Signed-off-by: Phil Sutter ---- - rdma/link.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rdma/link.c b/rdma/link.c -index 3a4b00bd533b1..f0eaccbb8be70 100644 ---- a/rdma/link.c -+++ b/rdma/link.c -@@ -30,7 +30,7 @@ static const char *caps_to_str(uint32_t idx) - x(PKEY_NVRAM, 8) \ - x(LED_INFO, 9) \ - x(SM_DISABLED, 10) \ -- x(SYS_IMAGE_GUIG, 11) \ -+ x(SYS_IMAGE_GUID, 11) \ - x(PKEY_SW_EXT_PORT_TRAP, 12) \ - x(EXTENDED_SPEEDS, 14) \ - x(CM, 16) \ --- -2.15.1 - diff --git a/0004-utils-Do-not-reset-family-for-default-any-all-addres.patch b/0004-utils-Do-not-reset-family-for-default-any-all-addres.patch new file mode 100644 index 0000000..aa7bda2 --- /dev/null +++ b/0004-utils-Do-not-reset-family-for-default-any-all-addres.patch @@ -0,0 +1,49 @@ +From 0c0499e4ff787ae76f9b1e5e8cb104794c9b8826 Mon Sep 17 00:00:00 2001 +From: David Ahern +Date: Fri, 13 Apr 2018 09:36:33 -0700 +Subject: [PATCH] utils: Do not reset family for default, any, all addresses + +Thomas reported a change in behavior with respect to autodectecting +address families. Specifically, 'ip ro add default via fe80::1' +syntax was failing to treat fe80::1 as an IPv6 address as it did in +prior releases. The root causes appears to be a change in family when +the default keyword is parsed. + +'default', 'any' and 'all' are relevant outside of AF_INET. Leave the +family arg as is for these when setting addr. + +Fixes: 93fa12418dc6 ("utils: Always specify family and ->bytelen in get_prefix_1()") +Reported-by: Thomas Deutschmann +Signed-off-by: David Ahern +Cc: Serhey Popovych +(cherry picked from commit d42c7891d26e4d5616a55aac9fe10813767fcf9c) +Signed-off-by: Phil Sutter +--- + lib/utils.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/utils.c b/lib/utils.c +index b9e9a6caaf548..803bcc45f2f24 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -566,7 +566,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family) + if (strcmp(name, "default") == 0) { + if ((family == AF_DECnet) || (family == AF_MPLS)) + return -1; +- addr->family = (family != AF_UNSPEC) ? family : AF_INET; ++ addr->family = family; + addr->bytelen = af_byte_len(addr->family); + addr->bitlen = -2; + addr->flags |= PREFIXLEN_SPECIFIED; +@@ -577,7 +577,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family) + strcmp(name, "any") == 0) { + if ((family == AF_DECnet) || (family == AF_MPLS)) + return -1; +- addr->family = AF_UNSPEC; ++ addr->family = family; + addr->bytelen = 0; + addr->bitlen = -2; + return 0; +-- +2.17.0 + diff --git a/0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch b/0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch new file mode 100644 index 0000000..bd3bedc --- /dev/null +++ b/0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch @@ -0,0 +1,38 @@ +From fa55117da22086855061d9dd87fae15fdbec58e6 Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Wed, 18 Apr 2018 11:06:07 -0700 +Subject: [PATCH] iplink_geneve: correct size of message to avoid spurious + errors + +Commit 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()") +inadvertently changed the parameter to addattr_l() resulting in: + +addattr_l ERROR: message exceeded bound of 4 + +when remote is specified. + +Fixes: 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()") +Signed-off-by: Jakub Kicinski +Reviewed-by: Quentin Monnet +(cherry picked from commit f5393225f947f76523571d6205198112dc4a8e09) +Signed-off-by: Phil Sutter +--- + ip/iplink_geneve.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ip/iplink_geneve.c b/ip/iplink_geneve.c +index c66607267f7d1..e49a9adda1072 100644 +--- a/ip/iplink_geneve.c ++++ b/ip/iplink_geneve.c +@@ -199,7 +199,7 @@ static int geneve_parse_opt(struct link_util *lu, int argc, char **argv, + if (is_addrtype_inet(&daddr)) { + int type = (daddr.family == AF_INET) ? IFLA_GENEVE_REMOTE : + IFLA_GENEVE_REMOTE6; +- addattr_l(n, sizeof(1024), type, daddr.data, daddr.bytelen); ++ addattr_l(n, 1024, type, daddr.data, daddr.bytelen); + } + if (!set_op || GENEVE_ATTRSET(attrs, IFLA_GENEVE_LABEL)) + addattr32(n, 1024, IFLA_GENEVE_LABEL, label); +-- +2.17.0 + diff --git a/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch b/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch deleted file mode 100644 index 9262f73..0000000 --- a/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bde8ace828708b5d49ce650163c6a411065dafb4 Mon Sep 17 00:00:00 2001 -From: Leon Romanovsky -Date: Wed, 27 Dec 2017 09:57:54 +0200 -Subject: [PATCH 5/6] rdma: Check that port index exists before operate on link - layer - -Link layer operates on port layer, hence it should check -it existence before execution commands. - -Fixes: da990ab40a92 ("rdma: Add link object") -Signed-off-by: Leon Romanovsky -Signed-off-by: David Ahern -(cherry picked from commit e3dee3c81f7fba93ae8c84f6c2fb5009c0764d65) -Signed-off-by: Phil Sutter ---- - rdma/link.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/rdma/link.c b/rdma/link.c -index f0eaccbb8be70..d93922890bb7f 100644 ---- a/rdma/link.c -+++ b/rdma/link.c -@@ -277,6 +277,9 @@ static int link_one_show(struct rd *rd) - { 0 } - }; - -+ if (!rd->port_idx) -+ return 0; -+ - return rd_exec_cmd(rd, cmds, "parameter"); - } - --- -2.15.1 - diff --git a/0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch b/0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch new file mode 100644 index 0000000..dca24ce --- /dev/null +++ b/0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch @@ -0,0 +1,76 @@ +From 4264c8481a025fa7b413be1e892d30235237348b Mon Sep 17 00:00:00 2001 +From: Luca Boccassi +Date: Fri, 11 May 2018 13:39:56 +0100 +Subject: [PATCH] ip: do not drop capabilities if net_admin=i is set + +Users have reported a regression due to ip now dropping capabilities +unconditionally. +zerotier-one VPN and VirtualBox use ambient capabilities in their +binary and then fork out to ip to set routes and links, and this +does not work anymore. + +As a workaround, do not drop caps if CAP_NET_ADMIN (the most common +capability used by ip) is set with the INHERITABLE flag. +Users that want ip vrf exec to work do not need to set INHERITABLE, +which will then only set when the calling program had privileges to +give itself the ambient capability. + +Fixes: ba2fc55b99f8 ("Drop capabilities if not running ip exec vrf with libcap") + +Signed-off-by: Luca Boccassi +(cherry picked from commit 9b13cc98f5952f62b825461727c8170d37a4037d) +Signed-off-by: Phil Sutter +--- + lib/utils.c | 15 ++++++++++++--- + man/man8/ip-vrf.8 | 4 ++++ + 2 files changed, 16 insertions(+), 3 deletions(-) + +diff --git a/lib/utils.c b/lib/utils.c +index 803bcc45f2f24..7d3fe9c91d3df 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -1492,14 +1492,23 @@ void drop_cap(void) + /* don't harmstring root/sudo */ + if (getuid() != 0 && geteuid() != 0) { + cap_t capabilities; ++ cap_value_t net_admin = CAP_NET_ADMIN; ++ cap_flag_t inheritable = CAP_INHERITABLE; ++ cap_flag_value_t is_set; + + capabilities = cap_get_proc(); + if (!capabilities) + exit(EXIT_FAILURE); +- if (cap_clear(capabilities) != 0) +- exit(EXIT_FAILURE); +- if (cap_set_proc(capabilities) != 0) ++ if (cap_get_flag(capabilities, net_admin, inheritable, ++ &is_set) != 0) + exit(EXIT_FAILURE); ++ /* apps with ambient caps can fork and call ip */ ++ if (is_set == CAP_CLEAR) { ++ if (cap_clear(capabilities) != 0) ++ exit(EXIT_FAILURE); ++ if (cap_set_proc(capabilities) != 0) ++ exit(EXIT_FAILURE); ++ } + cap_free(capabilities); + } + #endif +diff --git a/man/man8/ip-vrf.8 b/man/man8/ip-vrf.8 +index 1a42cebe1aef4..c1c9b958f6800 100644 +--- a/man/man8/ip-vrf.8 ++++ b/man/man8/ip-vrf.8 +@@ -70,6 +70,10 @@ This command also requires to be ran as root or with the CAP_SYS_ADMIN, + CAP_NET_ADMIN and CAP_DAC_OVERRIDE capabilities. If built with libcap and if + capabilities are added to the ip binary program via setcap, the program will + drop them as the first thing when invoked, unless the command is vrf exec. ++.br ++NOTE: capabilities will NOT be dropped if CAP_NET_ADMIN is set to INHERITABLE ++to avoid breaking programs with ambient capabilities that call ip. ++Do not set the INHERITABLE flag on the ip binary itself. + + .TP + .B ip vrf identify [PID] - Report VRF association for process +-- +2.17.0 + diff --git a/0006-rdma-Check-return-value-of-strdup-call.patch b/0006-rdma-Check-return-value-of-strdup-call.patch deleted file mode 100644 index 8bbc5d1..0000000 --- a/0006-rdma-Check-return-value-of-strdup-call.patch +++ /dev/null @@ -1,32 +0,0 @@ -From cda8da1af7517ee2fffb5bbedcf7488701ba332e Mon Sep 17 00:00:00 2001 -From: Leon Romanovsky -Date: Wed, 31 Jan 2018 10:11:56 +0200 -Subject: [PATCH 6/6] rdma: Check return value of strdup call - -Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool") -Signed-off-by: Leon Romanovsky -Signed-off-by: Stephen Hemminger -(cherry picked from commit 5f8265536f6f511ec62d3a0ee7e1324a8720f7e3) -Signed-off-by: Phil Sutter ---- - rdma/utils.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/rdma/utils.c b/rdma/utils.c -index bb29fa1a2386e..47ca2969706fb 100644 ---- a/rdma/utils.c -+++ b/rdma/utils.c -@@ -67,6 +67,10 @@ static struct dev_map *dev_map_alloc(const char *dev_name) - if (!dev_map) - return NULL; - dev_map->dev_name = strdup(dev_name); -+ if (!dev_map->dev_name) { -+ free(dev_map); -+ return NULL; -+ } - - return dev_map; - } --- -2.15.1 - diff --git a/0007-tc-allow-0-for-percent-options.patch b/0007-tc-allow-0-for-percent-options.patch new file mode 100644 index 0000000..77dd0ed --- /dev/null +++ b/0007-tc-allow-0-for-percent-options.patch @@ -0,0 +1,34 @@ +From 011d598dc86ad94c0560e1eb7921546daf4f81eb Mon Sep 17 00:00:00 2001 +From: Stephen Hemminger +Date: Thu, 17 May 2018 16:20:50 -0700 +Subject: [PATCH] tc: allow 0% for percent options + +Allowing 0% is sometimes useful for example in netem loss and drop +or perhaps dropping all traffic in a HTB bin. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199745 +Reported-by: stuartmarsden@gmail.com +Fixes: 927e3cfb52b5 ("tc: B.W limits can now be specified in %.") +Signed-off-by: Stephen Hemminger +(cherry picked from commit 405e0c4ffe7a410b09201db42955089fb0033776) +Signed-off-by: Phil Sutter +--- + lib/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/utils.c b/lib/utils.c +index 7d3fe9c91d3df..44ba237e63557 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -103,7 +103,7 @@ int parse_percent(double *val, const char *str) + *val = strtod(str, &p) / 100.; + if (*val == HUGE_VALF || *val == HUGE_VALL) + return 1; +- if (*val == 0.0 || (*p && strcmp(p, "%"))) ++ if (*p && strcmp(p, "%")) + return -1; + + return 0; +-- +2.17.0 + diff --git a/iproute.spec b/iproute.spec index c3b6fb7..3cba49b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.15.0 +Version: 4.16.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -14,11 +14,12 @@ Source2: avpkt # to tc-cbq.8. Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch # Suggested backports by Fixes: tag. -Patch2: 0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch -Patch3: 0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch -Patch4: 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch -Patch5: 0005-rdma-Check-that-port-index-exists-before-operate-on-.patch -Patch6: 0006-rdma-Check-return-value-of-strdup-call.patch +Patch2: 0002-rdma-Ignore-unknown-netlink-attributes.patch +Patch3: 0003-bridge-fix-typo-in-hairpin-error-message.patch +Patch4: 0004-utils-Do-not-reset-family-for-default-any-all-addres.patch +Patch5: 0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch +Patch6: 0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch +Patch7: 0007-tc-allow-0-for-percent-options.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -164,6 +165,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Jun 01 2018 Phil Sutter - 4.16.0-1 +- New version 4.16.0 + * Fri Feb 09 2018 Phil Sutter - 4.15.0-1 - New version 4.15.0 diff --git a/sources b/sources index 15cb26e..f3d3ea6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.15.0.tar.xz) = bcc54b8dc83d7b0e759a2de77eb38fed483d7f7f82698f482e0259000f2f55ba79c556b721730eb999e85c865ad136fd7549304ebe936545e02e848ba7f698bc +SHA512 (iproute2-4.16.0.tar.xz) = a8fbc92665a8d4ca6ee1e894bfb27373cf6b16dac9e2ab3831e418fcc9b895acc7d6fc64efa0b0e37b3affd4ef8eacf4dae5715536138d6a05c65ad49a2becad From 27df2f2db447674cb1550153e490f5d36299ca4b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 12 Jun 2018 21:08:06 +0200 Subject: [PATCH 030/111] Rebase package on top of iproute2-4.17.0 --- .gitignore | 1 + ...ma-Ignore-unknown-netlink-attributes.patch | 37 --------- ...ge-fix-typo-in-hairpin-error-message.patch | 32 -------- ...et-family-for-default-any-all-addres.patch | 49 ------------ ...rrect-size-of-message-to-avoid-spuri.patch | 38 ---------- ...p-capabilities-if-net_admin-i-is-set.patch | 76 ------------------- 0007-tc-allow-0-for-percent-options.patch | 34 --------- iproute.spec | 12 +-- sources | 2 +- 9 files changed, 6 insertions(+), 275 deletions(-) delete mode 100644 0002-rdma-Ignore-unknown-netlink-attributes.patch delete mode 100644 0003-bridge-fix-typo-in-hairpin-error-message.patch delete mode 100644 0004-utils-Do-not-reset-family-for-default-any-all-addres.patch delete mode 100644 0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch delete mode 100644 0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch delete mode 100644 0007-tc-allow-0-for-percent-options.patch diff --git a/.gitignore b/.gitignore index 70178d6..3cb8593 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /iproute2-4.14.1.tar.xz /iproute2-4.15.0.tar.xz /iproute2-4.16.0.tar.xz +/iproute2-4.17.0.tar.xz diff --git a/0002-rdma-Ignore-unknown-netlink-attributes.patch b/0002-rdma-Ignore-unknown-netlink-attributes.patch deleted file mode 100644 index d788856..0000000 --- a/0002-rdma-Ignore-unknown-netlink-attributes.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 1264732c29782e314d02ac3fb494909d8815fa02 Mon Sep 17 00:00:00 2001 -From: Leon Romanovsky -Date: Tue, 3 Apr 2018 10:28:42 +0300 -Subject: [PATCH] rdma: Ignore unknown netlink attributes - -The check if netlink attributes supplied more than maximum supported -is to strict and may lead to backward compatibility issues with old -application with a newer kernel that supports new attribute. - -CC: Steve Wise -Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool") -Signed-off-by: Leon Romanovsky -Reviewed-by: Steve Wise -Signed-off-by: Stephen Hemminger -(cherry picked from commit fda0a61dde744abe69d4227f62b66238460c9011) -Signed-off-by: Phil Sutter ---- - rdma/utils.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/rdma/utils.c b/rdma/utils.c -index f9460162ce369..910b3800eade5 100644 ---- a/rdma/utils.c -+++ b/rdma/utils.c -@@ -383,7 +383,8 @@ int rd_attr_cb(const struct nlattr *attr, void *data) - int type; - - if (mnl_attr_type_valid(attr, RDMA_NLDEV_ATTR_MAX) < 0) -- return MNL_CB_ERROR; -+ /* We received uknown attribute */ -+ return MNL_CB_OK; - - type = mnl_attr_get_type(attr); - --- -2.17.0 - diff --git a/0003-bridge-fix-typo-in-hairpin-error-message.patch b/0003-bridge-fix-typo-in-hairpin-error-message.patch deleted file mode 100644 index 97e6f29..0000000 --- a/0003-bridge-fix-typo-in-hairpin-error-message.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c302ef700895f0808bb107a2fa560c14c8f3e643 Mon Sep 17 00:00:00 2001 -From: Guillaume Nault -Date: Fri, 6 Apr 2018 13:33:49 +0200 -Subject: [PATCH] bridge: fix typo in hairpin error message - -No 'g' to hairpin. - -Fixes: 64108901b737 ("bridge: Add support for setting bridge port attributes") -Signed-off-by: Guillaume Nault -Signed-off-by: Stephen Hemminger -(cherry picked from commit ef3671781644bd1722e55db4ad9d31047da0e42d) -Signed-off-by: Phil Sutter ---- - bridge/link.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bridge/link.c b/bridge/link.c -index 870ebe0504777..a19bc1097024e 100644 ---- a/bridge/link.c -+++ b/bridge/link.c -@@ -304,7 +304,7 @@ static int brlink_modify(int argc, char **argv) - return -1; - } else if (strcmp(*argv, "hairpin") == 0) { - NEXT_ARG(); -- if (!on_off("hairping", &hairpin, *argv)) -+ if (!on_off("hairpin", &hairpin, *argv)) - return -1; - } else if (strcmp(*argv, "fastleave") == 0) { - NEXT_ARG(); --- -2.17.0 - diff --git a/0004-utils-Do-not-reset-family-for-default-any-all-addres.patch b/0004-utils-Do-not-reset-family-for-default-any-all-addres.patch deleted file mode 100644 index aa7bda2..0000000 --- a/0004-utils-Do-not-reset-family-for-default-any-all-addres.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0c0499e4ff787ae76f9b1e5e8cb104794c9b8826 Mon Sep 17 00:00:00 2001 -From: David Ahern -Date: Fri, 13 Apr 2018 09:36:33 -0700 -Subject: [PATCH] utils: Do not reset family for default, any, all addresses - -Thomas reported a change in behavior with respect to autodectecting -address families. Specifically, 'ip ro add default via fe80::1' -syntax was failing to treat fe80::1 as an IPv6 address as it did in -prior releases. The root causes appears to be a change in family when -the default keyword is parsed. - -'default', 'any' and 'all' are relevant outside of AF_INET. Leave the -family arg as is for these when setting addr. - -Fixes: 93fa12418dc6 ("utils: Always specify family and ->bytelen in get_prefix_1()") -Reported-by: Thomas Deutschmann -Signed-off-by: David Ahern -Cc: Serhey Popovych -(cherry picked from commit d42c7891d26e4d5616a55aac9fe10813767fcf9c) -Signed-off-by: Phil Sutter ---- - lib/utils.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/utils.c b/lib/utils.c -index b9e9a6caaf548..803bcc45f2f24 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -566,7 +566,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family) - if (strcmp(name, "default") == 0) { - if ((family == AF_DECnet) || (family == AF_MPLS)) - return -1; -- addr->family = (family != AF_UNSPEC) ? family : AF_INET; -+ addr->family = family; - addr->bytelen = af_byte_len(addr->family); - addr->bitlen = -2; - addr->flags |= PREFIXLEN_SPECIFIED; -@@ -577,7 +577,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family) - strcmp(name, "any") == 0) { - if ((family == AF_DECnet) || (family == AF_MPLS)) - return -1; -- addr->family = AF_UNSPEC; -+ addr->family = family; - addr->bytelen = 0; - addr->bitlen = -2; - return 0; --- -2.17.0 - diff --git a/0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch b/0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch deleted file mode 100644 index bd3bedc..0000000 --- a/0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch +++ /dev/null @@ -1,38 +0,0 @@ -From fa55117da22086855061d9dd87fae15fdbec58e6 Mon Sep 17 00:00:00 2001 -From: Jakub Kicinski -Date: Wed, 18 Apr 2018 11:06:07 -0700 -Subject: [PATCH] iplink_geneve: correct size of message to avoid spurious - errors - -Commit 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()") -inadvertently changed the parameter to addattr_l() resulting in: - -addattr_l ERROR: message exceeded bound of 4 - -when remote is specified. - -Fixes: 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()") -Signed-off-by: Jakub Kicinski -Reviewed-by: Quentin Monnet -(cherry picked from commit f5393225f947f76523571d6205198112dc4a8e09) -Signed-off-by: Phil Sutter ---- - ip/iplink_geneve.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ip/iplink_geneve.c b/ip/iplink_geneve.c -index c66607267f7d1..e49a9adda1072 100644 ---- a/ip/iplink_geneve.c -+++ b/ip/iplink_geneve.c -@@ -199,7 +199,7 @@ static int geneve_parse_opt(struct link_util *lu, int argc, char **argv, - if (is_addrtype_inet(&daddr)) { - int type = (daddr.family == AF_INET) ? IFLA_GENEVE_REMOTE : - IFLA_GENEVE_REMOTE6; -- addattr_l(n, sizeof(1024), type, daddr.data, daddr.bytelen); -+ addattr_l(n, 1024, type, daddr.data, daddr.bytelen); - } - if (!set_op || GENEVE_ATTRSET(attrs, IFLA_GENEVE_LABEL)) - addattr32(n, 1024, IFLA_GENEVE_LABEL, label); --- -2.17.0 - diff --git a/0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch b/0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch deleted file mode 100644 index dca24ce..0000000 --- a/0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 4264c8481a025fa7b413be1e892d30235237348b Mon Sep 17 00:00:00 2001 -From: Luca Boccassi -Date: Fri, 11 May 2018 13:39:56 +0100 -Subject: [PATCH] ip: do not drop capabilities if net_admin=i is set - -Users have reported a regression due to ip now dropping capabilities -unconditionally. -zerotier-one VPN and VirtualBox use ambient capabilities in their -binary and then fork out to ip to set routes and links, and this -does not work anymore. - -As a workaround, do not drop caps if CAP_NET_ADMIN (the most common -capability used by ip) is set with the INHERITABLE flag. -Users that want ip vrf exec to work do not need to set INHERITABLE, -which will then only set when the calling program had privileges to -give itself the ambient capability. - -Fixes: ba2fc55b99f8 ("Drop capabilities if not running ip exec vrf with libcap") - -Signed-off-by: Luca Boccassi -(cherry picked from commit 9b13cc98f5952f62b825461727c8170d37a4037d) -Signed-off-by: Phil Sutter ---- - lib/utils.c | 15 ++++++++++++--- - man/man8/ip-vrf.8 | 4 ++++ - 2 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/lib/utils.c b/lib/utils.c -index 803bcc45f2f24..7d3fe9c91d3df 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -1492,14 +1492,23 @@ void drop_cap(void) - /* don't harmstring root/sudo */ - if (getuid() != 0 && geteuid() != 0) { - cap_t capabilities; -+ cap_value_t net_admin = CAP_NET_ADMIN; -+ cap_flag_t inheritable = CAP_INHERITABLE; -+ cap_flag_value_t is_set; - - capabilities = cap_get_proc(); - if (!capabilities) - exit(EXIT_FAILURE); -- if (cap_clear(capabilities) != 0) -- exit(EXIT_FAILURE); -- if (cap_set_proc(capabilities) != 0) -+ if (cap_get_flag(capabilities, net_admin, inheritable, -+ &is_set) != 0) - exit(EXIT_FAILURE); -+ /* apps with ambient caps can fork and call ip */ -+ if (is_set == CAP_CLEAR) { -+ if (cap_clear(capabilities) != 0) -+ exit(EXIT_FAILURE); -+ if (cap_set_proc(capabilities) != 0) -+ exit(EXIT_FAILURE); -+ } - cap_free(capabilities); - } - #endif -diff --git a/man/man8/ip-vrf.8 b/man/man8/ip-vrf.8 -index 1a42cebe1aef4..c1c9b958f6800 100644 ---- a/man/man8/ip-vrf.8 -+++ b/man/man8/ip-vrf.8 -@@ -70,6 +70,10 @@ This command also requires to be ran as root or with the CAP_SYS_ADMIN, - CAP_NET_ADMIN and CAP_DAC_OVERRIDE capabilities. If built with libcap and if - capabilities are added to the ip binary program via setcap, the program will - drop them as the first thing when invoked, unless the command is vrf exec. -+.br -+NOTE: capabilities will NOT be dropped if CAP_NET_ADMIN is set to INHERITABLE -+to avoid breaking programs with ambient capabilities that call ip. -+Do not set the INHERITABLE flag on the ip binary itself. - - .TP - .B ip vrf identify [PID] - Report VRF association for process --- -2.17.0 - diff --git a/0007-tc-allow-0-for-percent-options.patch b/0007-tc-allow-0-for-percent-options.patch deleted file mode 100644 index 77dd0ed..0000000 --- a/0007-tc-allow-0-for-percent-options.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 011d598dc86ad94c0560e1eb7921546daf4f81eb Mon Sep 17 00:00:00 2001 -From: Stephen Hemminger -Date: Thu, 17 May 2018 16:20:50 -0700 -Subject: [PATCH] tc: allow 0% for percent options - -Allowing 0% is sometimes useful for example in netem loss and drop -or perhaps dropping all traffic in a HTB bin. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199745 -Reported-by: stuartmarsden@gmail.com -Fixes: 927e3cfb52b5 ("tc: B.W limits can now be specified in %.") -Signed-off-by: Stephen Hemminger -(cherry picked from commit 405e0c4ffe7a410b09201db42955089fb0033776) -Signed-off-by: Phil Sutter ---- - lib/utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/utils.c b/lib/utils.c -index 7d3fe9c91d3df..44ba237e63557 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -103,7 +103,7 @@ int parse_percent(double *val, const char *str) - *val = strtod(str, &p) / 100.; - if (*val == HUGE_VALF || *val == HUGE_VALL) - return 1; -- if (*val == 0.0 || (*p && strcmp(p, "%"))) -+ if (*p && strcmp(p, "%")) - return -1; - - return 0; --- -2.17.0 - diff --git a/iproute.spec b/iproute.spec index 3cba49b..29b9dcc 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.16.0 +Version: 4.17.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -13,13 +13,6 @@ Source2: avpkt # - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links # to tc-cbq.8. Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch -# Suggested backports by Fixes: tag. -Patch2: 0002-rdma-Ignore-unknown-netlink-attributes.patch -Patch3: 0003-bridge-fix-typo-in-hairpin-error-message.patch -Patch4: 0004-utils-Do-not-reset-family-for-default-any-all-addres.patch -Patch5: 0005-iplink_geneve-correct-size-of-message-to-avoid-spuri.patch -Patch6: 0006-ip-do-not-drop-capabilities-if-net_admin-i-is-set.patch -Patch7: 0007-tc-allow-0-for-percent-options.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -165,6 +158,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Jun 12 2018 Phil Sutter - 4.17.0-1 +- New version 4.17.0 + * Fri Jun 01 2018 Phil Sutter - 4.16.0-1 - New version 4.16.0 diff --git a/sources b/sources index f3d3ea6..f6cd723 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.16.0.tar.xz) = a8fbc92665a8d4ca6ee1e894bfb27373cf6b16dac9e2ab3831e418fcc9b895acc7d6fc64efa0b0e37b3affd4ef8eacf4dae5715536138d6a05c65ad49a2becad +SHA512 (iproute2-4.17.0.tar.xz) = ccd7fb70afd58f1fcd4e17c38a24607207da853c4d6118fda423efa6e51faad3ad03c4d6d58a579c40ef9c68aaf13b1c455e12b0c36e155712d3d4db3c2ff4b5 From 84d80eb1b5777b299762565fce0c0089c5acff22 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Sun, 17 Jun 2018 16:55:26 +0530 Subject: [PATCH 031/111] CI: Add ip link kind and set dev tests justification Adds tests according to the CI wiki specifically the standard test interface in the spec. The playbook includes Tier1 level test cases that have been tested in the following contexts and is passing reliably: Classic. Test logs are stored in the artifacts directory. The following steps are used to execute the tests using the standard test interface: Test enveronment Make sure you have installed packages from the spec ``` ansible-2.4.1.0-2.fc28.noarch python2-dnf-2.7.5-1.fc28.noarch libselinux-python-2.7-2.fc28.x86_64 standard-test-roles-2.5-1.fc28.noarch Run tests for Classic Snip of the example test run for Classic tests: ``` ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: iproute-4.15.0-1.fc28.x86_64 :: [ 16:56:03 ] :: [ PASS ] :: Checking for the presence of iproute rpm :: [ 16:56:03 ] :: [ LOG ] :: Package versions: :: [ 16:56:04 ] :: [ LOG ] :: iproute-4.15.0-1.fc28.x86_64 :: [ 16:56:04 ] :: [ BEGIN ] :: Running 'cp ip-link-tests.py /usr/bin' :: [ 16:56:04 ] :: [ PASS ] :: Command 'cp ip-link-tests.py /usr/bin' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Assertions: 2 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:56:04 ] :: [ LOG ] :: ip link tests :: [ 16:56:04 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-link-tests.py' test_add_bond (__main__.IPLinkKindTests) ... ok test_add_bridge (__main__.IPLinkKindTests) ... ok test_add_dummy (__main__.IPLinkKindTests) ... ok test_add_erspan_tunnel (__main__.IPLinkKindTests) ... ok test_add_geneve_tunnel (__main__.IPLinkKindTests) ... ok test_add_gre_tunnel (__main__.IPLinkKindTests) ... ok test_add_gretap_tunnel (__main__.IPLinkKindTests) ... ok test_add_ip6erspan_tunnel (__main__.IPLinkKindTests) ... ok test_add_ip6gre_tunnel (__main__.IPLinkKindTests) ... ok test_add_ip6gretap_tunnel (__main__.IPLinkKindTests) ... ok test_add_ipip_tunnel (__main__.IPLinkKindTests) ... ok test_add_ipvlan (__main__.IPLinkKindTests) ... ok test_add_macsec (__main__.IPLinkKindTests) ... ok test_add_macvlan (__main__.IPLinkKindTests) ... ok test_add_macvtap (__main__.IPLinkKindTests) ... ok test_add_sit_tunnel (__main__.IPLinkKindTests) ... ok test_add_team (__main__.IPLinkKindTests) ... ok test_add_vcan (__main__.IPLinkKindTests) ... ok test_add_veth_pair (__main__.IPLinkKindTests) ... ok test_add_vlan (__main__.IPLinkKindTests) ... ok test_add_vrf (__main__.IPLinkKindTests) ... ok test_add_vti_tunnel (__main__.IPLinkKindTests) ... ok test_add_vxcan (__main__.IPLinkKindTests) ... ok test_add_vxlan (__main__.IPLinkKindTests) ... ok test_set_dev_address (__main__.IPLinkSetDevTests) ... ok test_set_dev_alias (__main__.IPLinkSetDevTests) ... ok test_set_dev_all_multicast (__main__.IPLinkSetDevTests) ... ok test_set_dev_mtu (__main__.IPLinkSetDevTests) ... ok test_set_dev_multicast (__main__.IPLinkSetDevTests) ... ok test_set_dev_name (__main__.IPLinkSetDevTests) ... ok test_set_dev_up_down (__main__.IPLinkSetDevTests) ... ok ---------------------------------------------------------------------- Ran 31 tests in 0.966s OK :: [ 16:56:05 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-link-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Assertions: 1 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:56:05 ] :: [ BEGIN ] :: Running 'rm /usr/bin/ip-link-tests.py' :: [ 16:56:05 ] :: [ PASS ] :: Command 'rm /usr/bin/ip-link-tests.py' (Expected 0, got 0) :: [ 16:56:05 ] :: [ LOG ] :: ip link tests done :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 1 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: TEST PROTOCOL :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Package : iproute Installed : iproute-4.15.0-1.fc28.x86_64 beakerlib RPM : beakerlib-1.17-13.fc28.noarch Test started : 2018-06-17 16:56:03 IST Test finished : 2018-06-17 16:56:05 IST (still running) Test duration : 2 seconds Test name : unknown Distro : Fedora release 28 (Twenty Eight) Hostname : Zeus Architecture : x86_64 CPUs : 8 x Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz RAM size : 31542 MB HDD size : 452.94 GB :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test description :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: PURPOSE of /CoreOS/iproute/Sanity/ip-link-sanity-test Description: Test basic ip link funcionality Author: Susant Sahani :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:56:03 ] :: [ PASS ] :: Checking for the presence of iproute rpm :: [ 16:56:03 ] :: [ LOG ] :: Package versions: :: [ 16:56:04 ] :: [ LOG ] :: iproute-4.15.0-1.fc28.x86_64 :: [ 16:56:04 ] :: [ PASS ] :: Command 'cp ip-link-tests.py /usr/bin' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Assertions: 2 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:56:04 ] :: [ LOG ] :: ip link tests :: [ 16:56:05 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-link-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Assertions: 1 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:56:05 ] :: [ PASS ] :: Command 'rm /usr/bin/ip-link-tests.py' (Expected 0, got 0) :: [ 16:56:05 ] :: [ LOG ] :: ip link tests done :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 1 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: unknown :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:56:05 ] :: [ LOG ] :: JOURNAL XML: /var/tmp/beakerlib-zsCyOCP/journal.xml :: [ 16:56:05 ] :: [ LOG ] :: JOURNAL TXT: /var/tmp/beakerlib-zsCyOCP/journal.txt :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 2s :: Phases: 3 good, 0 bad :: OVERALL RESULT: PASS ``` --- tests/ip-link-sanity-test/Makefile | 47 +++ tests/ip-link-sanity-test/PURPOSE | 3 + tests/ip-link-sanity-test/ip-link-tests.py | 342 +++++++++++++++++++++ tests/ip-link-sanity-test/runtest.sh | 34 ++ tests/tests.yml | 2 + 5 files changed, 428 insertions(+) create mode 100644 tests/ip-link-sanity-test/Makefile create mode 100644 tests/ip-link-sanity-test/PURPOSE create mode 100755 tests/ip-link-sanity-test/ip-link-tests.py create mode 100755 tests/ip-link-sanity-test/runtest.sh diff --git a/tests/ip-link-sanity-test/Makefile b/tests/ip-link-sanity-test/Makefile new file mode 100644 index 0000000..cf63c96 --- /dev/null +++ b/tests/ip-link-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-link-sanity-test +# Description: Test basic ip link funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-link-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip link funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-link-sanity-test/PURPOSE b/tests/ip-link-sanity-test/PURPOSE new file mode 100644 index 0000000..146b66e --- /dev/null +++ b/tests/ip-link-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-link-sanity-test +Description: Test basic ip link funcionality +Author: Susant Sahani diff --git a/tests/ip-link-sanity-test/ip-link-tests.py b/tests/ip-link-sanity-test/ip-link-tests.py new file mode 100755 index 0000000..a13d952 --- /dev/null +++ b/tests/ip-link-sanity-test/ip-link-tests.py @@ -0,0 +1,342 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-link-sanity-test +# Description: Test basic ip link funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def read_attr(self, link, attribute): + """Read a link attributed from the sysfs.""" + + with open(os.path.join('/sys/class/net', link, attribute)) as f: + return f.readline().strip() + + def link_exists(self, link): + + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + +class IPLinkSetDevTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + """ Setup """ + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + self.link_exists('dummy-test') + + def tearDown(self): + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_set_dev_mtu(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'mtu', '9000']) + self.assertEqual('9000', self.read_attr('dummy-test', 'mtu')) + + def test_set_dev_up_down(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'up']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, 'UP,LOWER_UP') + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'down']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertNotRegex(output, 'UP,LOWER_UP') + + def test_set_dev_address(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'address', '02:01:02:03:04:08']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, 'link/ether 02:01:02:03:04:08') + + def test_set_dev_alias(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'alias', 'test-test']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, 'test-test') + + def test_set_dev_name(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'name', 'test-test']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'test-test']).rstrip().decode('utf-8') + self.assertRegex(output, 'test-test') + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'test-test', 'name', 'dummy-test']) + + def test_set_dev_multicast(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'multicast', 'on']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, 'MULTICAST') + + def test_set_dev_all_multicast(self): + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'allmulticast', 'on']) + output=subprocess.check_output(['ip', 'link', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, 'ALLMULTI') + + +class IPLinkKindTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + """ Setup """ + pass + + def tearDown(self): + pass + + def test_add_veth_pair(self): + + subprocess.check_output(['ip', 'link', 'add', 'veth-test', 'type', 'veth', 'peer', 'name', 'veth-peer-test']) + + self.link_exists('veth-test') + self.link_exists('veth-peer-test') + + subprocess.check_output(['ip', 'link', 'del', 'veth-test']) + + def test_add_dummy(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_add_vcan(self): + + subprocess.check_output(['ip', 'link', 'add', 'vcan-test', 'type', 'vcan']) + + self.link_exists('vcan-test') + + subprocess.check_output(['ip', 'link', 'del', 'vcan-test']) + + def test_add_vxcan(self): + + subprocess.check_output(['ip', 'link', 'add', 'vxcan-test', 'type', 'vxcan']) + + self.link_exists('vxcan-test') + + subprocess.check_output(['ip', 'link', 'del', 'vxcan-test']) + + def test_add_vlan(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'name', 'vlantest.100', 'type', 'vlan', 'id', '100']) + + self.link_exists('vlantest.100') + + subprocess.check_output(['ip', 'link', 'del', 'vlantest.100']) + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_add_macvlan(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'macvlan-test', 'type', 'macvlan', 'mode', 'bridge']) + + self.link_exists('macvlan-test') + + subprocess.check_output(['ip', 'link', 'del', 'macvlan-test']) + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_add_macvtap(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'macvtap-test', 'type', 'macvtap', 'mode', 'bridge']) + + self.link_exists('macvtap-test') + + subprocess.check_output(['ip', 'link', 'del', 'macvtap-test']) + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_add_bridge(self): + + subprocess.check_output(['ip', 'link', 'add', 'bridge-test', 'type', 'bridge']) + + self.link_exists('bridge-test') + + subprocess.check_output(['ip', 'link', 'del', 'bridge-test']) + + def test_add_bond(self): + + subprocess.check_output(['ip', 'link', 'add', 'bond-test', 'type', 'bond']) + + self.link_exists('bond-test') + + subprocess.check_output(['ip', 'link', 'del', 'bond-test']) + + def test_add_team(self): + + subprocess.check_output(['ip', 'link', 'add', 'team-test', 'type', 'team']) + + self.link_exists('team-test') + + subprocess.check_output(['ip', 'link', 'del', 'team-test']) + + def test_add_ipip_tunnel(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'test-ipiptun', 'mode', 'ipip', 'remote', '10.3.3.3', 'local', '10.4.4.4', 'ttl' ,'64']) + + self.link_exists('test-ipiptun') + + subprocess.check_output(['ip', 'link', 'del', 'test-ipiptun']) + + def test_add_gre_tunnel(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'test-gretun', 'mode', 'gre', 'remote', '10.3.3.3', 'local', '10.4.4.4', 'ttl' ,'64']) + + self.link_exists('test-gretun') + + subprocess.check_output(['ip', 'link', 'del', 'test-gretun']) + + def test_add_gretap_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'test-gretap', 'type', 'gretap', 'remote', '10.3.3.3', 'local', '10.4.4.4']) + + self.link_exists('test-gretap') + + subprocess.check_output(['ip', 'link', 'del', 'test-gretap']) + + def test_add_ip6gre_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'test-ip6gre', 'type', 'ip6gre', 'remote', '2a00:ffde:4567:edde::4987', 'local', '2001:473:fece:cafe::5179']) + + self.link_exists('test-ip6gre') + + subprocess.check_output(['ip', 'link', 'del', 'test-ip6gre']) + + def test_add_ip6gretap_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'test-ip6gretap', 'type', 'ip6gretap', 'remote', '2a00:ffde:4567:edde::4987', 'local', '2001:473:fece:cafe::5179']) + + self.link_exists('test-ip6gretap') + + subprocess.check_output(['ip', 'link', 'del', 'test-ip6gretap']) + + def test_add_erspan_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'dev', 'test-erspan', 'type', 'erspan', 'seq', 'key', '100','erspan', '123', 'remote', '10.3.3.3', 'local', '10.4.4.4']) + + self.link_exists('test-erspan') + + subprocess.check_output(['ip', 'link', 'del', 'test-erspan']) + + def test_add_ip6erspan_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'dev', 'test-ip6erspan', 'type', 'erspan', 'seq', 'key', '101','erspan', '1234', 'remote', '10.3.3.3', 'local', '10.4.4.4']) + + self.link_exists('test-ip6erspan') + + subprocess.check_output(['ip', 'link', 'del', 'test-ip6erspan']) + + def test_add_sit_tunnel(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'test-sittun', 'mode', 'sit', 'remote', '10.3.3.3', 'local', '10.4.4.4', 'ttl' ,'64']) + + self.link_exists('test-sittun') + + subprocess.check_output(['ip', 'link', 'del', 'test-sittun']) + + def test_add_vti_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'dev', 'test-vtitun', 'type', 'vti', 'remote', '10.3.3.3', 'local', '10.4.4.4']) + + self.link_exists('test-vtitun') + + subprocess.check_output(['ip', 'link', 'del', 'test-vtitun']) + + def test_add_geneve_tunnel(self): + + subprocess.check_output(['ip', 'link', 'add', 'dev', 'test-geneve-tun', 'type', 'geneve', 'remote', '10.3.3.3', 'vni', '1234']) + + self.link_exists('test-geneve-tun') + + subprocess.check_output(['ip', 'link', 'del', 'test-geneve-tun']) + + def test_add_ipvlan(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'name', 'test-ipvlan', 'type', 'ipvlan']) + self.link_exists('test-ipvlan') + subprocess.check_output(['ip', 'link', 'del', 'test-ipvlan']) + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'name', 'test-ipvlan', 'type', 'ipvlan','mode', 'l2', 'bridge']) + self.link_exists('test-ipvlan') + subprocess.check_output(['ip', 'link', 'del', 'test-ipvlan']) + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'name', 'test-ipvlan', 'type', 'ipvlan','mode', 'l2', 'private']) + self.link_exists('test-ipvlan') + subprocess.check_output(['ip', 'link', 'del', 'test-ipvlan']) + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'name', 'test-ipvlan', 'type', 'ipvlan','mode', 'l2', 'vepa']) + self.link_exists('test-ipvlan') + subprocess.check_output(['ip', 'link', 'del', 'test-ipvlan']) + + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_add_vxlan(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'add', 'vxlan-test', 'type', 'vxlan', 'id', '42', 'group', '239.1.1.1', 'dev', 'dummy-test' ,'dstport', '4789']) + self.link_exists('vxlan-test') + + subprocess.check_output(['ip', 'link', 'del', 'vxlan-test']) + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def test_add_vrf(self): + + subprocess.check_output(['ip', 'link', 'add', 'vrf-test', 'type', 'vrf', 'table', '10']) + + self.link_exists('vrf-test') + + subprocess.check_output(['ip', 'link', 'del', 'vrf-test']) + + def test_add_macsec(self): + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'link', 'add', 'link', 'dummy-test', 'test-macsec', 'type', 'macsec']) + + self.link_exists('test-macsec') + + subprocess.check_output(['ip', 'macsec', 'add', 'test-macsec', 'tx', 'sa', '0', 'pn', '1', 'on', 'key', '02', '09876543210987654321098765432109']) + subprocess.check_output(['ip', 'macsec', 'add', 'test-macsec', 'rx', 'address', '56:68:a5:c2:4c:14', 'port', '1']) + subprocess.check_output(['ip', 'macsec', 'add', 'test-macsec', 'rx', 'address', '56:68:a5:c2:4c:14', 'port', '1', 'sa', '0', 'pn', '1', 'on', 'key', '01', '12345678901234567890123456789012']) + + subprocess.check_output(['ip', 'link', 'del', 'test-macsec']) + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-link-sanity-test/runtest.sh b/tests/ip-link-sanity-test/runtest.sh new file mode 100755 index 0000000..65daf1f --- /dev/null +++ b/tests/ip-link-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-link-sanity-test +# Description: Test basic ip link funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-link-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip link tests" + rlRun "/usr/bin/python3 /usr/bin/ip-link-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-link-tests.py" + rlLog "ip link tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index 9231de6..0e30c1e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,6 +10,8 @@ - ip-neigh-sanity-test - ip-rule-sanity-test - bridge-utility + - ip-link-sanity-test required_packages: - iproute - bridge-utils + - python3 From 7ee9aeadb413c52c458425cba8cde527b5c95cd7 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Sun, 24 Jun 2018 18:11:31 +0530 Subject: [PATCH 032/111] CI: Add ip address sanity tests Snip: ``` iproute-4.15.0-1.fc28.x86_64 :: [ 18:10:39 ] :: [ PASS ] :: Checking for the presence of iproute rpm :: [ 18:10:39 ] :: [ PASS ] :: Checking for the presence of iproute rpm :: [ 18:10:39 ] :: [ LOG ] :: Package versions: :: [ 18:10:39 ] :: [ LOG ] :: Package versions: :: [ 18:10:39 ] :: [ LOG ] :: iproute-4.15.0-1.fc28.x86_64 :: [ 18:10:39 ] :: [ LOG ] :: iproute-4.15.0-1.fc28.x86_64 :: [ 18:10:39 ] :: [ BEGIN ] :: Running 'cp ip-address-tests.py /usr/bin' :: [ 18:10:39 ] :: [ PASS ] :: Command 'cp ip-address-tests.py /usr/bin' (Expected 0, got 0) :: [ 18:10:39 ] :: [ PASS ] :: Command 'cp ip-address-tests.py /usr/bin' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 2 good, 0 bad :: Assertions: 2 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 18:10:39 ] :: [ LOG ] :: ip address tests :: [ 18:10:39 ] :: [ LOG ] :: ip address tests :: [ 18:10:39 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-address-tests.py' test_add_address (__main__.IPAddressTests) ... ok test_add_address_lifetime (__main__.IPAddressTests) ... ok test_add_address_scope (__main__.IPAddressTests) ... ok test_add_broadcast_address_label (__main__.IPAddressTests) ... ok test_add_ipv6_address (__main__.IPAddressTests) ... ok test_del_address (__main__.IPAddressTests) ... ok ---------------------------------------------------------------------- Ran 6 tests in 0.136s OK :: [ 18:10:39 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-address-tests.py' (Expected 0, got 0) :: [ 18:10:39 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-address-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Duration: 1s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 18:10:40 ] :: [ BEGIN ] :: Running 'rm /usr/bin/ip-address-tests.py' :: [ 18:10:40 ] :: [ PASS ] :: Command 'rm /usr/bin/ip-address-tests.py' (Expected 0, got 0) :: [ 18:10:40 ] :: [ PASS ] :: Command 'rm /usr/bin/ip-address-tests.py' (Expected 0, got 0) :: [ 18:10:40 ] :: [ LOG ] :: ip address tests done :: [ 18:10:40 ] :: [ LOG ] :: ip address tests done :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS ``` --- tests/ip-address-sanity-test/Makefile | 47 ++++++++ tests/ip-address-sanity-test/PURPOSE | 3 + .../ip-address-tests.py | 109 ++++++++++++++++++ tests/ip-address-sanity-test/runtest.sh | 34 ++++++ tests/tests.yml | 1 + 5 files changed, 194 insertions(+) create mode 100644 tests/ip-address-sanity-test/Makefile create mode 100644 tests/ip-address-sanity-test/PURPOSE create mode 100755 tests/ip-address-sanity-test/ip-address-tests.py create mode 100755 tests/ip-address-sanity-test/runtest.sh diff --git a/tests/ip-address-sanity-test/Makefile b/tests/ip-address-sanity-test/Makefile new file mode 100644 index 0000000..d43d21d --- /dev/null +++ b/tests/ip-address-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-address-sanity-test +# Description: Test basic ip address funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-address-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip address funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-address-sanity-test/PURPOSE b/tests/ip-address-sanity-test/PURPOSE new file mode 100644 index 0000000..bcd1d83 --- /dev/null +++ b/tests/ip-address-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-address-sanity-test +Description: Test basic ip address funcionality +Author: Susant Sahani diff --git a/tests/ip-address-sanity-test/ip-address-tests.py b/tests/ip-address-sanity-test/ip-address-tests.py new file mode 100755 index 0000000..4b43b32 --- /dev/null +++ b/tests/ip-address-sanity-test/ip-address-tests.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-address-sanity-test +# Description: Test basic ip address funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_dummy(self): + """ Setup """ + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + self.link_exists('dummy-test') + + def del_dummy(self): + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + +class IPAddressTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_dummy() + + def tearDown(self): + self.del_dummy() + + def test_add_address(self): + + r = subprocess.call("ip address add 192.168.1.200/24 dev dummy-test", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, "192.168.1.200") + + def test_add_broadcast_address_label(self): + + r = subprocess.call("ip addr add 192.168.1.50/24 brd + dev dummy-test label dummy-test-Home", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, "192.168.1.50") + self.assertRegex(output, "192.168.1.255") + self.assertRegex(output, "dummy-test-Home") + + def test_del_address(self): + + r = subprocess.call("ip address add 192.168.1.200/24 dev dummy-test", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, "192.168.1.200") + + r = subprocess.call("ip address del 192.168.1.200/24 dev dummy-test", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertNotRegex(output, "192.168.1.200") + + def test_add_address_scope(self): + + r = subprocess.call("ip address add 192.168.1.200/24 dev dummy-test scope host", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, "192.168.1.200") + self.assertRegex(output, "host") + + def test_add_address_lifetime(self): + + r = subprocess.call("ip address add 192.168.1.200/24 dev dummy-test valid_lft 1000 preferred_lft 500", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, "192.168.1.200") + self.assertRegex(output, "1000sec") + self.assertRegex(output, "500sec") + + def test_add_ipv6_address(self): + + r = subprocess.call("ip -6 addr add 2001:0db8:0:f101::1/64 dev dummy-test", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'address', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + self.assertRegex(output, "2001:db8:0:f101::1") + + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-address-sanity-test/runtest.sh b/tests/ip-address-sanity-test/runtest.sh new file mode 100755 index 0000000..d95de6d --- /dev/null +++ b/tests/ip-address-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-address-sanity-test +# Description: Test basic ip address funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-address-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip address tests" + rlRun "/usr/bin/python3 /usr/bin/ip-address-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-address-tests.py" + rlLog "ip address tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index 0e30c1e..d2cc96e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -11,6 +11,7 @@ - ip-rule-sanity-test - bridge-utility - ip-link-sanity-test + - ip-address-sanity-test required_packages: - iproute - bridge-utils From 2cbf771e76ff179cd953582be9bc825ebd044802 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 05:48:27 +0000 Subject: [PATCH 033/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 29b9dcc..e7c89f8 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.17.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -158,6 +158,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 4.17.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Tue Jun 12 2018 Phil Sutter - 4.17.0-1 - New version 4.17.0 From c0b9f8a2e03633b9da38c314b6e004f253720ce3 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 18 Jul 2018 11:23:40 +0200 Subject: [PATCH 034/111] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- iproute.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/iproute.spec b/iproute.spec index e7c89f8..3cc1af8 100644 --- a/iproute.spec +++ b/iproute.spec @@ -15,6 +15,7 @@ Source2: avpkt Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch License: GPLv2+ and Public Domain +BuildRequires: gcc BuildRequires: bison BuildRequires: elfutils-libelf-devel BuildRequires: flex From fd68e09fe1809ea74e05bf019efec72b58897c2d Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Mon, 23 Jul 2018 18:27:17 +0530 Subject: [PATCH 035/111] CI: Add ip addrlabel to test Sample Run ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 17:56:55 ] :: [ LOG ] :: ip address label tests :: [ 17:56:55 ] :: [ LOG ] :: ip address label tests :: [ 17:56:55 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-address-label-tests.py' test_add_address_label (__main__.IPAddressLabelTests) ... prefix ::1/128 label 0 prefix ::/96 label 3 prefix ::ffff:0.0.0.0/96 label 4 prefix 2001:6f8:12d8:2::/64 dev if14 label 200 prefix 2001:6f8:900:8cbc::/64 dev if14 label 300 prefix 2001:4dd0:ff00:834::/64 dev if14 label 200 prefix 2a01:238:423d:8800::/64 dev if14 label 300 prefix 2001:4dd0:ff00:834::/64 dev if14 label 200 prefix 2a01:238:423d:8800::/64 dev if14 label 300 prefix 2a01:238:423d:8800::/64 label 300 prefix 2001:4dd0:ff00:834::/64 label 200 prefix 2001:6f8:900:8cbc::/64 label 300 prefix 2001:6f8:12d8:2::/64 label 200 prefix 2001::/32 label 6 prefix 2001:10::/28 label 7 prefix 3ffe::/16 label 12 prefix 2002::/16 label 2 prefix fec0::/10 label 11 prefix fc00::/7 label 5 prefix ::/0 label 1 ok test_add_address_label_dev (__main__.IPAddressLabelTests) ... prefix ::1/128 label 0 prefix ::/96 label 3 prefix ::ffff:0.0.0.0/96 label 4 prefix 2001:6f8:12d8:2::/64 dev if14 label 200 prefix 2001:6f8:900:8cbc::/64 dev if14 label 300 prefix 2001:4dd0:ff00:834::/64 dev if14 label 200 prefix 2a01:238:423d:8800::/64 dev if14 label 300 prefix 2001:6f8:12d8:2::/64 dev dummy-test label 200 prefix 2001:6f8:900:8cbc::/64 dev dummy-test label 300 prefix 2001:4dd0:ff00:834::/64 dev dummy-test label 200 prefix 2a01:238:423d:8800::/64 dev dummy-test label 300 prefix 2001::/32 label 6 prefix 2001:10::/28 label 7 prefix 3ffe::/16 label 12 prefix 2002::/16 label 2 prefix fec0::/10 label 11 prefix fc00::/7 label 5 prefix ::/0 label 1 ok ---------------------------------------------------------------------- Ran 2 tests in 0.077s OK ``` --- tests/ip-address-label-sanity-test/Makefile | 47 ++++++++++ tests/ip-address-label-sanity-test/PURPOSE | 3 + .../ip-address-label-tests.py | 89 +++++++++++++++++++ tests/ip-address-label-sanity-test/runtest.sh | 34 +++++++ tests/tests.yml | 1 + 5 files changed, 174 insertions(+) create mode 100644 tests/ip-address-label-sanity-test/Makefile create mode 100644 tests/ip-address-label-sanity-test/PURPOSE create mode 100755 tests/ip-address-label-sanity-test/ip-address-label-tests.py create mode 100755 tests/ip-address-label-sanity-test/runtest.sh diff --git a/tests/ip-address-label-sanity-test/Makefile b/tests/ip-address-label-sanity-test/Makefile new file mode 100644 index 0000000..612fadb --- /dev/null +++ b/tests/ip-address-label-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-address-label-sanity-test +# Description: Test basic ip address label funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-address-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip address label funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-address-label-sanity-test/PURPOSE b/tests/ip-address-label-sanity-test/PURPOSE new file mode 100644 index 0000000..d6db326 --- /dev/null +++ b/tests/ip-address-label-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-address-label-sanity-test +Description: Test basic ip address label funcionality +Author: Susant Sahani diff --git a/tests/ip-address-label-sanity-test/ip-address-label-tests.py b/tests/ip-address-label-sanity-test/ip-address-label-tests.py new file mode 100755 index 0000000..69557f1 --- /dev/null +++ b/tests/ip-address-label-sanity-test/ip-address-label-tests.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-address-label-sanity-test +# Description: Test basic ip addrlabel funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_dummy(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + self.link_exists('dummy-test') + + def del_dummy(self): + + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + +class IPAddressLabelTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_dummy() + self.link_exists('dummy-test') + + def tearDown(self): + self.del_dummy() + + def test_add_address_label(self): + + subprocess.call("ip addrlabel add prefix 2001:6f8:12d8:2::/64 label 200", shell=True) + subprocess.call("ip addrlabel add prefix 2001:6f8:900:8cbc::/64 label 300", shell=True) + subprocess.call("ip addrlabel add prefix 2001:4dd0:ff00:834::/64 label 200", shell=True) + subprocess.call("ip addrlabel add prefix 2a01:238:423d:8800::/64 label 300", shell=True) + + output=subprocess.check_output(['ip', 'addrlabel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "prefix 2001:6f8:12d8:2::/64 label 200") + self.assertRegex(output, "prefix 2001:6f8:900:8cbc::/64 label 300") + self.assertRegex(output, "prefix 2001:4dd0:ff00:834::/64 label 200") + self.assertRegex(output, "prefix 2a01:238:423d:8800::/64 label 300") + + subprocess.call("ip addrlabel del prefix 2001:6f8:12d8:2::/64 label 200", shell=True) + subprocess.call("ip addrlabel del prefix 2001:6f8:900:8cbc::/64 label 300", shell=True) + subprocess.call("ip addrlabel del prefix 2001:4dd0:ff00:834::/64 label 200", shell=True) + subprocess.call("ip addrlabel del prefix 2a01:238:423d:8800::/64 label 300", shell=True) + + def test_add_address_label_dev(self): + + subprocess.call("ip addrlabel add prefix 2001:6f8:12d8:2::/64 label 200 dev dummy-test", shell=True) + subprocess.call("ip addrlabel add prefix 2001:6f8:900:8cbc::/64 label 300 dev dummy-test", shell=True) + subprocess.call("ip addrlabel add prefix 2001:4dd0:ff00:834::/64 label 200 dev dummy-test", shell=True) + subprocess.call("ip addrlabel add prefix 2a01:238:423d:8800::/64 label 300 dev dummy-test", shell=True) + + output=subprocess.check_output(['ip', 'addrlabel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "prefix 2001:6f8:12d8:2::/64 dev dummy-test label 200") + self.assertRegex(output, "prefix 2001:6f8:900:8cbc::/64 dev dummy-test label 300") + self.assertRegex(output, "prefix 2001:4dd0:ff00:834::/64 dev dummy-test label 200") + self.assertRegex(output, "prefix 2a01:238:423d:8800::/64 dev dummy-test label 300") + + subprocess.call("ip addrlabel del prefix 2001:6f8:12d8:2::/64 label 200 dev dummy-test", shell=True) + subprocess.call("ip addrlabel del prefix 2001:6f8:900:8cbc::/64 label 300 dev dummy-test", shell=True) + subprocess.call("ip addrlabel del prefix 2001:4dd0:ff00:834::/64 label 200 dev dummy-test", shell=True) + subprocess.call("ip addrlabel del prefix 2a01:238:423d:8800::/64 label 300 dev dummy-test", shell=True) + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-address-label-sanity-test/runtest.sh b/tests/ip-address-label-sanity-test/runtest.sh new file mode 100755 index 0000000..ee04d3c --- /dev/null +++ b/tests/ip-address-label-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-address-label-sanity-test +# Description: Test basic ip address label funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-address-label-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip address label tests" + rlRun "/usr/bin/python3 /usr/bin/ip-address-label-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-address-label-tests.py" + rlLog "ip address label tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index d2cc96e..db17319 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -12,6 +12,7 @@ - bridge-utility - ip-link-sanity-test - ip-address-sanity-test + - ip-address-label-sanity-test required_packages: - iproute - bridge-utils From d4c9cc3ea7b948e53d89430c7bc97a779fc66d1c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 24 Jul 2018 16:46:02 +0530 Subject: [PATCH 036/111] CI: Add FOU to test. Sample run ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 21:17:51 ] :: [ LOG ] :: ip fou tests :: [ 21:17:51 ] :: [ LOG ] :: ip fou tests :: [ 21:17:51 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-fou-tests.py' test_configure_fou_receive_port_gre (__main__.IPFOUTests) Configure a FOU receive port for GRE bound to 7777 ... port 7777 ipproto 47 ok test_configure_fou_receive_port_gue (__main__.IPFOUTests) Configure a GUE receive port bound to 9999 ... port 9999 gue ok test_configure_fou_receive_port_ipip (__main__.IPFOUTests) Configure a FOU receive port for IPIP bound to 8888 ... port 8888 ipproto 4 ok test_configure_fou_with_ipip (__main__.IPFOUTests) IP over UDP tunnel ... port 9000 ipproto 4 ok ---------------------------------------------------------------------- Ran 4 tests in 0.048s OK ``` --- tests/ip-fou-sanity-test/Makefile | 47 +++++++++++++++ tests/ip-fou-sanity-test/PURPOSE | 3 + tests/ip-fou-sanity-test/ip-fou-tests.py | 74 ++++++++++++++++++++++++ tests/ip-fou-sanity-test/runtest.sh | 35 +++++++++++ tests/tests.yml | 1 + 5 files changed, 160 insertions(+) create mode 100644 tests/ip-fou-sanity-test/Makefile create mode 100644 tests/ip-fou-sanity-test/PURPOSE create mode 100755 tests/ip-fou-sanity-test/ip-fou-tests.py create mode 100755 tests/ip-fou-sanity-test/runtest.sh diff --git a/tests/ip-fou-sanity-test/Makefile b/tests/ip-fou-sanity-test/Makefile new file mode 100644 index 0000000..b5985b2 --- /dev/null +++ b/tests/ip-fou-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-fou-sanity-test +# Description: Test basic ip fou funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-address-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip fou funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-fou-sanity-test/PURPOSE b/tests/ip-fou-sanity-test/PURPOSE new file mode 100644 index 0000000..d62d2ff --- /dev/null +++ b/tests/ip-fou-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-fou-sanity-test +Description: Test basic ip fou funcionality +Author: Susant Sahani diff --git a/tests/ip-fou-sanity-test/ip-fou-tests.py b/tests/ip-fou-sanity-test/ip-fou-tests.py new file mode 100755 index 0000000..b72b45f --- /dev/null +++ b/tests/ip-fou-sanity-test/ip-fou-tests.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-fou-sanity-test +# Description: Test basic ip fou funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPFOUTests(unittest.TestCase): + + def test_configure_fou_receive_port_gre(self): + ''' Configure a FOU receive port for GRE bound to 7777''' + + subprocess.call(" ip fou add port 7777 ipproto 47", shell=True) + output=subprocess.check_output(['ip', 'fou', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "port 7777 ipproto 47") + + subprocess.call("ip fou del port 7777", shell=True) + + def test_configure_fou_receive_port_ipip(self): + ''' Configure a FOU receive port for IPIP bound to 8888''' + + subprocess.call("ip fou add port 8888 ipproto 4", shell=True) + output=subprocess.check_output(['ip', 'fou', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "port 8888 ipproto 4") + + subprocess.call("ip fou del port 8888", shell=True) + + def test_configure_fou_receive_port_gue(self): + ''' Configure a GUE receive port bound to 9999 ''' + + subprocess.call("ip fou add port 9999 gue", shell=True) + output=subprocess.check_output(['ip', 'fou', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "port 9999 gue") + + subprocess.call("ip fou del port 9999", shell=True) + + def test_configure_fou_with_ipip(self): + ''' IP over UDP tunnel ''' + + subprocess.call("ip fou add port 9000 ipproto 4", shell=True) + output=subprocess.check_output(['ip', 'fou', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "port 9000 ipproto 4") + + subprocess.call("ip link add name tunudp type ipip remote 192.168.2.2 local 192.168.2.1 ttl 225 encap fou encap-sport auto encap-dport 9000", shell=True) + output=subprocess.check_output(['ip', '-d', 'link', 'show', 'tunudp']).rstrip().decode('utf-8') + self.assertRegex(output, "encap fou") + + subprocess.call("ip link del tunudp", shell=True) + subprocess.call("ip fou del port 9000", shell=True) + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-fou-sanity-test/runtest.sh b/tests/ip-fou-sanity-test/runtest.sh new file mode 100755 index 0000000..77123b7 --- /dev/null +++ b/tests/ip-fou-sanity-test/runtest.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-fou-sanity-test +# Description: Test basic ip address label funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "modprobe fou" + rlRun "cp ip-fou-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip fou tests" + rlRun "/usr/bin/python3 /usr/bin/ip-fou-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-fou-tests.py" + rlLog "ip fou tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index db17319..2ccffac 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -13,6 +13,7 @@ - ip-link-sanity-test - ip-address-sanity-test - ip-address-label-sanity-test + - ip-fou-sanity-test required_packages: - iproute - bridge-utils From 1abbe5eb833cd624ea81ceb16ffb992a38a8648b Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 24 Jul 2018 16:56:27 +0530 Subject: [PATCH 037/111] CI: Add ip token to test Sample Run ``` ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: iproute-4.16.0-1.fc28.x86_64 :: [ 16:55:06 ] :: [ PASS ] :: Checking for the presence of iproute rpm :: [ 16:55:06 ] :: [ LOG ] :: Package versions: :: [ 16:55:06 ] :: [ LOG ] :: iproute-4.16.0-1.fc28.x86_64 :: [ 16:55:06 ] :: [ BEGIN ] :: Running 'cp ip-token-tests.py /usr/bin' :: [ 16:55:06 ] :: [ PASS ] :: Command 'cp ip-token-tests.py /usr/bin' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 2 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 16:55:07 ] :: [ LOG ] :: ip token tests :: [ 16:55:07 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-token-tests.py' test_add_token (__main__.IPTokenTests) ... token ::1a:2b:3c:4d dev veth-test ok ---------------------------------------------------------------------- Ran 1 test in 0.029s OK :: [ 16:55:07 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-token-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Assertions: 1 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ``` --- tests/ip-token-sanity-test/Makefile | 47 ++++++++++++++++ tests/ip-token-sanity-test/PURPOSE | 3 + tests/ip-token-sanity-test/ip-token-tests.py | 59 ++++++++++++++++++++ tests/ip-token-sanity-test/runtest.sh | 34 +++++++++++ tests/tests.yml | 1 + 5 files changed, 144 insertions(+) create mode 100644 tests/ip-token-sanity-test/Makefile create mode 100644 tests/ip-token-sanity-test/PURPOSE create mode 100755 tests/ip-token-sanity-test/ip-token-tests.py create mode 100755 tests/ip-token-sanity-test/runtest.sh diff --git a/tests/ip-token-sanity-test/Makefile b/tests/ip-token-sanity-test/Makefile new file mode 100644 index 0000000..ac08865 --- /dev/null +++ b/tests/ip-token-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-token-sanity-test +# Description: Test basic ip token funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-token-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip token funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-token-sanity-test/PURPOSE b/tests/ip-token-sanity-test/PURPOSE new file mode 100644 index 0000000..21b7c1d --- /dev/null +++ b/tests/ip-token-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-token-sanity-test +Description: Test basic ip token funcionality +Author: Susant Sahani diff --git a/tests/ip-token-sanity-test/ip-token-tests.py b/tests/ip-token-sanity-test/ip-token-tests.py new file mode 100755 index 0000000..138168b --- /dev/null +++ b/tests/ip-token-sanity-test/ip-token-tests.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-token-sanity-test +# Description: Test basic ip token funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_veth(self): + subprocess.check_output(['ip', 'link', 'add', 'veth-test', 'type', 'veth', 'peer', 'name', 'test-peer']) + + def del_veth(self): + subprocess.check_output(['ip', 'link', 'del', 'veth-test']) + +class IPTokenTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_veth() + self.link_exists('veth-test') + + def tearDown(self): + self.del_veth() + + def test_add_token(self): + + r = subprocess.call("ip token set ::1a:2b:3c:4d/64 dev veth-test", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'token', 'get', 'dev', 'veth-test']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "token ::1a:2b:3c:4d dev veth-test") + + r = subprocess.call("ip token del ::1a:2b:3c:4d/64 dev veth-test", shell=True) + self.assertEqual(r, 0) + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-token-sanity-test/runtest.sh b/tests/ip-token-sanity-test/runtest.sh new file mode 100755 index 0000000..82a0ab5 --- /dev/null +++ b/tests/ip-token-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-token-sanity-test +# Description: Test basic ip token funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-token-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip token tests" + rlRun "/usr/bin/python3 /usr/bin/ip-token-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-token-tests.py" + rlLog "ip token tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index 2ccffac..a18191f 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -14,6 +14,7 @@ - ip-address-sanity-test - ip-address-label-sanity-test - ip-fou-sanity-test + - ip-token-sanity-test required_packages: - iproute - bridge-utils From 5c4250bd81dde5d5ef160c70d034c5abd4f45528 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 24 Jul 2018 17:14:59 +0530 Subject: [PATCH 038/111] CI: Add tuntap to test Sample run ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 17:14:21 ] :: [ LOG ] :: ip tuntap tests :: [ 17:14:21 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-tuntap-tests.py' test_add_tap (__main__.IPTuntapTests) ... fopen /sys/class/net/ip6gre0/tun_flags: No such file or directory fopen /sys/class/net/wlan0/tun_flags: No such file or directory ok ok test_add_tun_user_group (__main__.IPTuntapTests) ... fopen /sys/class/net/ip6gre0/tun_flags: No such file or directory ok ---------------------------------------------------------------------- Ran 3 tests in 0.049s OK :: [ 17:14:21 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-tuntap-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 1 good, 0 bad :: RESULT: PASS ``` --- tests/ip-tuntap-sanity-test/Makefile | 47 ++++++++++++++ tests/ip-tuntap-sanity-test/PURPOSE | 3 + .../ip-tuntap-sanity-test/ip-tuntap-tests.py | 65 +++++++++++++++++++ tests/ip-tuntap-sanity-test/runtest.sh | 34 ++++++++++ tests/tests.yml | 1 + 5 files changed, 150 insertions(+) create mode 100644 tests/ip-tuntap-sanity-test/Makefile create mode 100644 tests/ip-tuntap-sanity-test/PURPOSE create mode 100755 tests/ip-tuntap-sanity-test/ip-tuntap-tests.py create mode 100755 tests/ip-tuntap-sanity-test/runtest.sh diff --git a/tests/ip-tuntap-sanity-test/Makefile b/tests/ip-tuntap-sanity-test/Makefile new file mode 100644 index 0000000..5f35f52 --- /dev/null +++ b/tests/ip-tuntap-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-tuntap-sanity-test +# Description: Test basic ip tuntap funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-tuntap-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip tuntap funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-tuntap-sanity-test/PURPOSE b/tests/ip-tuntap-sanity-test/PURPOSE new file mode 100644 index 0000000..7c6223a --- /dev/null +++ b/tests/ip-tuntap-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-tuntap-sanity-test +Description: Test basic ip tuntap funcionality +Author: Susant Sahani diff --git a/tests/ip-tuntap-sanity-test/ip-tuntap-tests.py b/tests/ip-tuntap-sanity-test/ip-tuntap-tests.py new file mode 100755 index 0000000..9f59a9f --- /dev/null +++ b/tests/ip-tuntap-sanity-test/ip-tuntap-tests.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-tuntap-sanity-test +# Description: Test basic ip tuntap funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + +class IPTuntapTests(unittest.TestCase, IPLinkUtilities): + + def test_add_tap(self): + + subprocess.check_output(['ip', 'tuntap', 'add', 'name', 'tap-test', 'mode', 'tap']) + self.link_exists('tap-test') + + output=subprocess.check_output(['ip', 'tuntap', 'show', 'dev', 'tap-test']).rstrip().decode('utf-8') + self.assertRegex(output, "tap-test: tap") + + subprocess.check_output(['ip', 'link', 'del', 'tap-test']) + + def test_add_tun(self): + + subprocess.check_output(['ip', 'tuntap', 'add', 'name', 'tun-test', 'mode', 'tun']) + self.link_exists('tun-test') + + output=subprocess.check_output(['ip', 'tuntap', 'show', 'dev', 'tun-test']).rstrip().decode('utf-8') + self.assertRegex(output, "tun-test: tun") + + subprocess.check_output(['ip', 'link', 'del', 'tun-test']) + + def test_add_tun_user_group(self): + + subprocess.check_output(['ip', 'tuntap', 'add', 'name', 'tun-test', 'mode', 'tun', 'user', 'root', 'group', 'root']) + self.link_exists('tun-test') + + output=subprocess.check_output(['ip', 'tuntap', 'show', 'dev', 'tun-test']).rstrip().decode('utf-8') + self.assertRegex(output, "tun-test: tun") + self.assertRegex(output, "user 0 group 0") + + subprocess.check_output(['ip', 'link', 'del', 'tun-test']) + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-tuntap-sanity-test/runtest.sh b/tests/ip-tuntap-sanity-test/runtest.sh new file mode 100755 index 0000000..00bfe05 --- /dev/null +++ b/tests/ip-tuntap-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-tuntap-sanity-test +# Description: Test basic ip tuntap funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-tuntap-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip tuntap tests" + rlRun "/usr/bin/python3 /usr/bin/ip-tuntap-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-tuntap-tests.py" + rlLog "ip tuntap tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index a18191f..8c27973 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -15,6 +15,7 @@ - ip-address-label-sanity-test - ip-fou-sanity-test - ip-token-sanity-test + - ip-tuntap-sanity-test required_packages: - iproute - bridge-utils From 73cd43c0ee2e7d65c401ebf53fcfe71f9013161c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 24 Jul 2018 17:41:29 +0530 Subject: [PATCH 039/111] CI: Add ip tunnel to test Sample run ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 17:39:52 ] :: [ LOG ] :: ip tunnel tests :: [ 17:39:52 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-tunnel-tests.py' test_add_gre (__main__.IPTunnelTests) ... sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16 ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0 gre0: gre/ip remote any local any ttl inherit nopmtudisc tunl0: any/ip remote any local any ttl inherit nopmtudisc gretun-test: gre/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64 ok test_add_ipip (__main__.IPTunnelTests) ... sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16 ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0 gre0: gre/ip remote any local any ttl inherit nopmtudisc tunl0: any/ip remote any local any ttl inherit nopmtudisc ipiptun-test: ip/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64 ok test_add_isatap (__main__.IPTunnelTests) ... sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16 ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0 gre0: gre/ip remote any local any ttl inherit nopmtudisc tunl0: any/ip remote any local any ttl inherit nopmtudisc isatap-test: ipv6/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64 6rd-prefix 2002::/16 ok test_add_sit (__main__.IPTunnelTests) ... sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16 ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0 gre0: gre/ip remote any local any ttl inherit nopmtudisc tunl0: any/ip remote any local any ttl inherit nopmtudisc sittun-test: ipv6/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64 6rd-prefix 2002::/16 ok test_add_vti (__main__.IPTunnelTests) ... sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16 ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0 gre0: gre/ip remote any local any ttl inherit nopmtudisc tunl0: any/ip remote any local any ttl inherit nopmtudisc vti-test: ipv6/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64 6rd-prefix 2002::/16 ok ---------------------------------------------------------------------- Ran 5 tests in 0.197s OK ``` --- tests/ip-tunnel-sanity-test/Makefile | 47 ++++++++ tests/ip-tunnel-sanity-test/PURPOSE | 3 + .../ip-tunnel-sanity-test/ip-tunnel-tests.py | 104 ++++++++++++++++++ tests/ip-tunnel-sanity-test/runtest.sh | 34 ++++++ tests/tests.yml | 1 + 5 files changed, 189 insertions(+) create mode 100644 tests/ip-tunnel-sanity-test/Makefile create mode 100644 tests/ip-tunnel-sanity-test/PURPOSE create mode 100755 tests/ip-tunnel-sanity-test/ip-tunnel-tests.py create mode 100755 tests/ip-tunnel-sanity-test/runtest.sh diff --git a/tests/ip-tunnel-sanity-test/Makefile b/tests/ip-tunnel-sanity-test/Makefile new file mode 100644 index 0000000..cffa119 --- /dev/null +++ b/tests/ip-tunnel-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-tunnel-sanity-test +# Description: Test basic ip tunnel funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-tunnel-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip tunnel funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-tunnel-sanity-test/PURPOSE b/tests/ip-tunnel-sanity-test/PURPOSE new file mode 100644 index 0000000..0b8f618 --- /dev/null +++ b/tests/ip-tunnel-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-tunnel-sanity-test +Description: Test basic ip tunnel funcionality +Author: Susant Sahani diff --git a/tests/ip-tunnel-sanity-test/ip-tunnel-tests.py b/tests/ip-tunnel-sanity-test/ip-tunnel-tests.py new file mode 100755 index 0000000..58b7641 --- /dev/null +++ b/tests/ip-tunnel-sanity-test/ip-tunnel-tests.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-tunnel-sanity-test +# Description: Test basic ip tunnel funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def add_dummy(self): + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + self.link_exists('dummy-test') + + def del_dummy(self): + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + + def link_exists(self, link): + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + +class IPTunnelTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_dummy() + self.link_exists('dummy-test') + + def tearDown(self): + self.del_dummy() + + def test_add_ipip(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'ipiptun-test', 'mode', 'ipip', 'local', '10.3.3.3', 'remote', '10.4.4.4', 'ttl', '64', 'dev', 'dummy-test']) + self.link_exists('ipiptun-test') + + output=subprocess.check_output(['ip', 'tunnel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "ipiptun-test: ip/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64") + + subprocess.check_output(['ip', 'link', 'del', 'ipiptun-test']) + + def test_add_gre(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'gretun-test', 'mode', 'gre', 'local', '10.3.3.3', 'remote', '10.4.4.4', 'ttl', '64', 'dev', 'dummy-test']) + self.link_exists('gretun-test') + + output=subprocess.check_output(['ip', 'tunnel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "gretun-test: gre/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64") + + subprocess.check_output(['ip', 'link', 'del', 'gretun-test']) + + def test_add_sit(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'sittun-test', 'mode', 'sit', 'local', '10.3.3.3', 'remote', '10.4.4.4', 'ttl', '64', 'dev', 'dummy-test']) + self.link_exists('sittun-test') + + output=subprocess.check_output(['ip', 'tunnel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "sittun-test: ipv6/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64") + + subprocess.check_output(['ip', 'link', 'del', 'sittun-test']) + + def test_add_isatap(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'isatap-test', 'mode', 'sit', 'local', '10.3.3.3', 'remote', '10.4.4.4', 'ttl', '64', 'dev', 'dummy-test']) + self.link_exists('isatap-test') + + output=subprocess.check_output(['ip', 'tunnel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "isatap-test: ipv6/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64") + + subprocess.check_output(['ip', 'link', 'del', 'isatap-test']) + + def test_add_vti(self): + + subprocess.check_output(['ip', 'tunnel', 'add', 'vti-test', 'mode', 'sit', 'local', '10.3.3.3', 'remote', '10.4.4.4', 'ttl', '64', 'dev', 'dummy-test']) + self.link_exists('vti-test') + + output=subprocess.check_output(['ip', 'tunnel']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "vti-test: ipv6/ip remote 10.4.4.4 local 10.3.3.3 dev dummy-test ttl 64") + + subprocess.check_output(['ip', 'link', 'del', 'vti-test']) + + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-tunnel-sanity-test/runtest.sh b/tests/ip-tunnel-sanity-test/runtest.sh new file mode 100755 index 0000000..58a154d --- /dev/null +++ b/tests/ip-tunnel-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-tunnel-sanity-test +# Description: Test basic ip tunnel funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-tunnel-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip tunnel tests" + rlRun "/usr/bin/python3 /usr/bin/ip-tunnel-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-tunnel-tests.py" + rlLog "ip tunnel tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index 8c27973..8e03214 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -16,6 +16,7 @@ - ip-fou-sanity-test - ip-token-sanity-test - ip-tuntap-sanity-test + - ip-tunnel-sanity-test required_packages: - iproute - bridge-utils From e3e7ca1187b3ccfaf85a8c3107902fdb6303c8ce Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Mon, 30 Jul 2018 15:22:04 +0530 Subject: [PATCH 040/111] CI: Add l2tp to test Sample run ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 15:21:16 ] :: [ LOG ] :: ip l2tp tests :: [ 15:21:16 ] :: [ LOG ] :: ip l2tp tests :: [ 15:21:16 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-l2tp-tests.py' test_add_l2tp_add_tunnel (__main__.IPL2tpTests) ... Tunnel 3000, encap UDP From 192.168.11.12 to 192.168.11.13 Peer tunnel 4000 UDP source / dest ports: 5000/6000 UDP checksum: disabled ok test_add_l2tp_add_tunnel_session (__main__.IPL2tpTests) ... Tunnel 3000, encap UDP From 192.168.11.12 to 192.168.11.13 Peer tunnel 4000 UDP source / dest ports: 5000/6000 UDP checksum: disabled Session 1000 in tunnel 3000 Peer session 2000, tunnel 4000 interface name: l2tpeth0 offset 0, peer offset 0 ok test_setup_l2tp (__main__.IPL2tpTests) ... Tunnel 3000, encap UDP From 192.168.11.12 to 192.168.11.13 Peer tunnel 4000 UDP source / dest ports: 5000/6000 UDP checksum: disabled Session 1000 in tunnel 3000 Peer session 2000, tunnel 4000 interface name: l2tpeth0 offset 0, peer offset 0 Tunnel 4000, encap UDP From 192.168.11.13 to 192.168.11.12 Peer tunnel 3000 UDP source / dest ports: 6000/5000 UDP checksum: disabled Tunnel 3000, encap UDP From 192.168.11.12 to 192.168.11.13 Peer tunnel 4000 UDP source / dest ports: 5000/6000 UDP checksum: disabled Session 2000 in tunnel 4000 Peer session 1000, tunnel 3000 interface name: l2tpeth1 offset 0, peer offset 0 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp0s31f6: mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000 link/ether 8c:16:45:6c:83:b9 brd ff:ff:ff:ff:ff:ff 3: wlp4s0: mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000 link/ether 7c:76:35:ea:89:90 brd ff:ff:ff:ff:ff:ff 4: tun0: mtu 1360 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 100 link/none 92: gre0@NONE: mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/gre 0.0.0.0 brd 0.0.0.0 93: gretap0@NONE: mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 94: erspan0@NONE: mtu 1446 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 100: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/tunnel6 :: brd :: 101: ip6gre0@NONE: mtu 1448 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/gre6 :: brd :: 104: tunl0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 117: sit0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 126: ip_vti0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 168: test-peer@veth-test: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 96:03:08:d2:65:40 brd ff:ff:ff:ff:ff:ff 169: veth-test@test-peer: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether c2:8c:3b:9f:ea:32 brd ff:ff:ff:ff:ff:ff 170: l2tpeth0: mtu 1488 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000 link/ether 76:41:ec:b9:d2:75 brd ff:ff:ff:ff:ff:ff 171: l2tpeth1: mtu 65481 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 8e:7f:ab:21:a2:ea brd ff:ff:ff:ff:ff:ff PING 10.42.1.2 (10.42.1.2) 56(84) bytes of data. 64 bytes from 10.42.1.2: icmp_seq=1 ttl=64 time=0.013 ms 64 bytes from 10.42.1.2: icmp_seq=2 ttl=64 time=0.043 ms 64 bytes from 10.42.1.2: icmp_seq=3 ttl=64 time=0.066 ms 64 bytes from 10.42.1.2: icmp_seq=4 ttl=64 time=0.045 ms 64 bytes from 10.42.1.2: icmp_seq=5 ttl=64 time=0.041 ms --- 10.42.1.2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4126ms rtt min/avg/max/mdev = 0.013/0.041/0.066/0.018 ms ok ---------------------------------------------------------------------- Ran 3 tests in 4.322s OK :: [ 15:21:21 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-l2tp-tests.py' (Expected 0, got 0) :: [ 15:21:21 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-l2tp-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 5s :: Duration: 5s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS ``` --- tests/ip-l2tp-sanity-test/Makefile | 47 +++++++ tests/ip-l2tp-sanity-test/PURPOSE | 3 + tests/ip-l2tp-sanity-test/ip-l2tp-tests.py | 149 +++++++++++++++++++++ tests/ip-l2tp-sanity-test/runtest.sh | 34 +++++ tests/tests.yml | 1 + 5 files changed, 234 insertions(+) create mode 100644 tests/ip-l2tp-sanity-test/Makefile create mode 100644 tests/ip-l2tp-sanity-test/PURPOSE create mode 100755 tests/ip-l2tp-sanity-test/ip-l2tp-tests.py create mode 100755 tests/ip-l2tp-sanity-test/runtest.sh diff --git a/tests/ip-l2tp-sanity-test/Makefile b/tests/ip-l2tp-sanity-test/Makefile new file mode 100644 index 0000000..7040c7c --- /dev/null +++ b/tests/ip-l2tp-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-l2tp-sanity-test +# Description: Test basic ip l2tp funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-l2tp-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip l2tp funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-l2tp-sanity-test/PURPOSE b/tests/ip-l2tp-sanity-test/PURPOSE new file mode 100644 index 0000000..4224b1d --- /dev/null +++ b/tests/ip-l2tp-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-l2tp-sanity-test +Description: Test basic ip l2tp funcionality +Author: Susant Sahani diff --git a/tests/ip-l2tp-sanity-test/ip-l2tp-tests.py b/tests/ip-l2tp-sanity-test/ip-l2tp-tests.py new file mode 100755 index 0000000..1f20a14 --- /dev/null +++ b/tests/ip-l2tp-sanity-test/ip-l2tp-tests.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-l2tp-sanity-test +# Description: Test basic ip l2tp funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_veth(self): + subprocess.check_output(['ip', 'link', 'add', 'veth-test', 'type', 'veth', 'peer', 'name', 'test-peer']) + + def del_veth(self): + subprocess.check_output(['ip', 'link', 'del', 'veth-test']) + + def add_address(self, address, interface): + subprocess.check_output(['ip', 'address', 'add', address, 'dev', interface]) + +class IPL2tpTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_veth() + self.link_exists('veth-test') + + self.add_address('192.168.11.12/24', 'veth-test') + self.add_address('192.168.11.13/24', 'test-peer') + + def tearDown(self): + self.del_veth() + + def test_add_l2tp_add_tunnel(self): + + r = subprocess.call("ip l2tp add tunnel tunnel_id 3000 peer_tunnel_id 4000 encap udp local 192.168.11.12 remote 192.168.11.13 udp_sport 5000 udp_dport 6000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'tunnel', 'tunnel_id', '3000']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "From 192.168.11.12 to 192.168.11.13") + self.assertRegex(output, "Peer tunnel 4000") + self.assertRegex(output, "UDP source / dest ports: 5000/6000") + + r = subprocess.call("ip l2tp del tunnel tunnel_id 3000", shell=True) + self.assertEqual(r, 0) + + def test_add_l2tp_add_tunnel_session(self): + + r = subprocess.call("ip l2tp add tunnel tunnel_id 3000 peer_tunnel_id 4000 encap udp local 192.168.11.12 remote 192.168.11.13 udp_sport 5000 udp_dport 6000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'tunnel', 'tunnel_id', '3000']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "From 192.168.11.12 to 192.168.11.13") + self.assertRegex(output, "Peer tunnel 4000") + self.assertRegex(output, "UDP source / dest ports: 5000/6000") + + r = subprocess.call(" ip l2tp add session tunnel_id 3000 session_id 1000 peer_session_id 2000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'session', 'tunnel_id', '3000', 'session_id' ,'1000']).rstrip().decode('utf-8') + print(output) + + r = subprocess.call("ip l2tp del session tunnel_id 3000 session_id 1000", shell=True) + self.assertEqual(r, 0) + + r = subprocess.call("ip l2tp del tunnel tunnel_id 3000", shell=True) + self.assertEqual(r, 0) + + def test_setup_l2tp(self): + + r = subprocess.call("ip l2tp add tunnel tunnel_id 3000 peer_tunnel_id 4000 encap udp local 192.168.11.12 remote 192.168.11.13 udp_sport 5000 udp_dport 6000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'tunnel', 'tunnel_id', '3000']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "From 192.168.11.12 to 192.168.11.13") + self.assertRegex(output, "Peer tunnel 4000") + self.assertRegex(output, "UDP source / dest ports: 5000/6000") + + r = subprocess.call(" ip l2tp add session tunnel_id 3000 session_id 1000 peer_session_id 2000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'session', 'tunnel_id', '3000', 'session_id' ,'1000']).rstrip().decode('utf-8') + print(output) + + r = subprocess.call("ip l2tp add tunnel tunnel_id 4000 peer_tunnel_id 3000 encap udp local 192.168.11.13 remote 192.168.11.12 udp_sport 6000 udp_dport 5000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'tunnel', 'tunnel_id', '3000']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "From 192.168.11.13 to 192.168.11.12") + self.assertRegex(output, "Peer tunnel 4000") + self.assertRegex(output, "UDP source / dest ports: 6000/5000") + + r = subprocess.call("ip l2tp add session tunnel_id 4000 session_id 2000 peer_session_id 1000", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'l2tp', 'show', 'session', 'tunnel_id', '4000', 'session_id' ,'2000']).rstrip().decode('utf-8') + print(output) + + r = subprocess.call("ip link set l2tpeth0 up mtu 1488", shell=True) + self.assertEqual(r, 0) + r = subprocess.call("ip link set l2tpeth0 up mtu 1488", shell=True) + self.assertEqual(r, 0) + + r = subprocess.call("ip addr add 10.42.1.1 peer 10.42.1.2 dev l2tpeth0", shell=True) + self.assertEqual(r, 0) + r = subprocess.call("ip addr add 10.42.1.2 peer 10.42.1.1 dev l2tpeth1", shell=True) + self.assertEqual(r, 0) + + output=subprocess.check_output(['ip', 'link', 'show']).rstrip().decode('utf-8') + print(output) + + output=subprocess.check_output(['ping', '10.42.1.2','-c', '5']).rstrip().decode('utf-8') + print(output) + + r = subprocess.call("ip l2tp del session tunnel_id 3000 session_id 1000", shell=True) + self.assertEqual(r, 0) + r = subprocess.call("ip l2tp del session tunnel_id 4000 session_id 2000", shell=True) + self.assertEqual(r, 0) + + r = subprocess.call("ip l2tp del tunnel tunnel_id 3000", shell=True) + self.assertEqual(r, 0) + r = subprocess.call("ip l2tp del tunnel tunnel_id 4000", shell=True) + self.assertEqual(r, 0) + + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-l2tp-sanity-test/runtest.sh b/tests/ip-l2tp-sanity-test/runtest.sh new file mode 100755 index 0000000..75b0589 --- /dev/null +++ b/tests/ip-l2tp-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-l2tp-sanity-test +# Description: Test basic ip l2tp funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-l2tp-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip l2tp tests" + rlRun "/usr/bin/python3 /usr/bin/ip-l2tp-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-l2tp-tests.py" + rlLog "ip l2tp tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index 8e03214..ff6adf8 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -17,6 +17,7 @@ - ip-token-sanity-test - ip-tuntap-sanity-test - ip-tunnel-sanity-test + - ip-l2tp-sanity-test required_packages: - iproute - bridge-utils From 0b5c720c9c3f171b73928a70267c3ecd154ef743 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 31 Jul 2018 15:36:29 +0530 Subject: [PATCH 041/111] CI: Add netns to test Sample run: ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 15:37:14 ] :: [ LOG ] :: ip netns tests :: [ 15:37:14 ] :: [ LOG ] :: ip netns tests :: [ 15:37:14 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-netns-tests.py' test_add_dummy_interface_to_ns (__main__.IPNsTests) ... 1: lo: mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: gre0@NONE: mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/gre 0.0.0.0 brd 0.0.0.0 3: gretap0@NONE: mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 4: erspan0@NONE: mtu 1446 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 4: erspan0@NONE: mtu 1446 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 5: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/tunnel6 :: brd :: 6: ip6gre0@NONE: mtu 1448 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/gre6 :: brd :: 7: tunl0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 8: sit0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 9: ip_vti0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 143: dummy-test: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 6e:d1:ba:73:59:c5 brd ff:ff:ff:ff:ff:ff ok test_add_ns (__main__.IPNsTests) ... ok test_add_veth_interface_to_ns (__main__.IPNsTests) ... 1: lo: mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: gre0@NONE: mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/gre 0.0.0.0 brd 0.0.0.0 3: gretap0@NONE: mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 4: erspan0@NONE: mtu 1446 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 5: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/tunnel6 :: brd :: 6: ip6gre0@NONE: mtu 1448 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/gre6 :: brd :: 7: tunl0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 8: sit0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 9: ip_vti0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 144: test-peer@if145: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 62:ce:d1:9f:bc:de brd ff:ff:ff:ff:ff:ff link-netnsid 0 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: gre0@NONE: mtu 1476 qdisc noop state DOWN group default qlen 1000 link/gre 0.0.0.0 brd 0.0.0.0 3: gretap0@NONE: mtu 1462 qdisc noop state DOWN group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 4: erspan0@NONE: mtu 1446 qdisc noop state DOWN group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 5: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN group default qlen 1000 link/tunnel6 :: brd :: 6: ip6gre0@NONE: mtu 1448 qdisc noop state DOWN group default qlen 1000 link/gre6 :: brd :: 7: tunl0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 8: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 9: ip_vti0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 144: test-peer@if145: mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 62:ce:d1:9f:bc:de brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 10.200.1.2/24 scope global test-peer valid_lft forever preferred_lft forever inet6 fe80::60ce:d1ff:fe9f:bcde/64 scope link tentative valid_lft forever preferred_lft forever PING 10.200.1.1 (10.200.1.1) 56(84) bytes of data. 64 bytes from 10.200.1.1: icmp_seq=1 ttl=64 time=0.063 ms 64 bytes from 10.200.1.1: icmp_seq=2 ttl=64 time=0.042 ms 64 bytes from 10.200.1.1: icmp_seq=3 ttl=64 time=0.054 ms 64 bytes from 10.200.1.1: icmp_seq=4 ttl=64 time=0.059 ms 64 bytes from 10.200.1.1: icmp_seq=5 ttl=64 time=0.064 ms --- 10.200.1.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4073ms rtt min/avg/max/mdev = 0.042/0.056/0.064/0.010 ms ok ---------------------------------------------------------------------- Ran 3 tests in 4.431s Ran 3 tests in 4.431s OK :: [ 15:37:18 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-netns-tests.py' (Expected 0, got 0) :: [ 15:37:18 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-netns-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 4s :: Duration: 4s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :: Cleanup ``` --- tests/ip-netns-sanity-test/Makefile | 47 ++++++++ tests/ip-netns-sanity-test/PURPOSE | 3 + tests/ip-netns-sanity-test/ip-netns-tests.py | 118 +++++++++++++++++++ tests/ip-netns-sanity-test/runtest.sh | 34 ++++++ tests/tests.yml | 1 + 5 files changed, 203 insertions(+) create mode 100644 tests/ip-netns-sanity-test/Makefile create mode 100644 tests/ip-netns-sanity-test/PURPOSE create mode 100755 tests/ip-netns-sanity-test/ip-netns-tests.py create mode 100755 tests/ip-netns-sanity-test/runtest.sh diff --git a/tests/ip-netns-sanity-test/Makefile b/tests/ip-netns-sanity-test/Makefile new file mode 100644 index 0000000..f4cfc49 --- /dev/null +++ b/tests/ip-netns-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-netns-sanity-test +# Description: Test basic ip netns funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-ns-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip netns funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-netns-sanity-test/PURPOSE b/tests/ip-netns-sanity-test/PURPOSE new file mode 100644 index 0000000..169a84d --- /dev/null +++ b/tests/ip-netns-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-netns-sanity-test +Description: Test basic ip netns funcionality +Author: Susant Sahani diff --git a/tests/ip-netns-sanity-test/ip-netns-tests.py b/tests/ip-netns-sanity-test/ip-netns-tests.py new file mode 100755 index 0000000..78bcb8a --- /dev/null +++ b/tests/ip-netns-sanity-test/ip-netns-tests.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-netns-sanity-test +# Description: Test basic ip netns funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class GenericUtilities(): + + def path_exists(self, path): + self.assertTrue(os.path.exists(os.path.join('/var/run/netns', path))) + + def link_exists(self, link): + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_veth(self): + subprocess.check_output(['ip', 'link', 'add', 'veth-test', 'type', 'veth', 'peer', 'name', 'test-peer']) + + def del_veth(self): + subprocess.check_output(['ip', 'link', 'del', 'veth-test']) + + def add_dummy(self): + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + + def del_dummy(self): + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + +class IPNsTests(unittest.TestCase, GenericUtilities): + + def test_add_ns(self): + + subprocess.check_output(['ip', 'netns', 'add', 'net-ns-test']) + self.path_exists('net-ns-test') + + output=subprocess.check_output(['ip', 'netns', 'list']).rstrip().decode('utf-8') + self.assertRegex(output, "net-ns-test") + + self.addCleanup(subprocess.call, ['ip', 'netns', 'del', 'net-ns-test']) + + def test_add_dummy_interface_to_ns(self): + + self.add_dummy() + self.link_exists('dummy-test') + + subprocess.check_output(['ip', 'netns', 'add', 'net-ns-test']) + self.path_exists('net-ns-test') + + output=subprocess.check_output(['ip', 'netns', 'list']).rstrip().decode('utf-8') + self.assertRegex(output, "net-ns-test") + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'netns', 'net-ns-test']) + + output=subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'link', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "dummy-test") + + self.addCleanup(subprocess.call, ['ip', 'netns', 'del', 'net-ns-test']) + self.addCleanup(subprocess.call, ['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'link', 'del', 'dummy-test']) + + def test_add_veth_interface_to_ns(self): + + self.add_veth() + self.link_exists('veth-test') + + subprocess.check_output(['ip', 'netns', 'add', 'net-ns-test']) + self.path_exists('net-ns-test') + + output=subprocess.check_output(['ip', 'netns', 'list']).rstrip().decode('utf-8') + self.assertRegex(output, "net-ns-test") + + subprocess.check_output(['ip', 'link', 'set', 'dev', 'test-peer', 'netns', 'net-ns-test']) + + output=subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'link', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "test-peer") + + # Setup IP address of veth-test. + subprocess.check_output(['ip', 'addr', 'add', '10.200.1.1/24', 'dev', 'veth-test']) + subprocess.check_output(['ip', 'link', 'set', 'veth-test', 'up']) + + # Setup IP address of v-peer1. + subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'addr', 'add',' 10.200.1.2/24', 'dev', 'test-peer']) + subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'link', 'set', 'test-peer', 'up']) + subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'link', 'set', 'lo', 'up']) + + output=subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'addr', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "test-peer") + self.assertRegex(output, "lo: ") + self.assertRegex(output, "inet 10.200.1.2/24") + + output=subprocess.check_output(['ip', 'netns', 'exec', 'net-ns-test', 'ping', '10.200.1.1', '-c', '5']).rstrip().decode('utf-8') + print(output) + + self.addCleanup(subprocess.call, ['ip', 'netns', 'del', 'net-ns-test']) + self.addCleanup(subprocess.call, ['ip', 'netns', 'exec', 'net-ns-test', 'ip', 'link', 'del', 'test-peer']) + + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-netns-sanity-test/runtest.sh b/tests/ip-netns-sanity-test/runtest.sh new file mode 100755 index 0000000..c0276fd --- /dev/null +++ b/tests/ip-netns-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-Licenetnse-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-netns-sanity-test +# Description: Test basic ip netns funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-netns-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip netns tests" + rlRun "/usr/bin/python3 /usr/bin/ip-netns-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-netns-tests.py" + rlLog "ip netns tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index ff6adf8..9b58bad 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -18,6 +18,7 @@ - ip-tuntap-sanity-test - ip-tunnel-sanity-test - ip-l2tp-sanity-test + - ip-netns-sanity-test required_packages: - iproute - bridge-utils From 90c1f7753860f6c2f1a52d983003e1fbf872fe3c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 31 Jul 2018 18:22:25 +0530 Subject: [PATCH 042/111] CI: Add ip route to test Sample run ''' :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 18:23:29 ] :: [ LOG ] :: ip route tests :: [ 18:23:29 ] :: [ LOG ] :: ip route tests :: [ 18:23:29 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-route-tests.py' test_add_blackhole (__main__.IPRouteTests) ... default via 192.168.225.1 dev wlp4s0 proto dhcp metric 600 10.0.0.0/8 via 10.67.116.1 dev tun0 proto static metric 50 10.67.116.0/22 dev tun0 proto kernel scope link src 10.67.117.15 metric 50 blackhole 192.168.1.0/24 192.168.225.0/24 dev wlp4s0 proto kernel scope link src 192.168.225.101 metric 600 192.168.225.1 dev wlp4s0 proto static scope link metric 600 209.132.188.220 via 192.168.225.1 dev wlp4s0 proto static metric 600 192.168.225.1 dev wlp4s0 proto static scope link metric 600 209.132.188.220 via 192.168.225.1 dev wlp4s0 proto static metric 600 ok test_add_prohibit (__main__.IPRouteTests) ... default via 192.168.225.1 dev wlp4s0 proto dhcp metric 600 10.0.0.0/8 via 10.67.116.1 dev tun0 proto static metric 50 10.67.116.0/22 dev tun0 proto kernel scope link src 10.67.117.15 metric 50 prohibit 192.168.1.0/24 192.168.225.0/24 dev wlp4s0 proto kernel scope link src 192.168.225.101 metric 600 192.168.225.1 dev wlp4s0 proto static scope link metric 600 209.132.188.220 via 192.168.225.1 dev wlp4s0 proto static metric 600 ok test_add_route (__main__.IPRouteTests) ... default via 192.168.225.1 dev wlp4s0 proto dhcp metric 600 10.0.0.0/8 via 10.67.116.1 dev tun0 proto static metric 50 10.67.116.0/22 dev tun0 proto kernel scope link src 10.67.117.15 metric 50 192.168.1.0/24 dev dummy-test scope link 192.168.225.0/24 dev wlp4s0 proto kernel scope link src 192.168.225.101 metric 600 192.168.225.1 dev wlp4s0 proto static scope link metric 600 209.132.188.220 via 192.168.225.1 dev wlp4s0 proto static metric 600 ok test_add_route_table (__main__.IPRouteTests) ... 192.168.1.0/24 dev dummy-test scope link ok test_add_throw (__main__.IPRouteTests) ... default via 192.168.225.1 dev wlp4s0 proto dhcp metric 600 10.0.0.0/8 via 10.67.116.1 dev tun0 proto static metric 50 10.67.116.0/22 dev tun0 proto kernel scope link src 10.67.117.15 metric 50 throw 192.168.1.0/24 192.168.225.0/24 dev wlp4s0 proto kernel scope link src 192.168.225.101 metric 600 192.168.225.1 dev wlp4s0 proto static scope link metric 600 209.132.188.220 via 192.168.225.1 dev wlp4s0 proto static metric 600 ok test_add_unreachable (__main__.IPRouteTests) ... default via 192.168.225.1 dev wlp4s0 proto dhcp metric 600 10.0.0.0/8 via 10.67.116.1 dev tun0 proto static metric 50 10.67.116.0/22 dev tun0 proto kernel scope link src 10.67.117.15 metric 50 unreachable 192.168.1.0/24 192.168.225.0/24 dev wlp4s0 proto kernel scope link src 192.168.225.101 metric 600 192.168.225.1 dev wlp4s0 proto static scope link metric 600 209.132.188.220 via 192.168.225.1 dev wlp4s0 proto static metric 600 ok ---------------------------------------------------------------------- Ran 6 tests in 0.155s OK :: [ 18:23:29 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-route-tests.py' (Expected 0, got 0) :: [ 18:23:29 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-route-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Duration: 1s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ''' --- tests/ip-route-sanity-test/Makefile | 47 ++++++++ tests/ip-route-sanity-test/PURPOSE | 3 + tests/ip-route-sanity-test/ip-route-tests.py | 110 +++++++++++++++++++ tests/ip-route-sanity-test/runtest.sh | 34 ++++++ tests/tests.yml | 1 + 5 files changed, 195 insertions(+) create mode 100644 tests/ip-route-sanity-test/Makefile create mode 100644 tests/ip-route-sanity-test/PURPOSE create mode 100755 tests/ip-route-sanity-test/ip-route-tests.py create mode 100755 tests/ip-route-sanity-test/runtest.sh diff --git a/tests/ip-route-sanity-test/Makefile b/tests/ip-route-sanity-test/Makefile new file mode 100644 index 0000000..0b21130 --- /dev/null +++ b/tests/ip-route-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-route-sanity-test +# Description: Test basic ip route funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-route-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip route funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-route-sanity-test/PURPOSE b/tests/ip-route-sanity-test/PURPOSE new file mode 100644 index 0000000..792d9ba --- /dev/null +++ b/tests/ip-route-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-route-sanity-test +Description: Test basic ip route funcionality +Author: Susant Sahani diff --git a/tests/ip-route-sanity-test/ip-route-tests.py b/tests/ip-route-sanity-test/ip-route-tests.py new file mode 100755 index 0000000..2845cae --- /dev/null +++ b/tests/ip-route-sanity-test/ip-route-tests.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-route-sanity-test +# Description: Test basic ip route funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_dummy(self): + """ Setup """ + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + self.link_exists('dummy-test') + subprocess.check_output(['ip', 'link', 'set', 'dev', 'dummy-test', 'up']) + + def del_dummy(self): + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + +class IPRouteTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_dummy() + + def tearDown(self): + self.del_dummy() + + def test_add_route(self): + + subprocess.check_output(['ip', 'route', 'add', '192.168.1.0/24', 'dev', 'dummy-test']) + + output=subprocess.check_output(['ip', 'route', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "192.168.1.0/24 dev dummy-test scope link") + + subprocess.check_output(['ip', 'route', 'delete', '192.168.1.0/24', 'dev', 'dummy-test']) + + def test_add_route_table(self): + + subprocess.check_output(['ip', 'route', 'add', 'table', '555', '192.168.1.0/24', 'dev', 'dummy-test']) + + output=subprocess.check_output(['ip', 'route', 'show', 'table', '555']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "192.168.1.0/24 dev dummy-test scope link") + + subprocess.check_output(['ip', 'route', 'delete', '192.168.1.0/24', 'dev', 'dummy-test', 'table', '555']) + + def test_add_blackhole(self): + + subprocess.check_output(['ip', 'route', 'add', 'blackhole', '192.168.1.0/24']) + + output=subprocess.check_output(['ip', 'route', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "blackhole 192.168.1.0/24") + + subprocess.check_output(['ip', 'route', 'delete', '192.168.1.0/24']) + + def test_add_unreachable(self): + + subprocess.check_output(['ip', 'route', 'add', 'unreachable', '192.168.1.0/24']) + + output=subprocess.check_output(['ip', 'route', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "unreachable 192.168.1.0/24") + + subprocess.check_output(['ip', 'route', 'delete', '192.168.1.0/24']) + + def test_add_prohibit(self): + + subprocess.check_output(['ip', 'route', 'add', 'prohibit', '192.168.1.0/24']) + + output=subprocess.check_output(['ip', 'route', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "prohibit 192.168.1.0/24") + + subprocess.check_output(['ip', 'route', 'delete', '192.168.1.0/24']) + + def test_add_throw(self): + + subprocess.check_output(['ip', 'route', 'add', 'throw', '192.168.1.0/24']) + + output=subprocess.check_output(['ip', 'route', 'show']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "throw 192.168.1.0/24") + + subprocess.check_output(['ip', 'route', 'delete', '192.168.1.0/24']) + + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-route-sanity-test/runtest.sh b/tests/ip-route-sanity-test/runtest.sh new file mode 100755 index 0000000..13340fc --- /dev/null +++ b/tests/ip-route-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-route-sanity-test +# Description: Test basic ip route funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-route-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip route tests" + rlRun "/usr/bin/python3 /usr/bin/ip-route-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-route-tests.py" + rlLog "ip route tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index 9b58bad..d1e3112 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -19,6 +19,7 @@ - ip-tunnel-sanity-test - ip-l2tp-sanity-test - ip-netns-sanity-test + - ip-route-sanity-test required_packages: - iproute - bridge-utils From 1418f9951af6a7851cef87eeba95017e70d24f1c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 2 Aug 2018 17:24:20 +0530 Subject: [PATCH 043/111] CI: Add ip neighbour to test sample run ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 17:23:10 ] :: [ LOG ] :: ip neighbor tests :: [ 17:23:10 ] :: [ LOG ] :: ip neighbor tests :: [ 17:23:10 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/ip-neighbor-tests.py' test_add_neighbor (__main__.IPNeighborTests) ... 192.168.100.1 lladdr 00:c0:7b:7d:00:c8 PERMANENT ok test_replace_neighbor (__main__.IPNeighborTests) ... 192.168.99.254 lladdr 00:80:c8:27:69:2d PERMANENT 192.168.99.254 lladdr 00:80:c8:27:69:2d PERMANENT ok ---------------------------------------------------------------------- Ran 2 tests in 0.053s OK :: [ 17:23:10 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-neighbor-tests.py' (Expected 0, got 0) :: [ 17:23:10 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/ip-neighbor-tests.py' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ``` --- tests/ip-neighbor-sanity-test/Makefile | 47 ++++++++++++ tests/ip-neighbor-sanity-test/PURPOSE | 3 + .../ip-neighbor-tests.py | 74 +++++++++++++++++++ tests/ip-neighbor-sanity-test/runtest.sh | 34 +++++++++ tests/tests.yml | 1 + 5 files changed, 159 insertions(+) create mode 100644 tests/ip-neighbor-sanity-test/Makefile create mode 100644 tests/ip-neighbor-sanity-test/PURPOSE create mode 100755 tests/ip-neighbor-sanity-test/ip-neighbor-tests.py create mode 100755 tests/ip-neighbor-sanity-test/runtest.sh diff --git a/tests/ip-neighbor-sanity-test/Makefile b/tests/ip-neighbor-sanity-test/Makefile new file mode 100644 index 0000000..67178fd --- /dev/null +++ b/tests/ip-neighbor-sanity-test/Makefile @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-neighbor-sanity-test +# Description: Test basic ip neighbor funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +export TEST=/CoreOS/iproute/Sanity/ip-neighbor-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Susant Sahani " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test basic ip neighbor funcionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: iproute" >> $(METADATA) + @echo "Requires: iproute" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ip-neighbor-sanity-test/PURPOSE b/tests/ip-neighbor-sanity-test/PURPOSE new file mode 100644 index 0000000..cad9d8d --- /dev/null +++ b/tests/ip-neighbor-sanity-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/iproute/Sanity/ip-neighbor-sanity-test +Description: Test basic ip neighbor funcionality +Author: Susant Sahani diff --git a/tests/ip-neighbor-sanity-test/ip-neighbor-tests.py b/tests/ip-neighbor-sanity-test/ip-neighbor-tests.py new file mode 100755 index 0000000..940bdb0 --- /dev/null +++ b/tests/ip-neighbor-sanity-test/ip-neighbor-tests.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-neighbour-sanity-test +# Description: Test basic ip neighbour funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +import errno +import os +import sys +import time +import unittest +import subprocess +import signal +import shutil + +def setUpModule(): + + if shutil.which('ip') is None: + raise OSError(errno.ENOENT, 'ip not found') + +class IPLinkUtilities(): + + def link_exists(self, link): + + self.assertTrue(os.path.exists(os.path.join('/sys/class/net', link))) + + def add_dummy(self): + + subprocess.check_output(['ip', 'link', 'add', 'dummy-test', 'type', 'dummy']) + self.link_exists('dummy-test') + + def del_dummy(self): + + subprocess.check_output(['ip', 'link', 'del', 'dummy-test']) + +class IPNeighborTests(unittest.TestCase, IPLinkUtilities): + + def setUp(self): + self.add_dummy() + self.link_exists('dummy-test') + + def tearDown(self): + self.del_dummy() + + def test_add_neighbor(self): + + subprocess.call("ip neighbor add 192.168.100.1 lladdr 00:c0:7b:7d:00:c8 dev dummy-test nud permanent", shell=True) + output=subprocess.check_output(['ip', 'neighbour', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "192.168.100.1 lladdr 00:c0:7b:7d:00:c8 PERMANENT") + + subprocess.call("ip neighbor del 192.168.100.1 dev dummy-test", shell=True) + + def test_replace_neighbor(self): + + subprocess.call("ip neighbor add 192.168.99.254 lladdr 00:80:c8:27:69:2d dev dummy-test", shell=True) + output=subprocess.check_output(['ip', 'neighbour', 'show', 'dev', 'dummy-test']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, "192.168.99.254 lladdr 00:80:c8:27:69:2d PERMANENT") + + subprocess.call("ip neighbor change 192.168.99.254 lladdr 00:80:c8:27:69:2d dev dummy-test", shell=True) + print(output) + self.assertRegex(output, "192.168.99.254 lladdr 00:80:c8:27:69:2d PERMANENT") + + subprocess.call("ip neighbor del 192.168.99.254 dev dummy-test", shell=True) + + +if __name__ == '__main__': + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, + verbosity=2)) diff --git a/tests/ip-neighbor-sanity-test/runtest.sh b/tests/ip-neighbor-sanity-test/runtest.sh new file mode 100755 index 0000000..dd5aba5 --- /dev/null +++ b/tests/ip-neighbor-sanity-test/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of /CoreOS/iproute/Sanity/ip-neighbor-sanity-test +# Description: Test basic ip neighbor funcionality +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +#~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="iproute" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp ip-neighbor-tests.py /usr/bin" + rlPhaseEnd + + rlPhaseStartTest + rlLog "ip neighbor tests" + rlRun "/usr/bin/python3 /usr/bin/ip-neighbor-tests.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/ip-neighbor-tests.py" + rlLog "ip neighbor tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/tests.yml b/tests/tests.yml index d1e3112..ae233e0 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -20,6 +20,7 @@ - ip-l2tp-sanity-test - ip-netns-sanity-test - ip-route-sanity-test + - ip-neighbor-sanity-test required_packages: - iproute - bridge-utils From a3ce5bfd28d1e513666a96d5d4f65f6a93efdc67 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 14 Aug 2018 20:07:04 +0200 Subject: [PATCH 044/111] Rebase package on top of iproute2-4.18.0 --- .gitignore | 12 +----------- iproute.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 3cb8593..9604a67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1 @@ -/iproute2-4.7.0.tar.xz -/iproute2-4.8.0.tar.xz -/iproute2-4.9.0.tar.xz -/iproute2-4.10.0.tar.xz -/iproute2-4.11.0.tar.xz -/iproute2-4.12.0.tar.xz -/iproute2-4.13.0.tar.xz -/iproute2-4.14.1.tar.xz -/iproute2-4.15.0.tar.xz -/iproute2-4.16.0.tar.xz -/iproute2-4.17.0.tar.xz +/iproute2-4.18.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 3cc1af8..979bd41 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.17.0 -Release: 2%{?dist} +Version: 4.18.0 +Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -159,6 +159,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Aug 14 2018 Phil Sutter - 4.18.0-1 +- New version 4.18.0 + * Fri Jul 13 2018 Fedora Release Engineering - 4.17.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index f6cd723..db55208 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.17.0.tar.xz) = ccd7fb70afd58f1fcd4e17c38a24607207da853c4d6118fda423efa6e51faad3ad03c4d6d58a579c40ef9c68aaf13b1c455e12b0c36e155712d3d4db3c2ff4b5 +SHA512 (iproute2-4.18.0.tar.xz) = c7c8e8e76c78faf63548da641769cf9f51811a308cd8eeec171f5f46423f116ff123033f11a554609825aba6d078c95dbbe36aa7ab23bd8d87b3a0d5100be1a9 From 81eb9cb3c913739ae584df231a2962be8c4623b2 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 16 Aug 2018 13:28:55 +0200 Subject: [PATCH 045/111] Fix ss filter expressions --- 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch | 4 +- 0002-ss-Review-ssfilter.patch | 130 +++++++++++++++++++ iproute.spec | 7 +- 3 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 0002-ss-Review-ssfilter.patch diff --git a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch index b3bea75..ac33332 100644 --- a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch +++ b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch @@ -1,4 +1,4 @@ -From d0a7e6eaa550dc7930ea53268637ff2186c7ddc6 Mon Sep 17 00:00:00 2001 +From 9c27b875aef25848adbebc8d13525bef3ec2ba45 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 17 Mar 2017 22:47:27 +0100 Subject: [PATCH] Add cbq.8 as an alias to tc-cbq.8 @@ -17,5 +17,5 @@ index 0000000000000..bef35201f4eab @@ -0,0 +1 @@ +.so man8/tc-cbq.8 -- -2.17.0 +2.18.0 diff --git a/0002-ss-Review-ssfilter.patch b/0002-ss-Review-ssfilter.patch new file mode 100644 index 0000000..eda0c52 --- /dev/null +++ b/0002-ss-Review-ssfilter.patch @@ -0,0 +1,130 @@ +From 45ef10dd7b9d4337bfef9573803c1c7cadc012e6 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Tue, 14 Aug 2018 14:18:06 +0200 +Subject: [PATCH] ss: Review ssfilter + +The original problem was ssfilter rejecting single expressions if +enclosed in braces, such as: + +| sport = 22 or ( dport = 22 ) + +This is fixed by allowing 'expr' to be an 'exprlist' enclosed in braces. +The no longer required recursion in 'exprlist' being an 'exprlist' +enclosed in braces is dropped. + +In addition to that, a few other things are changed: + +* Remove pointless 'null' prefix in 'appled' before 'exprlist'. +* For simple equals matches, '=' operator was required for ports but not + allowed for hosts. Make this consistent by making '=' operator + optional in both cases. + +Reported-by: Samuel Mannehed +Fixes: b2038cc0b2403 ("ssfilter: Eliminate shift/reduce conflicts") +Signed-off-by: Phil Sutter +Signed-off-by: Stephen Hemminger +(cherry picked from commit 38d209ecf2ae966b9b25de4acb60cdffb0e06ced) +Signed-off-by: Phil Sutter +--- + misc/ssfilter.y | 36 +++++++++++++++++++++--------------- + 1 file changed, 21 insertions(+), 15 deletions(-) + +diff --git a/misc/ssfilter.y b/misc/ssfilter.y +index 88d4229a9b241..0413dddaa7584 100644 +--- a/misc/ssfilter.y ++++ b/misc/ssfilter.y +@@ -42,24 +42,22 @@ static void yyerror(char *s) + %nonassoc '!' + + %% +-applet: null exprlist ++applet: exprlist + { +- *yy_ret = $2; +- $$ = $2; ++ *yy_ret = $1; ++ $$ = $1; + } + | null + ; ++ + null: /* NOTHING */ { $$ = NULL; } + ; ++ + exprlist: expr + | '!' expr + { + $$ = alloc_node(SSF_NOT, $2); + } +- | '(' exprlist ')' +- { +- $$ = $2; +- } + | exprlist '|' expr + { + $$ = alloc_node(SSF_OR, $1); +@@ -77,13 +75,21 @@ exprlist: expr + } + ; + +-expr: DCOND HOSTCOND ++eq: '=' ++ | /* nothing */ ++ ; ++ ++expr: '(' exprlist ')' ++ { ++ $$ = $2; ++ } ++ | DCOND eq HOSTCOND + { +- $$ = alloc_node(SSF_DCOND, $2); ++ $$ = alloc_node(SSF_DCOND, $3); + } +- | SCOND HOSTCOND ++ | SCOND eq HOSTCOND + { +- $$ = alloc_node(SSF_SCOND, $2); ++ $$ = alloc_node(SSF_SCOND, $3); + } + | DPORT GEQ HOSTCOND + { +@@ -101,7 +107,7 @@ expr: DCOND HOSTCOND + { + $$ = alloc_node(SSF_NOT, alloc_node(SSF_D_GE, $3)); + } +- | DPORT '=' HOSTCOND ++ | DPORT eq HOSTCOND + { + $$ = alloc_node(SSF_DCOND, $3); + } +@@ -126,7 +132,7 @@ expr: DCOND HOSTCOND + { + $$ = alloc_node(SSF_NOT, alloc_node(SSF_S_GE, $3)); + } +- | SPORT '=' HOSTCOND ++ | SPORT eq HOSTCOND + { + $$ = alloc_node(SSF_SCOND, $3); + } +@@ -134,7 +140,7 @@ expr: DCOND HOSTCOND + { + $$ = alloc_node(SSF_NOT, alloc_node(SSF_SCOND, $3)); + } +- | DEVNAME '=' DEVCOND ++ | DEVNAME eq DEVCOND + { + $$ = alloc_node(SSF_DEVCOND, $3); + } +@@ -142,7 +148,7 @@ expr: DCOND HOSTCOND + { + $$ = alloc_node(SSF_NOT, alloc_node(SSF_DEVCOND, $3)); + } +- | FWMARK '=' MARKMASK ++ | FWMARK eq MARKMASK + { + $$ = alloc_node(SSF_MARKMASK, $3); + } +-- +2.18.0 + diff --git a/iproute.spec b/iproute.spec index 979bd41..9e79d59 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.18.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -13,6 +13,8 @@ Source2: avpkt # - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links # to tc-cbq.8. Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch +# Fix for bz#1615373 +Patch2: 0002-ss-Review-ssfilter.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -159,6 +161,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Aug 16 2018 Phil Sutter - 4.18.0-2 +- Fix ss filter expressions + * Tue Aug 14 2018 Phil Sutter - 4.18.0-1 - New version 4.18.0 From 941d2e148b8b40410580d0482a1b166f95933df5 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 23 Aug 2018 17:58:43 +0200 Subject: [PATCH 046/111] Make colored output configurable --- ...Fix-typo-in-check-for-colored-output.patch | 33 +++ ...-bridge-Fix-check-for-colored-output.patch | 35 +++ ...ode-for-conditionally-colored-output.patch | 97 ++++++++ 0006-Make-colored-output-configurable.patch | 233 ++++++++++++++++++ ...ke-check_enable_color-return-boolean.patch | 59 +++++ iproute.spec | 11 +- 6 files changed, 467 insertions(+), 1 deletion(-) create mode 100644 0003-tc-Fix-typo-in-check-for-colored-output.patch create mode 100644 0004-bridge-Fix-check-for-colored-output.patch create mode 100644 0005-Merge-common-code-for-conditionally-colored-output.patch create mode 100644 0006-Make-colored-output-configurable.patch create mode 100644 0007-lib-Make-check_enable_color-return-boolean.patch diff --git a/0003-tc-Fix-typo-in-check-for-colored-output.patch b/0003-tc-Fix-typo-in-check-for-colored-output.patch new file mode 100644 index 0000000..46a2093 --- /dev/null +++ b/0003-tc-Fix-typo-in-check-for-colored-output.patch @@ -0,0 +1,33 @@ +From 1824d687058b2c818ae057321d7ca67de46b0fbb Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Wed, 15 Aug 2018 18:21:24 +0200 +Subject: [PATCH] tc: Fix typo in check for colored output + +The check used binary instead of boolean AND, which means colored output +was enabled only if the number of specified '-color' flags was odd. + +Fixes: 2d165c0811058 ("tc: implement color output") +Signed-off-by: Phil Sutter +Signed-off-by: David Ahern +(cherry picked from commit 0d0e0e0bef68f888bedb8d8f343baa943207dafc) +Signed-off-by: Phil Sutter +--- + tc/tc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tc/tc.c b/tc/tc.c +index 3bb5910ffac52..3bb893756f40e 100644 +--- a/tc/tc.c ++++ b/tc/tc.c +@@ -515,7 +515,7 @@ int main(int argc, char **argv) + + _SL_ = oneline ? "\\" : "\n"; + +- if (color & !json) ++ if (color && !json) + enable_color(); + + if (batch_file) +-- +2.18.0 + diff --git a/0004-bridge-Fix-check-for-colored-output.patch b/0004-bridge-Fix-check-for-colored-output.patch new file mode 100644 index 0000000..696afaa --- /dev/null +++ b/0004-bridge-Fix-check-for-colored-output.patch @@ -0,0 +1,35 @@ +From 02a126e40fce4fe03fdc9ce39bd3d9ff20dd1fb0 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Wed, 15 Aug 2018 18:21:25 +0200 +Subject: [PATCH] bridge: Fix check for colored output + +There is no point in calling enable_color() conditionally if it was +already called for each time '-color' flag was parsed. Align the +algorithm with that in ip and tc by actually making use of 'color' +variable. + +Fixes: e9625d6aead11 ("Merge branch 'iproute2-master' into iproute2-next") +Signed-off-by: Phil Sutter +Signed-off-by: David Ahern +(cherry picked from commit 5332148debeadcf52cc157ef1dd0a377dd482517) +Signed-off-by: Phil Sutter +--- + bridge/bridge.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bridge/bridge.c b/bridge/bridge.c +index 7fcfe1116f6e5..289a157d37f03 100644 +--- a/bridge/bridge.c ++++ b/bridge/bridge.c +@@ -174,7 +174,7 @@ main(int argc, char **argv) + if (netns_switch(argv[1])) + exit(-1); + } else if (matches(opt, "-color") == 0) { +- enable_color(); ++ ++color; + } else if (matches(opt, "-compressvlans") == 0) { + ++compress_vlans; + } else if (matches(opt, "-force") == 0) { +-- +2.18.0 + diff --git a/0005-Merge-common-code-for-conditionally-colored-output.patch b/0005-Merge-common-code-for-conditionally-colored-output.patch new file mode 100644 index 0000000..58509b4 --- /dev/null +++ b/0005-Merge-common-code-for-conditionally-colored-output.patch @@ -0,0 +1,97 @@ +From 9aef957dfc6c46468b6469d4e0e275011546753b Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Wed, 15 Aug 2018 18:21:26 +0200 +Subject: [PATCH] Merge common code for conditionally colored output + +Instead of calling enable_color() conditionally with identical check in +three places, introduce check_enable_color() which does it in one place. + +Signed-off-by: Phil Sutter +Signed-off-by: David Ahern +(cherry picked from commit 4d82962cccc6a6b543fa2110e81621c51441f0dd) +Signed-off-by: Phil Sutter +--- + bridge/bridge.c | 3 +-- + include/color.h | 1 + + ip/ip.c | 3 +-- + lib/color.c | 9 +++++++++ + tc/tc.c | 3 +-- + 5 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/bridge/bridge.c b/bridge/bridge.c +index 289a157d37f03..451d684e0bcfd 100644 +--- a/bridge/bridge.c ++++ b/bridge/bridge.c +@@ -200,8 +200,7 @@ main(int argc, char **argv) + + _SL_ = oneline ? "\\" : "\n"; + +- if (color && !json) +- enable_color(); ++ check_enable_color(color, json); + + if (batch_file) + return batch(batch_file); +diff --git a/include/color.h b/include/color.h +index c80359d3e2e95..4f2c918db7e43 100644 +--- a/include/color.h ++++ b/include/color.h +@@ -13,6 +13,7 @@ enum color_attr { + }; + + void enable_color(void); ++int check_enable_color(int color, int json); + void set_color_palette(void); + int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...); + enum color_attr ifa_family_color(__u8 ifa_family); +diff --git a/ip/ip.c b/ip/ip.c +index 71d5170c0cc23..38eac5ec1e17d 100644 +--- a/ip/ip.c ++++ b/ip/ip.c +@@ -304,8 +304,7 @@ int main(int argc, char **argv) + + _SL_ = oneline ? "\\" : "\n"; + +- if (color && !json) +- enable_color(); ++ check_enable_color(color, json); + + if (batch_file) + return batch(batch_file); +diff --git a/lib/color.c b/lib/color.c +index da1f516cb2492..edf96e5c6ecd7 100644 +--- a/lib/color.c ++++ b/lib/color.c +@@ -77,6 +77,15 @@ void enable_color(void) + set_color_palette(); + } + ++int check_enable_color(int color, int json) ++{ ++ if (color && !json) { ++ enable_color(); ++ return 0; ++ } ++ return 1; ++} ++ + void set_color_palette(void) + { + char *p = getenv("COLORFGBG"); +diff --git a/tc/tc.c b/tc/tc.c +index 3bb893756f40e..e775550174473 100644 +--- a/tc/tc.c ++++ b/tc/tc.c +@@ -515,8 +515,7 @@ int main(int argc, char **argv) + + _SL_ = oneline ? "\\" : "\n"; + +- if (color && !json) +- enable_color(); ++ check_enable_color(color, json); + + if (batch_file) + return batch(batch_file); +-- +2.18.0 + diff --git a/0006-Make-colored-output-configurable.patch b/0006-Make-colored-output-configurable.patch new file mode 100644 index 0000000..a65b06d --- /dev/null +++ b/0006-Make-colored-output-configurable.patch @@ -0,0 +1,233 @@ +From 889c7c942e23c77118ed5cdb610f53c13a5bfea8 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 17 Aug 2018 18:38:45 +0200 +Subject: [PATCH] Make colored output configurable + +Allow for -color={never,auto,always} to have colored output disabled, +enabled only if stdout is a terminal or enabled regardless of stdout +state. + +Signed-off-by: Phil Sutter +Reviewed-by: David Ahern +Signed-off-by: Stephen Hemminger +(cherry picked from commit ff1ab8edf827f55b86c6487c90b7454975d52236) +Signed-off-by: Phil Sutter +--- + bridge/bridge.c | 3 +-- + include/color.h | 9 +++++++++ + ip/ip.c | 3 +-- + lib/color.c | 33 ++++++++++++++++++++++++++++++++- + man/man8/bridge.8 | 13 +++++++++++-- + man/man8/ip.8 | 13 +++++++++++-- + man/man8/tc.8 | 13 +++++++++++-- + tc/tc.c | 3 +-- + 8 files changed, 77 insertions(+), 13 deletions(-) + +diff --git a/bridge/bridge.c b/bridge/bridge.c +index 451d684e0bcfd..263fa5397a623 100644 +--- a/bridge/bridge.c ++++ b/bridge/bridge.c +@@ -173,8 +173,7 @@ main(int argc, char **argv) + NEXT_ARG(); + if (netns_switch(argv[1])) + exit(-1); +- } else if (matches(opt, "-color") == 0) { +- ++color; ++ } else if (matches_color(opt, &color)) { + } else if (matches(opt, "-compressvlans") == 0) { + ++compress_vlans; + } else if (matches(opt, "-force") == 0) { +diff --git a/include/color.h b/include/color.h +index 4f2c918db7e43..a22a00c2277e0 100644 +--- a/include/color.h ++++ b/include/color.h +@@ -2,6 +2,8 @@ + #ifndef __COLOR_H__ + #define __COLOR_H__ 1 + ++#include ++ + enum color_attr { + COLOR_IFNAME, + COLOR_MAC, +@@ -12,8 +14,15 @@ enum color_attr { + COLOR_NONE + }; + ++enum color_opt { ++ COLOR_OPT_NEVER = 0, ++ COLOR_OPT_AUTO = 1, ++ COLOR_OPT_ALWAYS = 2 ++}; ++ + void enable_color(void); + int check_enable_color(int color, int json); ++bool matches_color(const char *arg, int *val); + void set_color_palette(void); + int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...); + enum color_attr ifa_family_color(__u8 ifa_family); +diff --git a/ip/ip.c b/ip/ip.c +index 38eac5ec1e17d..4fe471d99dc97 100644 +--- a/ip/ip.c ++++ b/ip/ip.c +@@ -283,8 +283,7 @@ int main(int argc, char **argv) + exit(-1); + } + rcvbuf = size; +- } else if (matches(opt, "-color") == 0) { +- ++color; ++ } else if (matches_color(opt, &color)) { + } else if (matches(opt, "-help") == 0) { + usage(); + } else if (matches(opt, "-netns") == 0) { +diff --git a/lib/color.c b/lib/color.c +index edf96e5c6ecd7..9c9023587748f 100644 +--- a/lib/color.c ++++ b/lib/color.c +@@ -3,11 +3,13 @@ + #include + #include + #include ++#include + #include + #include + #include + + #include "color.h" ++#include "utils.h" + + enum color { + C_RED, +@@ -79,13 +81,42 @@ void enable_color(void) + + int check_enable_color(int color, int json) + { +- if (color && !json) { ++ if (json || color == COLOR_OPT_NEVER) ++ return 1; ++ ++ if (color == COLOR_OPT_ALWAYS || isatty(fileno(stdout))) { + enable_color(); + return 0; + } + return 1; + } + ++bool matches_color(const char *arg, int *val) ++{ ++ char *dup, *p; ++ ++ if (!val) ++ return false; ++ ++ dup = strdupa(arg); ++ p = strchrnul(dup, '='); ++ if (*p) ++ *(p++) = '\0'; ++ ++ if (matches(dup, "-color")) ++ return false; ++ ++ if (*p == '\0' || !strcmp(p, "always")) ++ *val = COLOR_OPT_ALWAYS; ++ else if (!strcmp(p, "auto")) ++ *val = COLOR_OPT_AUTO; ++ else if (!strcmp(p, "never")) ++ *val = COLOR_OPT_NEVER; ++ else ++ return false; ++ return true; ++} ++ + void set_color_palette(void) + { + char *p = getenv("COLORFGBG"); +diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 +index e7f7148315e19..9684169844f36 100644 +--- a/man/man8/bridge.8 ++++ b/man/man8/bridge.8 +@@ -170,8 +170,17 @@ If there were any errors during execution of the commands, the application + return code will be non zero. + + .TP +-.BR "\-c" , " -color" +-Use color output. ++.BR \-c [ color ][ = { always | auto | never } ++Configure color output. If parameter is omitted or ++.BR always , ++color output is enabled regardless of stdout state. If parameter is ++.BR auto , ++stdout is checked to be a terminal before enabling color output. If parameter is ++.BR never , ++color output is disabled. If specified multiple times, the last one takes ++precedence. This flag is ignored if ++.B \-json ++is also given. + + .TP + .BR "\-j", " \-json" +diff --git a/man/man8/ip.8 b/man/man8/ip.8 +index 0087d18b74706..1d358879ec39c 100644 +--- a/man/man8/ip.8 ++++ b/man/man8/ip.8 +@@ -187,8 +187,17 @@ to + executes specified command over all objects, it depends if command supports this option. + + .TP +-.BR "\-c" , " -color" +-Use color output. ++.BR \-c [ color ][ = { always | auto | never } ++Configure color output. If parameter is omitted or ++.BR always , ++color output is enabled regardless of stdout state. If parameter is ++.BR auto , ++stdout is checked to be a terminal before enabling color output. If parameter is ++.BR never , ++color output is disabled. If specified multiple times, the last one takes ++precedence. This flag is ignored if ++.B \-json ++is also given. + + .TP + .BR "\-t" , " \-timestamp" +diff --git a/man/man8/tc.8 b/man/man8/tc.8 +index 840880fbdba63..a5849a776c592 100644 +--- a/man/man8/tc.8 ++++ b/man/man8/tc.8 +@@ -729,8 +729,17 @@ option was specified. Classes can be filtered only by + option. + + .TP +-.BR "\ -color" +-Use color output. ++.BR \-c [ color ][ = { always | auto | never } ++Configure color output. If parameter is omitted or ++.BR always , ++color output is enabled regardless of stdout state. If parameter is ++.BR auto , ++stdout is checked to be a terminal before enabling color output. If parameter is ++.BR never , ++color output is disabled. If specified multiple times, the last one takes ++precedence. This flag is ignored if ++.B \-json ++is also given. + + .TP + .BR "\-j", " \-json" +diff --git a/tc/tc.c b/tc/tc.c +index e775550174473..586db30cb87c2 100644 +--- a/tc/tc.c ++++ b/tc/tc.c +@@ -493,8 +493,7 @@ int main(int argc, char **argv) + matches(argv[1], "-conf") == 0) { + NEXT_ARG(); + conf_file = argv[1]; +- } else if (matches(argv[1], "-color") == 0) { +- ++color; ++ } else if (matches_color(argv[1], &color)) { + } else if (matches(argv[1], "-timestamp") == 0) { + timestamp++; + } else if (matches(argv[1], "-tshort") == 0) { +-- +2.18.0 + diff --git a/0007-lib-Make-check_enable_color-return-boolean.patch b/0007-lib-Make-check_enable_color-return-boolean.patch new file mode 100644 index 0000000..b80f49c --- /dev/null +++ b/0007-lib-Make-check_enable_color-return-boolean.patch @@ -0,0 +1,59 @@ +From 028f717e06d8496e15de6c4eaef3ecd88bd9c8d0 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 17 Aug 2018 18:38:46 +0200 +Subject: [PATCH] lib: Make check_enable_color() return boolean + +As suggested, turn return code into true/false although it's not checked +anywhere yet. + +Fixes: 4d82962cccc6a ("Merge common code for conditionally colored output") +Signed-off-by: Phil Sutter +Signed-off-by: Stephen Hemminger +(cherry picked from commit 515a766cd29bbed8a180733e93bc8590b001cad7) +Signed-off-by: Phil Sutter +--- + include/color.h | 2 +- + lib/color.c | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/include/color.h b/include/color.h +index a22a00c2277e0..e30f28c51c844 100644 +--- a/include/color.h ++++ b/include/color.h +@@ -21,7 +21,7 @@ enum color_opt { + }; + + void enable_color(void); +-int check_enable_color(int color, int json); ++bool check_enable_color(int color, int json); + bool matches_color(const char *arg, int *val); + void set_color_palette(void); + int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...); +diff --git a/lib/color.c b/lib/color.c +index 9c9023587748f..eaf69e74d673a 100644 +--- a/lib/color.c ++++ b/lib/color.c +@@ -79,16 +79,16 @@ void enable_color(void) + set_color_palette(); + } + +-int check_enable_color(int color, int json) ++bool check_enable_color(int color, int json) + { + if (json || color == COLOR_OPT_NEVER) +- return 1; ++ return false; + + if (color == COLOR_OPT_ALWAYS || isatty(fileno(stdout))) { + enable_color(); +- return 0; ++ return true; + } +- return 1; ++ return false; + } + + bool matches_color(const char *arg, int *val) +-- +2.18.0 + diff --git a/iproute.spec b/iproute.spec index 9e79d59..aebcf71 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.18.0 -Release: 2%{?dist} +Release: 3%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -15,6 +15,12 @@ Source2: avpkt Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch # Fix for bz#1615373 Patch2: 0002-ss-Review-ssfilter.patch +# Fix for bz#1582898 +Patch3: 0003-tc-Fix-typo-in-check-for-colored-output.patch +Patch4: 0004-bridge-Fix-check-for-colored-output.patch +Patch5: 0005-Merge-common-code-for-conditionally-colored-output.patch +Patch6: 0006-Make-colored-output-configurable.patch +Patch7: 0007-lib-Make-check_enable_color-return-boolean.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -161,6 +167,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Aug 23 2018 Phil Sutter - 4.18.0-3 +- Make colored output configurable + * Thu Aug 16 2018 Phil Sutter - 4.18.0-2 - Fix ss filter expressions From 3ce5d0a3bf1700161b4daaab505e6f2f10b1cbd2 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 31 Aug 2018 11:52:03 +0200 Subject: [PATCH 047/111] iprule: Fix destination prefix output --- ...iprule-Fix-destination-prefix-output.patch | 40 +++++++++++++++++++ iproute.spec | 7 +++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0008-iprule-Fix-destination-prefix-output.patch diff --git a/0008-iprule-Fix-destination-prefix-output.patch b/0008-iprule-Fix-destination-prefix-output.patch new file mode 100644 index 0000000..a5b8b83 --- /dev/null +++ b/0008-iprule-Fix-destination-prefix-output.patch @@ -0,0 +1,40 @@ +From b068329d161b5841e9e451fcf542987c3e487e70 Mon Sep 17 00:00:00 2001 +From: Stefan Bader +Date: Tue, 28 Aug 2018 16:27:29 +0200 +Subject: [PATCH] iprule: Fix destination prefix output + +When adding support for JSON output the new code for printing +the destination prefix adds a stray blank character before +the bitmask. This causes some user-space parsing to fail. + +Current output: + ...: from x.x.x.x/l to y.y.y.y /l +Previous output: + ...: from x.x.x.x/l to y.y.y.y/l + +Fixes: 0dd4ccc5 "iprule: add json support" +Signed-off-by: Stefan Bader +Acked-by: Luca Boccassi +Signed-off-by: Stephen Hemminger +(cherry picked from commit 1a75322c5a8dee6e1ed0017d76c87ef85c505b98) +Signed-off-by: Phil Sutter +--- + ip/iprule.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ip/iprule.c b/ip/iprule.c +index 8b9421431c26a..744d6d88e3433 100644 +--- a/ip/iprule.c ++++ b/ip/iprule.c +@@ -239,7 +239,7 @@ int print_rule(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + + print_string(PRINT_FP, NULL, "to ", NULL); + print_color_string(PRINT_ANY, ifa_family_color(frh->family), +- "dst", "%s ", dst); ++ "dst", "%s", dst); + if (frh->dst_len != host_len) + print_uint(PRINT_ANY, "dstlen", "/%u ", frh->dst_len); + else +-- +2.18.0 + diff --git a/iproute.spec b/iproute.spec index aebcf71..1c37fba 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.18.0 -Release: 3%{?dist} +Release: 4%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -21,6 +21,8 @@ Patch4: 0004-bridge-Fix-check-for-colored-output.patch Patch5: 0005-Merge-common-code-for-conditionally-colored-output.patch Patch6: 0006-Make-colored-output-configurable.patch Patch7: 0007-lib-Make-check_enable_color-return-boolean.patch +# Fix for bz#1623488 +Patch8: 0008-iprule-Fix-destination-prefix-output.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -167,6 +169,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Aug 31 2018 Phil Sutter - 4.18.0-4 +- iprule: Fix destination prefix output + * Thu Aug 23 2018 Phil Sutter - 4.18.0-3 - Make colored output configurable From 1b3b4aee09c0365fe539d941a67fb7f49e717c33 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 19 Sep 2018 20:06:59 +0200 Subject: [PATCH 048/111] man: ip-route: Clarify referenced versions are Linux ones --- ...rify-referenced-versions-are-Linux-o.patch | 132 ++++++++++++++++++ iproute.spec | 7 +- 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch diff --git a/0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch b/0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch new file mode 100644 index 0000000..a2ff88f --- /dev/null +++ b/0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch @@ -0,0 +1,132 @@ +From 100905845b930a10174cc239895858a534c10906 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Wed, 15 Aug 2018 11:18:26 +0200 +Subject: [PATCH] man: ip-route: Clarify referenced versions are Linux ones + +Versioning scheme of Linux and iproute2 is similar, therefore the +referenced kernel versions are likely to confuse readers. Clarify this +by prefixing each kernel version by 'Linux' prefix. + +Signed-off-by: Phil Sutter +Signed-off-by: Stephen Hemminger +(cherry picked from commit 8a03a2f36f767bd36b22929c78a370bd43059aee) +Signed-off-by: Phil Sutter +--- + man/man8/ip-route.8.in | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in +index b21a847241427..a33ce1f0f4006 100644 +--- a/man/man8/ip-route.8.in ++++ b/man/man8/ip-route.8.in +@@ -483,43 +483,43 @@ seconds and ms, msec or msecs to specify milliseconds. + + + .TP +-.BI rttvar " TIME " "(2.3.15+ only)" ++.BI rttvar " TIME " "(Linux 2.3.15+ only)" + the initial RTT variance estimate. Values are specified as with + .BI rtt + above. + + .TP +-.BI rto_min " TIME " "(2.6.23+ only)" ++.BI rto_min " TIME " "(Linux 2.6.23+ only)" + the minimum TCP Retransmission TimeOut to use when communicating with this + destination. Values are specified as with + .BI rtt + above. + + .TP +-.BI ssthresh " NUMBER " "(2.3.15+ only)" ++.BI ssthresh " NUMBER " "(Linux 2.3.15+ only)" + an estimate for the initial slow start threshold. + + .TP +-.BI cwnd " NUMBER " "(2.3.15+ only)" ++.BI cwnd " NUMBER " "(Linux 2.3.15+ only)" + the clamp for congestion window. It is ignored if the + .B lock + flag is not used. + + .TP +-.BI initcwnd " NUMBER " "(2.5.70+ only)" ++.BI initcwnd " NUMBER " "(Linux 2.5.70+ only)" + the initial congestion window size for connections to this destination. + Actual window size is this value multiplied by the MSS + (``Maximal Segment Size'') for same connection. The default is + zero, meaning to use the values specified in RFC2414. + + .TP +-.BI initrwnd " NUMBER " "(2.6.33+ only)" ++.BI initrwnd " NUMBER " "(Linux 2.6.33+ only)" + the initial receive window size for connections to this destination. + Actual window size is this value multiplied by the MSS of the connection. + The default value is zero, meaning to use Slow Start value. + + .TP +-.BI features " FEATURES " (3.18+ only) ++.BI features " FEATURES " (Linux 3.18+ only) + Enable or disable per-route features. Only available feature at this + time is + .B ecn +@@ -531,17 +531,17 @@ also be used even if the + sysctl is set to 0. + + .TP +-.BI quickack " BOOL " "(3.11+ only)" ++.BI quickack " BOOL " "(Linux 3.11+ only)" + Enable or disable quick ack for connections to this destination. + + .TP +-.BI fastopen_no_cookie " BOOL " "(4.15+ only)" ++.BI fastopen_no_cookie " BOOL " "(Linux 4.15+ only)" + Enable TCP Fastopen without a cookie for connections to this destination. + + .TP +-.BI congctl " NAME " "(3.20+ only)" ++.BI congctl " NAME " "(Linux 3.20+ only)" + .TP +-.BI "congctl lock" " NAME " "(3.20+ only)" ++.BI "congctl lock" " NAME " "(Linux 3.20+ only)" + Sets a specific TCP congestion control algorithm only for a given destination. + If not specified, Linux keeps the current global default TCP congestion control + algorithm, or the one set from the application. If the modifier +@@ -554,14 +554,14 @@ control algorithm for that destination, thus it will be enforced/guaranteed to + use the proposed algorithm. + + .TP +-.BI advmss " NUMBER " "(2.3.15+ only)" ++.BI advmss " NUMBER " "(Linux 2.3.15+ only)" + the MSS ('Maximal Segment Size') to advertise to these + destinations when establishing TCP connections. If it is not given, + Linux uses a default value calculated from the first hop device MTU. + (If the path to these destination is asymmetric, this guess may be wrong.) + + .TP +-.BI reordering " NUMBER " "(2.3.15+ only)" ++.BI reordering " NUMBER " "(Linux 2.3.15+ only)" + Maximal reordering on the path to this destination. + If it is not given, Linux uses the value selected with + .B sysctl +@@ -782,7 +782,7 @@ is a set of encapsulation attributes specific to the + .IR SEG6_ACTION " [ " + .IR SEG6_ACTION_PARAM " ] " + - Operation to perform on matching packets. +-The following actions are currently supported (\fB4.14+ only\fR). ++The following actions are currently supported (\fBLinux 4.14+ only\fR). + .in +2 + + .B End +@@ -830,7 +830,7 @@ address is set as described in \fBip-sr\fR(8). + .in -8 + + .TP +-.BI expires " TIME " "(4.4+ only)" ++.BI expires " TIME " "(Linux 4.4+ only)" + the route will be deleted after the expires time. + .B Only + support IPv6 at present. +-- +2.18.0 + diff --git a/iproute.spec b/iproute.spec index 1c37fba..415fdfa 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.18.0 -Release: 4%{?dist} +Release: 5%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -23,6 +23,8 @@ Patch6: 0006-Make-colored-output-configurable.patch Patch7: 0007-lib-Make-check_enable_color-return-boolean.patch # Fix for bz#1623488 Patch8: 0008-iprule-Fix-destination-prefix-output.patch +# Fix for bz#1391099 +Patch9: 0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -169,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Sep 19 2018 Phil Sutter - 4.18.0-5 +- man: ip-route: Clarify referenced versions are Linux ones + * Fri Aug 31 2018 Phil Sutter - 4.18.0-4 - iprule: Fix destination prefix output From 85b3e0591e9735e9828fa83142991bc66a0b0c2d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:48 +0100 Subject: [PATCH 049/111] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- iproute.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/iproute.spec b/iproute.spec index 415fdfa..0c4ad66 100644 --- a/iproute.spec +++ b/iproute.spec @@ -3,7 +3,6 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.18.0 Release: 5%{?dist} -Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: cbq-0000.example @@ -54,7 +53,6 @@ kernel. %package tc Summary: Linux Traffic Control utility -Group: Applications/System License: GPLv2+ Obsoletes: %{name} < 4.5.0-3 Requires: %{name}%{?_isa} = %{version}-%{release} @@ -68,7 +66,6 @@ Linux. %if ! 0%{?_module_build} %package doc Summary: Documentation for iproute2 utilities with examples -Group: Applications/System License: GPLv2+ %description doc @@ -77,7 +74,6 @@ The iproute documentation contains howtos and examples of settings. %package devel Summary: iproute development files -Group: Development/Libraries License: GPLv2+ Provides: iproute-static = %{version}-%{release} From 9a0f298de7a832169d26efa74786113b254dbf9f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 03:29:46 +0000 Subject: [PATCH 050/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 0c4ad66..ec8acd3 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.18.0 -Release: 5%{?dist} +Release: 6%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: cbq-0000.example @@ -167,6 +167,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 4.18.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Sep 19 2018 Phil Sutter - 4.18.0-5 - man: ip-route: Clarify referenced versions are Linux ones From e213879f21a1e48130bf7367f4a4afacd573607f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 1 Feb 2019 08:52:52 +0100 Subject: [PATCH 051/111] Rebase package on top of iproute2-4.20.0 --- .gitignore | 1 + iproute.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9604a67..6aa013a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /iproute2-4.18.0.tar.xz +/iproute2-4.20.0.tar.xz diff --git a/iproute.spec b/iproute.spec index ec8acd3..d6ac84b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.18.0 -Release: 6%{?dist} +Version: 4.20.04.20.0 +Release: 1%{?dist}1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: cbq-0000.example @@ -167,6 +167,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Feb 01 2019 Phil Sutter - 4.20.04.20.0-11 +- New version 4.20.0 + * Fri Feb 01 2019 Fedora Release Engineering - 4.18.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index db55208..a784c2e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.18.0.tar.xz) = c7c8e8e76c78faf63548da641769cf9f51811a308cd8eeec171f5f46423f116ff123033f11a554609825aba6d078c95dbbe36aa7ab23bd8d87b3a0d5100be1a9 +SHA512 (iproute2-4.20.0.tar.xz) = ed29638c864062e199152c7b3b24b6495987ca6f79cc9ab1b529dab37a8a840fa2b5858d5db2b94eeefa1c0d72ff666a790107e27d11a597b189bfb7a01a4b8b From ae59d604a29cfb2662e8c37176c3d56569e02fe5 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 1 Feb 2019 11:14:04 +0100 Subject: [PATCH 052/111] Rebase package on top of iproute2-4.20.0 --- 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch | 21 -- ...-fix-typo-in-check_xt_old_internal_h.patch | 30 +++ 0002-man-ss.8-more-line-breaks.patch | 47 ++++ 0002-ss-Review-ssfilter.patch | 130 ---------- 0003-man-tc-taprio.8-fix-syntax-error.patch | 34 +++ ...Fix-typo-in-check-for-colored-output.patch | 33 --- ...-bridge-Fix-check-for-colored-output.patch | 35 --- ...ode-for-conditionally-colored-output.patch | 97 -------- 0006-Make-colored-output-configurable.patch | 233 ------------------ ...ke-check_enable_color-return-boolean.patch | 59 ----- ...iprule-Fix-destination-prefix-output.patch | 40 --- ...rify-referenced-versions-are-Linux-o.patch | 132 ---------- avpkt | 1 - cbq-0000.example | 5 - iproute.spec | 68 ++--- 15 files changed, 128 insertions(+), 837 deletions(-) delete mode 100644 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch create mode 100644 0001-configure-fix-typo-in-check_xt_old_internal_h.patch create mode 100644 0002-man-ss.8-more-line-breaks.patch delete mode 100644 0002-ss-Review-ssfilter.patch create mode 100644 0003-man-tc-taprio.8-fix-syntax-error.patch delete mode 100644 0003-tc-Fix-typo-in-check-for-colored-output.patch delete mode 100644 0004-bridge-Fix-check-for-colored-output.patch delete mode 100644 0005-Merge-common-code-for-conditionally-colored-output.patch delete mode 100644 0006-Make-colored-output-configurable.patch delete mode 100644 0007-lib-Make-check_enable_color-return-boolean.patch delete mode 100644 0008-iprule-Fix-destination-prefix-output.patch delete mode 100644 0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch delete mode 100644 avpkt delete mode 100644 cbq-0000.example diff --git a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch deleted file mode 100644 index ac33332..0000000 --- a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 9c27b875aef25848adbebc8d13525bef3ec2ba45 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Fri, 17 Mar 2017 22:47:27 +0100 -Subject: [PATCH] Add cbq.8 as an alias to tc-cbq.8 - -Signed-off-by: Phil Sutter ---- - man/man8/cbq.8 | 1 + - 1 file changed, 1 insertion(+) - create mode 100644 man/man8/cbq.8 - -diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 -new file mode 100644 -index 0000000000000..bef35201f4eab ---- /dev/null -+++ b/man/man8/cbq.8 -@@ -0,0 +1 @@ -+.so man8/tc-cbq.8 --- -2.18.0 - diff --git a/0001-configure-fix-typo-in-check_xt_old_internal_h.patch b/0001-configure-fix-typo-in-check_xt_old_internal_h.patch new file mode 100644 index 0000000..5f57dd2 --- /dev/null +++ b/0001-configure-fix-typo-in-check_xt_old_internal_h.patch @@ -0,0 +1,30 @@ +From 00e0e82a31cede883b2784f08377008c3e996857 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Tue, 8 Jan 2019 01:37:15 +0300 +Subject: [PATCH] configure: fix typo in check_xt_old_internal_h + +Fixes: 377a09902a57 ("configure: Minor code cleanup") +Signed-off-by: Dmitry V. Levin +Signed-off-by: Stephen Hemminger +(cherry picked from commit db4ad742e196a3d76cd72ae1257bf444584fa5c5) +Signed-off-by: Phil Sutter +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index b85eb58b2ba9e..45fcffb69bb53 100755 +--- a/configure ++++ b/configure +@@ -115,7 +115,7 @@ EOF + check_xt_old_internal_h() + { + # bail if previous XT checks has already succeeded. +- grep -q if grep -q TC_CONFIG_XT $CONFIG && return ++ grep -q TC_CONFIG_XT $CONFIG && return + + #check if we need our own internal.h + cat >$TMPDIR/ipttest.c < +Date: Sat, 12 Jan 2019 12:28:54 +0000 +Subject: [PATCH] man: ss.8: more line breaks + +groff stiff complains about unbreakable lines: + 96: warning [p 2, 3.0i]: can't break line + +Indent it some more. + +Fixes: 7f5047524c99 ("man: ss.8: break and indent long line") + +Signed-off-by: Luca Boccassi +Signed-off-by: Stephen Hemminger +(cherry picked from commit cffeeb39466bdfcead182138e1f4c6881384ab16) +Signed-off-by: Phil Sutter +--- + man/man8/ss.8 | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/man/man8/ss.8 b/man/man8/ss.8 +index f138c91a1fcc4..553a6cf46f0e2 100644 +--- a/man/man8/ss.8 ++++ b/man/man8/ss.8 +@@ -89,11 +89,17 @@ an uuid of the socket + Show socket memory usage. The output format is: + .RS + .P +-skmem:(r,rb,t,tb,f, ++skmem:(r,rb,t,tb, + .br + .RS + .RS +-w,o,bl) ++f,w, ++.RE ++.RE ++.br ++.RS ++.RS ++o,bl) + .RE + .RE + .P +-- +2.20.1 + diff --git a/0002-ss-Review-ssfilter.patch b/0002-ss-Review-ssfilter.patch deleted file mode 100644 index eda0c52..0000000 --- a/0002-ss-Review-ssfilter.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 45ef10dd7b9d4337bfef9573803c1c7cadc012e6 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Tue, 14 Aug 2018 14:18:06 +0200 -Subject: [PATCH] ss: Review ssfilter - -The original problem was ssfilter rejecting single expressions if -enclosed in braces, such as: - -| sport = 22 or ( dport = 22 ) - -This is fixed by allowing 'expr' to be an 'exprlist' enclosed in braces. -The no longer required recursion in 'exprlist' being an 'exprlist' -enclosed in braces is dropped. - -In addition to that, a few other things are changed: - -* Remove pointless 'null' prefix in 'appled' before 'exprlist'. -* For simple equals matches, '=' operator was required for ports but not - allowed for hosts. Make this consistent by making '=' operator - optional in both cases. - -Reported-by: Samuel Mannehed -Fixes: b2038cc0b2403 ("ssfilter: Eliminate shift/reduce conflicts") -Signed-off-by: Phil Sutter -Signed-off-by: Stephen Hemminger -(cherry picked from commit 38d209ecf2ae966b9b25de4acb60cdffb0e06ced) -Signed-off-by: Phil Sutter ---- - misc/ssfilter.y | 36 +++++++++++++++++++++--------------- - 1 file changed, 21 insertions(+), 15 deletions(-) - -diff --git a/misc/ssfilter.y b/misc/ssfilter.y -index 88d4229a9b241..0413dddaa7584 100644 ---- a/misc/ssfilter.y -+++ b/misc/ssfilter.y -@@ -42,24 +42,22 @@ static void yyerror(char *s) - %nonassoc '!' - - %% --applet: null exprlist -+applet: exprlist - { -- *yy_ret = $2; -- $$ = $2; -+ *yy_ret = $1; -+ $$ = $1; - } - | null - ; -+ - null: /* NOTHING */ { $$ = NULL; } - ; -+ - exprlist: expr - | '!' expr - { - $$ = alloc_node(SSF_NOT, $2); - } -- | '(' exprlist ')' -- { -- $$ = $2; -- } - | exprlist '|' expr - { - $$ = alloc_node(SSF_OR, $1); -@@ -77,13 +75,21 @@ exprlist: expr - } - ; - --expr: DCOND HOSTCOND -+eq: '=' -+ | /* nothing */ -+ ; -+ -+expr: '(' exprlist ')' -+ { -+ $$ = $2; -+ } -+ | DCOND eq HOSTCOND - { -- $$ = alloc_node(SSF_DCOND, $2); -+ $$ = alloc_node(SSF_DCOND, $3); - } -- | SCOND HOSTCOND -+ | SCOND eq HOSTCOND - { -- $$ = alloc_node(SSF_SCOND, $2); -+ $$ = alloc_node(SSF_SCOND, $3); - } - | DPORT GEQ HOSTCOND - { -@@ -101,7 +107,7 @@ expr: DCOND HOSTCOND - { - $$ = alloc_node(SSF_NOT, alloc_node(SSF_D_GE, $3)); - } -- | DPORT '=' HOSTCOND -+ | DPORT eq HOSTCOND - { - $$ = alloc_node(SSF_DCOND, $3); - } -@@ -126,7 +132,7 @@ expr: DCOND HOSTCOND - { - $$ = alloc_node(SSF_NOT, alloc_node(SSF_S_GE, $3)); - } -- | SPORT '=' HOSTCOND -+ | SPORT eq HOSTCOND - { - $$ = alloc_node(SSF_SCOND, $3); - } -@@ -134,7 +140,7 @@ expr: DCOND HOSTCOND - { - $$ = alloc_node(SSF_NOT, alloc_node(SSF_SCOND, $3)); - } -- | DEVNAME '=' DEVCOND -+ | DEVNAME eq DEVCOND - { - $$ = alloc_node(SSF_DEVCOND, $3); - } -@@ -142,7 +148,7 @@ expr: DCOND HOSTCOND - { - $$ = alloc_node(SSF_NOT, alloc_node(SSF_DEVCOND, $3)); - } -- | FWMARK '=' MARKMASK -+ | FWMARK eq MARKMASK - { - $$ = alloc_node(SSF_MARKMASK, $3); - } --- -2.18.0 - diff --git a/0003-man-tc-taprio.8-fix-syntax-error.patch b/0003-man-tc-taprio.8-fix-syntax-error.patch new file mode 100644 index 0000000..af6dfab --- /dev/null +++ b/0003-man-tc-taprio.8-fix-syntax-error.patch @@ -0,0 +1,34 @@ +From 06dfededed954e6d98450ae8f57d561359f2430e Mon Sep 17 00:00:00 2001 +From: Luca Boccassi +Date: Sat, 12 Jan 2019 12:28:55 +0000 +Subject: [PATCH] man: tc-taprio.8: fix syntax error + +.Q does not exist so groff complains and the "queues" word is actually +not displayed. + +Fixes: 579acb4bc52f ("taprio: Add manpage for tc-taprio(8)") + +Signed-off-by: Luca Boccassi +Signed-off-by: Stephen Hemminger +(cherry picked from commit 8242808ced032d56d690ae66a93fa52e8d0ada9a) +Signed-off-by: Phil Sutter +--- + man/man8/tc-taprio.8 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/man8/tc-taprio.8 b/man/man8/tc-taprio.8 +index 92055b434b942..850be9b036491 100644 +--- a/man/man8/tc-taprio.8 ++++ b/man/man8/tc-taprio.8 +@@ -45,7 +45,7 @@ How traffic is mapped to different hardware queues is similar to + and so the + .B map + and +-.Q queues ++.B queues + parameters have the same meaning. + + The other parameters specify the schedule, and at what point in time +-- +2.20.1 + diff --git a/0003-tc-Fix-typo-in-check-for-colored-output.patch b/0003-tc-Fix-typo-in-check-for-colored-output.patch deleted file mode 100644 index 46a2093..0000000 --- a/0003-tc-Fix-typo-in-check-for-colored-output.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1824d687058b2c818ae057321d7ca67de46b0fbb Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Wed, 15 Aug 2018 18:21:24 +0200 -Subject: [PATCH] tc: Fix typo in check for colored output - -The check used binary instead of boolean AND, which means colored output -was enabled only if the number of specified '-color' flags was odd. - -Fixes: 2d165c0811058 ("tc: implement color output") -Signed-off-by: Phil Sutter -Signed-off-by: David Ahern -(cherry picked from commit 0d0e0e0bef68f888bedb8d8f343baa943207dafc) -Signed-off-by: Phil Sutter ---- - tc/tc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tc/tc.c b/tc/tc.c -index 3bb5910ffac52..3bb893756f40e 100644 ---- a/tc/tc.c -+++ b/tc/tc.c -@@ -515,7 +515,7 @@ int main(int argc, char **argv) - - _SL_ = oneline ? "\\" : "\n"; - -- if (color & !json) -+ if (color && !json) - enable_color(); - - if (batch_file) --- -2.18.0 - diff --git a/0004-bridge-Fix-check-for-colored-output.patch b/0004-bridge-Fix-check-for-colored-output.patch deleted file mode 100644 index 696afaa..0000000 --- a/0004-bridge-Fix-check-for-colored-output.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 02a126e40fce4fe03fdc9ce39bd3d9ff20dd1fb0 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Wed, 15 Aug 2018 18:21:25 +0200 -Subject: [PATCH] bridge: Fix check for colored output - -There is no point in calling enable_color() conditionally if it was -already called for each time '-color' flag was parsed. Align the -algorithm with that in ip and tc by actually making use of 'color' -variable. - -Fixes: e9625d6aead11 ("Merge branch 'iproute2-master' into iproute2-next") -Signed-off-by: Phil Sutter -Signed-off-by: David Ahern -(cherry picked from commit 5332148debeadcf52cc157ef1dd0a377dd482517) -Signed-off-by: Phil Sutter ---- - bridge/bridge.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bridge/bridge.c b/bridge/bridge.c -index 7fcfe1116f6e5..289a157d37f03 100644 ---- a/bridge/bridge.c -+++ b/bridge/bridge.c -@@ -174,7 +174,7 @@ main(int argc, char **argv) - if (netns_switch(argv[1])) - exit(-1); - } else if (matches(opt, "-color") == 0) { -- enable_color(); -+ ++color; - } else if (matches(opt, "-compressvlans") == 0) { - ++compress_vlans; - } else if (matches(opt, "-force") == 0) { --- -2.18.0 - diff --git a/0005-Merge-common-code-for-conditionally-colored-output.patch b/0005-Merge-common-code-for-conditionally-colored-output.patch deleted file mode 100644 index 58509b4..0000000 --- a/0005-Merge-common-code-for-conditionally-colored-output.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 9aef957dfc6c46468b6469d4e0e275011546753b Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Wed, 15 Aug 2018 18:21:26 +0200 -Subject: [PATCH] Merge common code for conditionally colored output - -Instead of calling enable_color() conditionally with identical check in -three places, introduce check_enable_color() which does it in one place. - -Signed-off-by: Phil Sutter -Signed-off-by: David Ahern -(cherry picked from commit 4d82962cccc6a6b543fa2110e81621c51441f0dd) -Signed-off-by: Phil Sutter ---- - bridge/bridge.c | 3 +-- - include/color.h | 1 + - ip/ip.c | 3 +-- - lib/color.c | 9 +++++++++ - tc/tc.c | 3 +-- - 5 files changed, 13 insertions(+), 6 deletions(-) - -diff --git a/bridge/bridge.c b/bridge/bridge.c -index 289a157d37f03..451d684e0bcfd 100644 ---- a/bridge/bridge.c -+++ b/bridge/bridge.c -@@ -200,8 +200,7 @@ main(int argc, char **argv) - - _SL_ = oneline ? "\\" : "\n"; - -- if (color && !json) -- enable_color(); -+ check_enable_color(color, json); - - if (batch_file) - return batch(batch_file); -diff --git a/include/color.h b/include/color.h -index c80359d3e2e95..4f2c918db7e43 100644 ---- a/include/color.h -+++ b/include/color.h -@@ -13,6 +13,7 @@ enum color_attr { - }; - - void enable_color(void); -+int check_enable_color(int color, int json); - void set_color_palette(void); - int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...); - enum color_attr ifa_family_color(__u8 ifa_family); -diff --git a/ip/ip.c b/ip/ip.c -index 71d5170c0cc23..38eac5ec1e17d 100644 ---- a/ip/ip.c -+++ b/ip/ip.c -@@ -304,8 +304,7 @@ int main(int argc, char **argv) - - _SL_ = oneline ? "\\" : "\n"; - -- if (color && !json) -- enable_color(); -+ check_enable_color(color, json); - - if (batch_file) - return batch(batch_file); -diff --git a/lib/color.c b/lib/color.c -index da1f516cb2492..edf96e5c6ecd7 100644 ---- a/lib/color.c -+++ b/lib/color.c -@@ -77,6 +77,15 @@ void enable_color(void) - set_color_palette(); - } - -+int check_enable_color(int color, int json) -+{ -+ if (color && !json) { -+ enable_color(); -+ return 0; -+ } -+ return 1; -+} -+ - void set_color_palette(void) - { - char *p = getenv("COLORFGBG"); -diff --git a/tc/tc.c b/tc/tc.c -index 3bb893756f40e..e775550174473 100644 ---- a/tc/tc.c -+++ b/tc/tc.c -@@ -515,8 +515,7 @@ int main(int argc, char **argv) - - _SL_ = oneline ? "\\" : "\n"; - -- if (color && !json) -- enable_color(); -+ check_enable_color(color, json); - - if (batch_file) - return batch(batch_file); --- -2.18.0 - diff --git a/0006-Make-colored-output-configurable.patch b/0006-Make-colored-output-configurable.patch deleted file mode 100644 index a65b06d..0000000 --- a/0006-Make-colored-output-configurable.patch +++ /dev/null @@ -1,233 +0,0 @@ -From 889c7c942e23c77118ed5cdb610f53c13a5bfea8 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Fri, 17 Aug 2018 18:38:45 +0200 -Subject: [PATCH] Make colored output configurable - -Allow for -color={never,auto,always} to have colored output disabled, -enabled only if stdout is a terminal or enabled regardless of stdout -state. - -Signed-off-by: Phil Sutter -Reviewed-by: David Ahern -Signed-off-by: Stephen Hemminger -(cherry picked from commit ff1ab8edf827f55b86c6487c90b7454975d52236) -Signed-off-by: Phil Sutter ---- - bridge/bridge.c | 3 +-- - include/color.h | 9 +++++++++ - ip/ip.c | 3 +-- - lib/color.c | 33 ++++++++++++++++++++++++++++++++- - man/man8/bridge.8 | 13 +++++++++++-- - man/man8/ip.8 | 13 +++++++++++-- - man/man8/tc.8 | 13 +++++++++++-- - tc/tc.c | 3 +-- - 8 files changed, 77 insertions(+), 13 deletions(-) - -diff --git a/bridge/bridge.c b/bridge/bridge.c -index 451d684e0bcfd..263fa5397a623 100644 ---- a/bridge/bridge.c -+++ b/bridge/bridge.c -@@ -173,8 +173,7 @@ main(int argc, char **argv) - NEXT_ARG(); - if (netns_switch(argv[1])) - exit(-1); -- } else if (matches(opt, "-color") == 0) { -- ++color; -+ } else if (matches_color(opt, &color)) { - } else if (matches(opt, "-compressvlans") == 0) { - ++compress_vlans; - } else if (matches(opt, "-force") == 0) { -diff --git a/include/color.h b/include/color.h -index 4f2c918db7e43..a22a00c2277e0 100644 ---- a/include/color.h -+++ b/include/color.h -@@ -2,6 +2,8 @@ - #ifndef __COLOR_H__ - #define __COLOR_H__ 1 - -+#include -+ - enum color_attr { - COLOR_IFNAME, - COLOR_MAC, -@@ -12,8 +14,15 @@ enum color_attr { - COLOR_NONE - }; - -+enum color_opt { -+ COLOR_OPT_NEVER = 0, -+ COLOR_OPT_AUTO = 1, -+ COLOR_OPT_ALWAYS = 2 -+}; -+ - void enable_color(void); - int check_enable_color(int color, int json); -+bool matches_color(const char *arg, int *val); - void set_color_palette(void); - int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...); - enum color_attr ifa_family_color(__u8 ifa_family); -diff --git a/ip/ip.c b/ip/ip.c -index 38eac5ec1e17d..4fe471d99dc97 100644 ---- a/ip/ip.c -+++ b/ip/ip.c -@@ -283,8 +283,7 @@ int main(int argc, char **argv) - exit(-1); - } - rcvbuf = size; -- } else if (matches(opt, "-color") == 0) { -- ++color; -+ } else if (matches_color(opt, &color)) { - } else if (matches(opt, "-help") == 0) { - usage(); - } else if (matches(opt, "-netns") == 0) { -diff --git a/lib/color.c b/lib/color.c -index edf96e5c6ecd7..9c9023587748f 100644 ---- a/lib/color.c -+++ b/lib/color.c -@@ -3,11 +3,13 @@ - #include - #include - #include -+#include - #include - #include - #include - - #include "color.h" -+#include "utils.h" - - enum color { - C_RED, -@@ -79,13 +81,42 @@ void enable_color(void) - - int check_enable_color(int color, int json) - { -- if (color && !json) { -+ if (json || color == COLOR_OPT_NEVER) -+ return 1; -+ -+ if (color == COLOR_OPT_ALWAYS || isatty(fileno(stdout))) { - enable_color(); - return 0; - } - return 1; - } - -+bool matches_color(const char *arg, int *val) -+{ -+ char *dup, *p; -+ -+ if (!val) -+ return false; -+ -+ dup = strdupa(arg); -+ p = strchrnul(dup, '='); -+ if (*p) -+ *(p++) = '\0'; -+ -+ if (matches(dup, "-color")) -+ return false; -+ -+ if (*p == '\0' || !strcmp(p, "always")) -+ *val = COLOR_OPT_ALWAYS; -+ else if (!strcmp(p, "auto")) -+ *val = COLOR_OPT_AUTO; -+ else if (!strcmp(p, "never")) -+ *val = COLOR_OPT_NEVER; -+ else -+ return false; -+ return true; -+} -+ - void set_color_palette(void) - { - char *p = getenv("COLORFGBG"); -diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 -index e7f7148315e19..9684169844f36 100644 ---- a/man/man8/bridge.8 -+++ b/man/man8/bridge.8 -@@ -170,8 +170,17 @@ If there were any errors during execution of the commands, the application - return code will be non zero. - - .TP --.BR "\-c" , " -color" --Use color output. -+.BR \-c [ color ][ = { always | auto | never } -+Configure color output. If parameter is omitted or -+.BR always , -+color output is enabled regardless of stdout state. If parameter is -+.BR auto , -+stdout is checked to be a terminal before enabling color output. If parameter is -+.BR never , -+color output is disabled. If specified multiple times, the last one takes -+precedence. This flag is ignored if -+.B \-json -+is also given. - - .TP - .BR "\-j", " \-json" -diff --git a/man/man8/ip.8 b/man/man8/ip.8 -index 0087d18b74706..1d358879ec39c 100644 ---- a/man/man8/ip.8 -+++ b/man/man8/ip.8 -@@ -187,8 +187,17 @@ to - executes specified command over all objects, it depends if command supports this option. - - .TP --.BR "\-c" , " -color" --Use color output. -+.BR \-c [ color ][ = { always | auto | never } -+Configure color output. If parameter is omitted or -+.BR always , -+color output is enabled regardless of stdout state. If parameter is -+.BR auto , -+stdout is checked to be a terminal before enabling color output. If parameter is -+.BR never , -+color output is disabled. If specified multiple times, the last one takes -+precedence. This flag is ignored if -+.B \-json -+is also given. - - .TP - .BR "\-t" , " \-timestamp" -diff --git a/man/man8/tc.8 b/man/man8/tc.8 -index 840880fbdba63..a5849a776c592 100644 ---- a/man/man8/tc.8 -+++ b/man/man8/tc.8 -@@ -729,8 +729,17 @@ option was specified. Classes can be filtered only by - option. - - .TP --.BR "\ -color" --Use color output. -+.BR \-c [ color ][ = { always | auto | never } -+Configure color output. If parameter is omitted or -+.BR always , -+color output is enabled regardless of stdout state. If parameter is -+.BR auto , -+stdout is checked to be a terminal before enabling color output. If parameter is -+.BR never , -+color output is disabled. If specified multiple times, the last one takes -+precedence. This flag is ignored if -+.B \-json -+is also given. - - .TP - .BR "\-j", " \-json" -diff --git a/tc/tc.c b/tc/tc.c -index e775550174473..586db30cb87c2 100644 ---- a/tc/tc.c -+++ b/tc/tc.c -@@ -493,8 +493,7 @@ int main(int argc, char **argv) - matches(argv[1], "-conf") == 0) { - NEXT_ARG(); - conf_file = argv[1]; -- } else if (matches(argv[1], "-color") == 0) { -- ++color; -+ } else if (matches_color(argv[1], &color)) { - } else if (matches(argv[1], "-timestamp") == 0) { - timestamp++; - } else if (matches(argv[1], "-tshort") == 0) { --- -2.18.0 - diff --git a/0007-lib-Make-check_enable_color-return-boolean.patch b/0007-lib-Make-check_enable_color-return-boolean.patch deleted file mode 100644 index b80f49c..0000000 --- a/0007-lib-Make-check_enable_color-return-boolean.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 028f717e06d8496e15de6c4eaef3ecd88bd9c8d0 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Fri, 17 Aug 2018 18:38:46 +0200 -Subject: [PATCH] lib: Make check_enable_color() return boolean - -As suggested, turn return code into true/false although it's not checked -anywhere yet. - -Fixes: 4d82962cccc6a ("Merge common code for conditionally colored output") -Signed-off-by: Phil Sutter -Signed-off-by: Stephen Hemminger -(cherry picked from commit 515a766cd29bbed8a180733e93bc8590b001cad7) -Signed-off-by: Phil Sutter ---- - include/color.h | 2 +- - lib/color.c | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/include/color.h b/include/color.h -index a22a00c2277e0..e30f28c51c844 100644 ---- a/include/color.h -+++ b/include/color.h -@@ -21,7 +21,7 @@ enum color_opt { - }; - - void enable_color(void); --int check_enable_color(int color, int json); -+bool check_enable_color(int color, int json); - bool matches_color(const char *arg, int *val); - void set_color_palette(void); - int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...); -diff --git a/lib/color.c b/lib/color.c -index 9c9023587748f..eaf69e74d673a 100644 ---- a/lib/color.c -+++ b/lib/color.c -@@ -79,16 +79,16 @@ void enable_color(void) - set_color_palette(); - } - --int check_enable_color(int color, int json) -+bool check_enable_color(int color, int json) - { - if (json || color == COLOR_OPT_NEVER) -- return 1; -+ return false; - - if (color == COLOR_OPT_ALWAYS || isatty(fileno(stdout))) { - enable_color(); -- return 0; -+ return true; - } -- return 1; -+ return false; - } - - bool matches_color(const char *arg, int *val) --- -2.18.0 - diff --git a/0008-iprule-Fix-destination-prefix-output.patch b/0008-iprule-Fix-destination-prefix-output.patch deleted file mode 100644 index a5b8b83..0000000 --- a/0008-iprule-Fix-destination-prefix-output.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b068329d161b5841e9e451fcf542987c3e487e70 Mon Sep 17 00:00:00 2001 -From: Stefan Bader -Date: Tue, 28 Aug 2018 16:27:29 +0200 -Subject: [PATCH] iprule: Fix destination prefix output - -When adding support for JSON output the new code for printing -the destination prefix adds a stray blank character before -the bitmask. This causes some user-space parsing to fail. - -Current output: - ...: from x.x.x.x/l to y.y.y.y /l -Previous output: - ...: from x.x.x.x/l to y.y.y.y/l - -Fixes: 0dd4ccc5 "iprule: add json support" -Signed-off-by: Stefan Bader -Acked-by: Luca Boccassi -Signed-off-by: Stephen Hemminger -(cherry picked from commit 1a75322c5a8dee6e1ed0017d76c87ef85c505b98) -Signed-off-by: Phil Sutter ---- - ip/iprule.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ip/iprule.c b/ip/iprule.c -index 8b9421431c26a..744d6d88e3433 100644 ---- a/ip/iprule.c -+++ b/ip/iprule.c -@@ -239,7 +239,7 @@ int print_rule(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) - - print_string(PRINT_FP, NULL, "to ", NULL); - print_color_string(PRINT_ANY, ifa_family_color(frh->family), -- "dst", "%s ", dst); -+ "dst", "%s", dst); - if (frh->dst_len != host_len) - print_uint(PRINT_ANY, "dstlen", "/%u ", frh->dst_len); - else --- -2.18.0 - diff --git a/0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch b/0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch deleted file mode 100644 index a2ff88f..0000000 --- a/0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 100905845b930a10174cc239895858a534c10906 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Wed, 15 Aug 2018 11:18:26 +0200 -Subject: [PATCH] man: ip-route: Clarify referenced versions are Linux ones - -Versioning scheme of Linux and iproute2 is similar, therefore the -referenced kernel versions are likely to confuse readers. Clarify this -by prefixing each kernel version by 'Linux' prefix. - -Signed-off-by: Phil Sutter -Signed-off-by: Stephen Hemminger -(cherry picked from commit 8a03a2f36f767bd36b22929c78a370bd43059aee) -Signed-off-by: Phil Sutter ---- - man/man8/ip-route.8.in | 30 +++++++++++++++--------------- - 1 file changed, 15 insertions(+), 15 deletions(-) - -diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in -index b21a847241427..a33ce1f0f4006 100644 ---- a/man/man8/ip-route.8.in -+++ b/man/man8/ip-route.8.in -@@ -483,43 +483,43 @@ seconds and ms, msec or msecs to specify milliseconds. - - - .TP --.BI rttvar " TIME " "(2.3.15+ only)" -+.BI rttvar " TIME " "(Linux 2.3.15+ only)" - the initial RTT variance estimate. Values are specified as with - .BI rtt - above. - - .TP --.BI rto_min " TIME " "(2.6.23+ only)" -+.BI rto_min " TIME " "(Linux 2.6.23+ only)" - the minimum TCP Retransmission TimeOut to use when communicating with this - destination. Values are specified as with - .BI rtt - above. - - .TP --.BI ssthresh " NUMBER " "(2.3.15+ only)" -+.BI ssthresh " NUMBER " "(Linux 2.3.15+ only)" - an estimate for the initial slow start threshold. - - .TP --.BI cwnd " NUMBER " "(2.3.15+ only)" -+.BI cwnd " NUMBER " "(Linux 2.3.15+ only)" - the clamp for congestion window. It is ignored if the - .B lock - flag is not used. - - .TP --.BI initcwnd " NUMBER " "(2.5.70+ only)" -+.BI initcwnd " NUMBER " "(Linux 2.5.70+ only)" - the initial congestion window size for connections to this destination. - Actual window size is this value multiplied by the MSS - (``Maximal Segment Size'') for same connection. The default is - zero, meaning to use the values specified in RFC2414. - - .TP --.BI initrwnd " NUMBER " "(2.6.33+ only)" -+.BI initrwnd " NUMBER " "(Linux 2.6.33+ only)" - the initial receive window size for connections to this destination. - Actual window size is this value multiplied by the MSS of the connection. - The default value is zero, meaning to use Slow Start value. - - .TP --.BI features " FEATURES " (3.18+ only) -+.BI features " FEATURES " (Linux 3.18+ only) - Enable or disable per-route features. Only available feature at this - time is - .B ecn -@@ -531,17 +531,17 @@ also be used even if the - sysctl is set to 0. - - .TP --.BI quickack " BOOL " "(3.11+ only)" -+.BI quickack " BOOL " "(Linux 3.11+ only)" - Enable or disable quick ack for connections to this destination. - - .TP --.BI fastopen_no_cookie " BOOL " "(4.15+ only)" -+.BI fastopen_no_cookie " BOOL " "(Linux 4.15+ only)" - Enable TCP Fastopen without a cookie for connections to this destination. - - .TP --.BI congctl " NAME " "(3.20+ only)" -+.BI congctl " NAME " "(Linux 3.20+ only)" - .TP --.BI "congctl lock" " NAME " "(3.20+ only)" -+.BI "congctl lock" " NAME " "(Linux 3.20+ only)" - Sets a specific TCP congestion control algorithm only for a given destination. - If not specified, Linux keeps the current global default TCP congestion control - algorithm, or the one set from the application. If the modifier -@@ -554,14 +554,14 @@ control algorithm for that destination, thus it will be enforced/guaranteed to - use the proposed algorithm. - - .TP --.BI advmss " NUMBER " "(2.3.15+ only)" -+.BI advmss " NUMBER " "(Linux 2.3.15+ only)" - the MSS ('Maximal Segment Size') to advertise to these - destinations when establishing TCP connections. If it is not given, - Linux uses a default value calculated from the first hop device MTU. - (If the path to these destination is asymmetric, this guess may be wrong.) - - .TP --.BI reordering " NUMBER " "(2.3.15+ only)" -+.BI reordering " NUMBER " "(Linux 2.3.15+ only)" - Maximal reordering on the path to this destination. - If it is not given, Linux uses the value selected with - .B sysctl -@@ -782,7 +782,7 @@ is a set of encapsulation attributes specific to the - .IR SEG6_ACTION " [ " - .IR SEG6_ACTION_PARAM " ] " - - Operation to perform on matching packets. --The following actions are currently supported (\fB4.14+ only\fR). -+The following actions are currently supported (\fBLinux 4.14+ only\fR). - .in +2 - - .B End -@@ -830,7 +830,7 @@ address is set as described in \fBip-sr\fR(8). - .in -8 - - .TP --.BI expires " TIME " "(4.4+ only)" -+.BI expires " TIME " "(Linux 4.4+ only)" - the route will be deleted after the expires time. - .B Only - support IPv6 at present. --- -2.18.0 - diff --git a/avpkt b/avpkt deleted file mode 100644 index c362b94..0000000 --- a/avpkt +++ /dev/null @@ -1 +0,0 @@ -AVPKT=3000 diff --git a/cbq-0000.example b/cbq-0000.example deleted file mode 100644 index 5503374..0000000 --- a/cbq-0000.example +++ /dev/null @@ -1,5 +0,0 @@ -DEVICE=eth0,10Mbit,1Mbit -RATE=128Kbit -WEIGHT=10Kbit -PRIO=5 -RULE=192.168.1.0/24 diff --git a/iproute.spec b/iproute.spec index d6ac84b..cc69f88 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,36 +1,22 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.20.04.20.0 -Release: 1%{?dist}1%{?dist} +Version: 4.20.0 +Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Source1: cbq-0000.example -Source2: avpkt -# Fedora local docs changes: -# - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links -# to tc-cbq.8. -Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch -# Fix for bz#1615373 -Patch2: 0002-ss-Review-ssfilter.patch -# Fix for bz#1582898 -Patch3: 0003-tc-Fix-typo-in-check-for-colored-output.patch -Patch4: 0004-bridge-Fix-check-for-colored-output.patch -Patch5: 0005-Merge-common-code-for-conditionally-colored-output.patch -Patch6: 0006-Make-colored-output-configurable.patch -Patch7: 0007-lib-Make-check_enable_color-return-boolean.patch -# Fix for bz#1623488 -Patch8: 0008-iprule-Fix-destination-prefix-output.patch -# Fix for bz#1391099 -Patch9: 0009-man-ip-route-Clarify-referenced-versions-are-Linux-o.patch +Patch0: 0001-configure-fix-typo-in-check_xt_old_internal_h.patch +Patch1: 0002-man-ss.8-more-line-breaks.patch +Patch2: 0003-man-tc-taprio.8-fix-syntax-error.patch License: GPLv2+ and Public Domain -BuildRequires: gcc +BuildRequires: gcc BuildRequires: bison BuildRequires: elfutils-libelf-devel BuildRequires: flex BuildRequires: iptables-devel >= 1.4.5 +BuildRequires: libcap-devel BuildRequires: libdb-devel BuildRequires: libmnl-devel BuildRequires: libselinux-devel @@ -84,10 +70,10 @@ The libnetlink static library. %autosetup -p1 -n %{name}2-%{version} %build -export CFLAGS="%{optflags}" -export LDFLAGS="%{build_ldflags}" -export LIBDIR=/%{_libdir} -export IPT_LIB_DIR=/%{_lib}/xtables +export CFLAGS='%{optflags}' +export LDFLAGS='%{build_ldflags}' +export LIBDIR='%{_libdir}' +export IPT_LIB_DIR='/%{_lib}/xtables' ./configure make %{?_smp_mflags} @@ -100,41 +86,22 @@ export CONFDIR='%{_sysconfdir}/iproute2' export DOCDIR='%{_docdir}' make install -install -m755 examples/cbq.init-%{cbq_version} ${DESTDIR}/${SBINDIR}/cbq - -install -d -m755 %{buildroot}%{_sysconfdir}/sysconfig/cbq -for config in \ - %{SOURCE1} \ - %{SOURCE2} - do install -m644 ${config} %{buildroot}%{_sysconfdir}/sysconfig/cbq -done - -# extra man pages from Patch1, seems like these are not mainline yet -for mp in cbq genl ifcfg ifstat; do - install -m644 man/man8/${mp}.8 %{buildroot}%{_mandir}/man8 -done - # libnetlink install -D -m644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a -# drop these files, iproute-doc package extracts files directly from _builddir -rm -rf '%{buildroot}%{_docdir}' - %files %dir %{_sysconfdir}/iproute2 %{!?_licensedir:%global license %%doc} %license COPYING -%doc README README.decnet README.distribution README.lnstat +%doc README README.distribution README.lnstat %{_mandir}/man7/* %exclude %{_mandir}/man7/tc-* %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* -%exclude %{_mandir}/man8/cbq* %attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc -%exclude %{_sbindir}/cbq %files tc %{!?_licensedir:%global license %%doc} @@ -142,20 +109,16 @@ rm -rf '%{buildroot}%{_docdir}' %doc README.iproute2+tc %{_mandir}/man7/tc-* %{_mandir}/man8/tc* -%{_mandir}/man8/cbq* %dir %{_libdir}/tc/ %{_libdir}/tc/* %{_sbindir}/tc -%{_sbindir}/cbq -%dir %{_sysconfdir}/sysconfig/cbq -%config(noreplace) %{_sysconfdir}/sysconfig/cbq/* %{_datadir}/bash-completion/completions/tc %if ! 0%{?_module_build} %files doc %{!?_licensedir:%global license %%doc} %license COPYING -%doc examples +%doc %{_docdir}/examples %endif %files devel @@ -167,8 +130,11 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog -* Fri Feb 01 2019 Phil Sutter - 4.20.04.20.0-11 +* Fri Feb 01 2019 Phil Sutter - 4.20.0-1 - New version 4.20.0 +- Add upstream-suggested backports +- Upstream dropped cbq script, remove it along with related configs +- Add libcap support * Fri Feb 01 2019 Fedora Release Engineering - 4.18.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 5a8ceeb8244b790e3769ca7d84f2b421e4a7fb2d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 20 Mar 2019 08:42:58 +0100 Subject: [PATCH 053/111] Rebase package on top of iproute2-5.0.0 --- .gitignore | 1 + ...-fix-typo-in-check_xt_old_internal_h.patch | 30 ------------ 0002-man-ss.8-more-line-breaks.patch | 47 ------------------- 0003-man-tc-taprio.8-fix-syntax-error.patch | 34 -------------- iproute.spec | 15 ++---- sources | 2 +- 6 files changed, 7 insertions(+), 122 deletions(-) delete mode 100644 0001-configure-fix-typo-in-check_xt_old_internal_h.patch delete mode 100644 0002-man-ss.8-more-line-breaks.patch delete mode 100644 0003-man-tc-taprio.8-fix-syntax-error.patch diff --git a/.gitignore b/.gitignore index 6aa013a..44778c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /iproute2-4.18.0.tar.xz /iproute2-4.20.0.tar.xz +/iproute2-5.0.0.tar.xz diff --git a/0001-configure-fix-typo-in-check_xt_old_internal_h.patch b/0001-configure-fix-typo-in-check_xt_old_internal_h.patch deleted file mode 100644 index 5f57dd2..0000000 --- a/0001-configure-fix-typo-in-check_xt_old_internal_h.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 00e0e82a31cede883b2784f08377008c3e996857 Mon Sep 17 00:00:00 2001 -From: "Dmitry V. Levin" -Date: Tue, 8 Jan 2019 01:37:15 +0300 -Subject: [PATCH] configure: fix typo in check_xt_old_internal_h - -Fixes: 377a09902a57 ("configure: Minor code cleanup") -Signed-off-by: Dmitry V. Levin -Signed-off-by: Stephen Hemminger -(cherry picked from commit db4ad742e196a3d76cd72ae1257bf444584fa5c5) -Signed-off-by: Phil Sutter ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index b85eb58b2ba9e..45fcffb69bb53 100755 ---- a/configure -+++ b/configure -@@ -115,7 +115,7 @@ EOF - check_xt_old_internal_h() - { - # bail if previous XT checks has already succeeded. -- grep -q if grep -q TC_CONFIG_XT $CONFIG && return -+ grep -q TC_CONFIG_XT $CONFIG && return - - #check if we need our own internal.h - cat >$TMPDIR/ipttest.c < -Date: Sat, 12 Jan 2019 12:28:54 +0000 -Subject: [PATCH] man: ss.8: more line breaks - -groff stiff complains about unbreakable lines: - 96: warning [p 2, 3.0i]: can't break line - -Indent it some more. - -Fixes: 7f5047524c99 ("man: ss.8: break and indent long line") - -Signed-off-by: Luca Boccassi -Signed-off-by: Stephen Hemminger -(cherry picked from commit cffeeb39466bdfcead182138e1f4c6881384ab16) -Signed-off-by: Phil Sutter ---- - man/man8/ss.8 | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/man/man8/ss.8 b/man/man8/ss.8 -index f138c91a1fcc4..553a6cf46f0e2 100644 ---- a/man/man8/ss.8 -+++ b/man/man8/ss.8 -@@ -89,11 +89,17 @@ an uuid of the socket - Show socket memory usage. The output format is: - .RS - .P --skmem:(r,rb,t,tb,f, -+skmem:(r,rb,t,tb, - .br - .RS - .RS --w,o,bl) -+f,w, -+.RE -+.RE -+.br -+.RS -+.RS -+o,bl) - .RE - .RE - .P --- -2.20.1 - diff --git a/0003-man-tc-taprio.8-fix-syntax-error.patch b/0003-man-tc-taprio.8-fix-syntax-error.patch deleted file mode 100644 index af6dfab..0000000 --- a/0003-man-tc-taprio.8-fix-syntax-error.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 06dfededed954e6d98450ae8f57d561359f2430e Mon Sep 17 00:00:00 2001 -From: Luca Boccassi -Date: Sat, 12 Jan 2019 12:28:55 +0000 -Subject: [PATCH] man: tc-taprio.8: fix syntax error - -.Q does not exist so groff complains and the "queues" word is actually -not displayed. - -Fixes: 579acb4bc52f ("taprio: Add manpage for tc-taprio(8)") - -Signed-off-by: Luca Boccassi -Signed-off-by: Stephen Hemminger -(cherry picked from commit 8242808ced032d56d690ae66a93fa52e8d0ada9a) -Signed-off-by: Phil Sutter ---- - man/man8/tc-taprio.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/man8/tc-taprio.8 b/man/man8/tc-taprio.8 -index 92055b434b942..850be9b036491 100644 ---- a/man/man8/tc-taprio.8 -+++ b/man/man8/tc-taprio.8 -@@ -45,7 +45,7 @@ How traffic is mapped to different hardware queues is similar to - and so the - .B map - and --.Q queues -+.B queues - parameters have the same meaning. - - The other parameters specify the schedule, and at what point in time --- -2.20.1 - diff --git a/iproute.spec b/iproute.spec index cc69f88..b887d56 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,15 +1,11 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.20.0 +Version: 5.0.0 Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch0: 0001-configure-fix-typo-in-check_xt_old_internal_h.patch -Patch1: 0002-man-ss.8-more-line-breaks.patch -Patch2: 0003-man-tc-taprio.8-fix-syntax-error.patch - License: GPLv2+ and Public Domain BuildRequires: gcc BuildRequires: bison @@ -26,10 +22,6 @@ BuildRequires: pkgconfig BuildRequires: linux-atm-libs-devel %endif %endif -# For the UsrMove transition period -Conflicts: filesystem < 3 -Provides: /sbin/ip -Obsoletes: %{name} < 4.5.0-3 Recommends: %{name}-tc %description @@ -40,7 +32,6 @@ kernel. %package tc Summary: Linux Traffic Control utility License: GPLv2+ -Obsoletes: %{name} < 4.5.0-3 Requires: %{name}%{?_isa} = %{version}-%{release} Provides: tc @@ -130,6 +121,10 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Mar 20 2019 Phil Sutter - 5.0.0-1 +- New version 5.0.0 +- Get rid of old upgrade path hints + * Fri Feb 01 2019 Phil Sutter - 4.20.0-1 - New version 4.20.0 - Add upstream-suggested backports diff --git a/sources b/sources index a784c2e..7f93c29 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.20.0.tar.xz) = ed29638c864062e199152c7b3b24b6495987ca6f79cc9ab1b529dab37a8a840fa2b5858d5db2b94eeefa1c0d72ff666a790107e27d11a597b189bfb7a01a4b8b +SHA512 (iproute2-5.0.0.tar.xz) = 4b1649ccdfefbb5eace9d444843492db9d1357b9b3ee1567d6241283cde00ad3c9dbee6b8e507c4e9a5ca0a6378b71ca0c5fbf1e2ed2a9c7d479daf5d49eaed0 From c40aafdb36d1795c0c83a35c4ab8f4c90d7a24b7 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 20 Mar 2019 14:07:57 +0100 Subject: [PATCH 054/111] Restore Provides: /sbin/ip In Rawhide, packages pptp and resource-agents still use it. --- iproute.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index b887d56..9e836fb 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.0.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -22,6 +22,7 @@ BuildRequires: pkgconfig BuildRequires: linux-atm-libs-devel %endif %endif +Provides: /sbin/ip Recommends: %{name}-tc %description @@ -121,6 +122,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Mar 20 2019 Phil Sutter - 5.0.0-2 +- Restore Provides: hint, at least pptp depends on it + * Wed Mar 20 2019 Phil Sutter - 5.0.0-1 - New version 5.0.0 - Get rid of old upgrade path hints From deafa1de44fbeea9f3475c7f2e85ded9a7d5ace1 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 29 May 2019 15:22:13 +0200 Subject: [PATCH 055/111] Rebase package on top of iproute2-5.1.0 --- .gitignore | 1 + ...ail-if-the-control-action-is-missing.patch | 39 +++++++ ...ess-error-msg-when-filling-the-cache.patch | 40 +++++++ ...-tc-flower-fix-port-value-truncation.patch | 104 ++++++++++++++++++ iproute.spec | 11 +- sources | 2 +- 6 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch create mode 100644 0002-lib-suppress-error-msg-when-filling-the-cache.patch create mode 100644 0003-tc-flower-fix-port-value-truncation.patch diff --git a/.gitignore b/.gitignore index 44778c8..fe00b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /iproute2-4.18.0.tar.xz /iproute2-4.20.0.tar.xz /iproute2-5.0.0.tar.xz +/iproute2-5.1.0.tar.xz diff --git a/0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch b/0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch new file mode 100644 index 0000000..8acd9fb --- /dev/null +++ b/0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch @@ -0,0 +1,39 @@ +From bdda9ba541aac9f840af8554e60fcede68c6e8a1 Mon Sep 17 00:00:00 2001 +From: Paolo Abeni +Date: Mon, 20 May 2019 11:56:52 +0200 +Subject: [PATCH] m_mirred: don't bail if the control action is missing + +The mirred act admits an optional control action, defaulting +to TC_ACT_PIPE. The parsing code currently emits an error message +if the control action is not provided on the command line, even +if the command itself completes with no error. + +This change shuts down the error message, using the appropriate +parsing helper. + +Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") +Signed-off-by: Paolo Abeni +Signed-off-by: Stephen Hemminger +(cherry picked from commit 6eccf7ecdb010a90e5271942748ef4338ddb61ae) +Signed-off-by: Phil Sutter +--- + tc/m_mirred.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tc/m_mirred.c b/tc/m_mirred.c +index c7f7318b8413f..23ba638a234d1 100644 +--- a/tc/m_mirred.c ++++ b/tc/m_mirred.c +@@ -202,7 +202,8 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p, + + + if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) +- parse_action_control(&argc, &argv, &p.action, false); ++ parse_action_control_dflt(&argc, &argv, &p.action, false, ++ TC_ACT_PIPE); + + if (argc) { + if (iok && matches(*argv, "index") == 0) { +-- +2.21.0 + diff --git a/0002-lib-suppress-error-msg-when-filling-the-cache.patch b/0002-lib-suppress-error-msg-when-filling-the-cache.patch new file mode 100644 index 0000000..3f5a1cb --- /dev/null +++ b/0002-lib-suppress-error-msg-when-filling-the-cache.patch @@ -0,0 +1,40 @@ +From 179024901d8760312d153ff843306eec66863a4f Mon Sep 17 00:00:00 2001 +From: Nicolas Dichtel +Date: Fri, 24 May 2019 10:59:10 +0200 +Subject: [PATCH] lib: suppress error msg when filling the cache + +Before the patch: +$ ip netns add foo +$ ip link add name veth1 address 2a:a5:5c:b9:52:89 type veth peer name veth2 address 2a:a5:5c:b9:53:90 netns foo +RTNETLINK answers: No such device +RTNETLINK answers: No such device + +But the command was successful. This may break script. Let's remove those +error messages. + +Fixes: 55870dfe7f8b ("Improve batch and dump times by caching link lookups") +Reported-by: Philippe Guibert +Signed-off-by: Nicolas Dichtel +Signed-off-by: Stephen Hemminger +(cherry picked from commit 757837230a654d39623d0b90882b695a2facd107) +Signed-off-by: Phil Sutter +--- + lib/ll_map.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ll_map.c b/lib/ll_map.c +index 2d7b65dcb8f7e..e0ed54bf77c98 100644 +--- a/lib/ll_map.c ++++ b/lib/ll_map.c +@@ -177,7 +177,7 @@ static int ll_link_get(const char *name, int index) + addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name, + strlen(name) + 1); + +- if (rtnl_talk(&rth, &req.n, &answer) < 0) ++ if (rtnl_talk_suppress_rtnl_errmsg(&rth, &req.n, &answer) < 0) + goto out; + + /* add entry to cache */ +-- +2.21.0 + diff --git a/0003-tc-flower-fix-port-value-truncation.patch b/0003-tc-flower-fix-port-value-truncation.patch new file mode 100644 index 0000000..63b1dec --- /dev/null +++ b/0003-tc-flower-fix-port-value-truncation.patch @@ -0,0 +1,104 @@ +From 9cfbfd6b5b3aa49b3966853d06fb3ddae82e207e Mon Sep 17 00:00:00 2001 +From: Lukasz Czapnik +Date: Mon, 27 May 2019 23:03:49 +0200 +Subject: [PATCH] tc: flower: fix port value truncation + +sscanf truncates read port values silently without any error. As sscanf +man says: +(...) sscanf() conform to C89 and C99 and POSIX.1-2001. These standards +do not specify the ERANGE error. + +Replace sscanf with safer get_be16 that returns error when value is out +of range. + +Example: +tc filter add dev eth0 protocol ip parent ffff: prio 1 flower ip_proto +tcp dst_port 70000 hw_tc 1 + +Would result in filter for port 4464 without any warning. + +Fixes: 8930840e678b ("tc: flower: Classify packets based port ranges") +Signed-off-by: Lukasz Czapnik +Signed-off-by: Stephen Hemminger +(cherry picked from commit 767b6fd620ddc4319a121595f953313b2e9789ff) +Signed-off-by: Phil Sutter +--- + tc/f_flower.c | 48 ++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 36 insertions(+), 12 deletions(-) + +diff --git a/tc/f_flower.c b/tc/f_flower.c +index 9659e894dd1f9..e2420d924248d 100644 +--- a/tc/f_flower.c ++++ b/tc/f_flower.c +@@ -493,23 +493,40 @@ static int flower_port_range_attr_type(__u8 ip_proto, enum flower_endpoint type, + return 0; + } + ++/* parse range args in format 10-20 */ ++static int parse_range(char *str, __be16 *min, __be16 *max) ++{ ++ char *sep; ++ ++ sep = strchr(str, '-'); ++ if (sep) { ++ *sep = '\0'; ++ ++ if (get_be16(min, str, 10)) ++ return -1; ++ ++ if (get_be16(max, sep + 1, 10)) ++ return -1; ++ } else { ++ if (get_be16(min, str, 10)) ++ return -1; ++ } ++ return 0; ++} ++ + static int flower_parse_port(char *str, __u8 ip_proto, + enum flower_endpoint endpoint, + struct nlmsghdr *n) + { +- __u16 min, max; ++ __be16 min = 0; ++ __be16 max = 0; + int ret; + +- ret = sscanf(str, "%hu-%hu", &min, &max); +- +- if (ret == 1) { +- int type; ++ ret = parse_range(str, &min, &max); ++ if (ret) ++ return -1; + +- type = flower_port_attr_type(ip_proto, endpoint); +- if (type < 0) +- return -1; +- addattr16(n, MAX_MSG, type, htons(min)); +- } else if (ret == 2) { ++ if (min && max) { + __be16 min_port_type, max_port_type; + + if (max <= min) { +@@ -520,8 +537,15 @@ static int flower_parse_port(char *str, __u8 ip_proto, + &min_port_type, &max_port_type)) + return -1; + +- addattr16(n, MAX_MSG, min_port_type, htons(min)); +- addattr16(n, MAX_MSG, max_port_type, htons(max)); ++ addattr16(n, MAX_MSG, min_port_type, min); ++ addattr16(n, MAX_MSG, max_port_type, max); ++ } else if (min && !max) { ++ int type; ++ ++ type = flower_port_attr_type(ip_proto, endpoint); ++ if (type < 0) ++ return -1; ++ addattr16(n, MAX_MSG, type, min); + } else { + return -1; + } +-- +2.21.0 + diff --git a/iproute.spec b/iproute.spec index 9e836fb..095b2c6 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,11 +1,15 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.0.0 -Release: 2%{?dist} +Version: 5.1.0 +Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +Patch0: 0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch +Patch1: 0002-lib-suppress-error-msg-when-filling-the-cache.patch +Patch2: 0003-tc-flower-fix-port-value-truncation.patch + License: GPLv2+ and Public Domain BuildRequires: gcc BuildRequires: bison @@ -122,6 +126,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed May 29 2019 Phil Sutter - 5.1.0-1 +- New version 5.1.0 + * Wed Mar 20 2019 Phil Sutter - 5.0.0-2 - Restore Provides: hint, at least pptp depends on it diff --git a/sources b/sources index 7f93c29..3ebf39c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.0.0.tar.xz) = 4b1649ccdfefbb5eace9d444843492db9d1357b9b3ee1567d6241283cde00ad3c9dbee6b8e507c4e9a5ca0a6378b71ca0c5fbf1e2ed2a9c7d479daf5d49eaed0 +SHA512 (iproute2-5.1.0.tar.xz) = 5c8319b040bd0ba98cf1225b2a77efafc662741344c53877ee38cf108ca01906b03328e4f9b00b7557e301c6e64bca4e42e92af477b4d657bcbff5120c0c4e87 From 0e7954e5ce04740099d5031e998db312432ac26d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 23 Jul 2019 18:00:02 +0200 Subject: [PATCH 056/111] Rebase package on top of iproute2-5.2.0 --- .gitignore | 1 + ...l-fix-ip-6-show-change-dev-name-cmds.patch | 41 +++++++ ...ail-if-the-control-action-is-missing.patch | 39 ------ ...hen-changing-IPv6-tunnel-without-tun.patch | 52 ++++++++ ...ess-error-msg-when-filling-the-cache.patch | 40 ------- ...oute-fix-json-formatting-for-metrics.patch | 78 ++++++++++++ ...-tc-flower-fix-port-value-truncation.patch | 104 ---------------- ...-utils-move-parse_percent-to-tc_util.patch | 113 ++++++++++++++++++ ...nstrain-percentage-in-0-100-interval.patch | 97 +++++++++++++++ ...evlink-health-dump-show-command-to-d.patch | 64 ++++++++++ 0007-devlink-Fix-binary-values-print.patch | 83 +++++++++++++ ...nclosing-array-brackets-binary-print.patch | 47 ++++++++ ...-backslash-escape-typo-in-jsonw_puts.patch | 30 +++++ iproute.spec | 19 ++- sources | 2 +- 15 files changed, 622 insertions(+), 188 deletions(-) create mode 100644 0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch delete mode 100644 0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch create mode 100644 0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch delete mode 100644 0002-lib-suppress-error-msg-when-filling-the-cache.patch create mode 100644 0003-ip-route-fix-json-formatting-for-metrics.patch delete mode 100644 0003-tc-flower-fix-port-value-truncation.patch create mode 100644 0004-utils-move-parse_percent-to-tc_util.patch create mode 100644 0005-tc-util-constrain-percentage-in-0-100-interval.patch create mode 100644 0006-devlink-Change-devlink-health-dump-show-command-to-d.patch create mode 100644 0007-devlink-Fix-binary-values-print.patch create mode 100644 0008-devlink-Remove-enclosing-array-brackets-binary-print.patch create mode 100644 0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch diff --git a/.gitignore b/.gitignore index fe00b2f..1af7f79 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /iproute2-4.20.0.tar.xz /iproute2-5.0.0.tar.xz /iproute2-5.1.0.tar.xz +/iproute2-5.2.0.tar.xz diff --git a/0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch b/0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch new file mode 100644 index 0000000..5964cb0 --- /dev/null +++ b/0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch @@ -0,0 +1,41 @@ +From 8cfac8f16a88bac7453da91aeca9e2c4244ca92a Mon Sep 17 00:00:00 2001 +From: Andrea Claudi +Date: Tue, 9 Jul 2019 15:16:50 +0200 +Subject: [PATCH] Revert "ip6tunnel: fix 'ip -6 {show|change} dev ' cmds" + +This reverts commit ba126dcad20e6d0e472586541d78bdd1ac4f1123. +It breaks tunnel creation when using 'dev' parameter: + +$ ip link add type dummy +$ ip -6 tunnel add ip6tnl1 mode ip6ip6 remote 2001:db8:ffff:100::2 local 2001:db8:ffff:100::1 hoplimit 1 tclass 0x0 dev dummy0 +add tunnel "ip6tnl0" failed: File exists + +dev parameter must be used to specify the device to which +the tunnel is binded, and not the tunnel itself. + +Reported-by: Jianwen Ji +Reviewed-by: Matteo Croce +Signed-off-by: Andrea Claudi +Signed-off-by: Stephen Hemminger +(cherry picked from commit ad04dbc5b41df509cd6925eab36af73000632fd2) +Signed-off-by: Phil Sutter +--- + ip/ip6tunnel.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c +index 56fd3466ed062..999408ed801b1 100644 +--- a/ip/ip6tunnel.c ++++ b/ip/ip6tunnel.c +@@ -298,8 +298,6 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm2 *p) + p->link = ll_name_to_index(medium); + if (!p->link) + return nodev(medium); +- else +- strlcpy(p->name, medium, sizeof(p->name)); + } + return 0; + } +-- +2.22.0 + diff --git a/0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch b/0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch deleted file mode 100644 index 8acd9fb..0000000 --- a/0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch +++ /dev/null @@ -1,39 +0,0 @@ -From bdda9ba541aac9f840af8554e60fcede68c6e8a1 Mon Sep 17 00:00:00 2001 -From: Paolo Abeni -Date: Mon, 20 May 2019 11:56:52 +0200 -Subject: [PATCH] m_mirred: don't bail if the control action is missing - -The mirred act admits an optional control action, defaulting -to TC_ACT_PIPE. The parsing code currently emits an error message -if the control action is not provided on the command line, even -if the command itself completes with no error. - -This change shuts down the error message, using the appropriate -parsing helper. - -Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") -Signed-off-by: Paolo Abeni -Signed-off-by: Stephen Hemminger -(cherry picked from commit 6eccf7ecdb010a90e5271942748ef4338ddb61ae) -Signed-off-by: Phil Sutter ---- - tc/m_mirred.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tc/m_mirred.c b/tc/m_mirred.c -index c7f7318b8413f..23ba638a234d1 100644 ---- a/tc/m_mirred.c -+++ b/tc/m_mirred.c -@@ -202,7 +202,8 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p, - - - if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) -- parse_action_control(&argc, &argv, &p.action, false); -+ parse_action_control_dflt(&argc, &argv, &p.action, false, -+ TC_ACT_PIPE); - - if (argc) { - if (iok && matches(*argv, "index") == 0) { --- -2.21.0 - diff --git a/0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch b/0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch new file mode 100644 index 0000000..acf0c21 --- /dev/null +++ b/0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch @@ -0,0 +1,52 @@ +From 141c6e6397d373126bba14982678dd6f1e9fbfd7 Mon Sep 17 00:00:00 2001 +From: Andrea Claudi +Date: Tue, 9 Jul 2019 15:16:51 +0200 +Subject: [PATCH] ip tunnel: warn when changing IPv6 tunnel without tunnel name + +Tunnel change fails if a tunnel name is not specified while using +'ip -6 tunnel change'. However, no warning message is printed and +no error code is returned. + +$ ip -6 tunnel add ip6tnl1 mode ip6gre local fd::1 remote fd::2 tos inherit ttl 127 encaplimit none dev dummy0 +$ ip -6 tunnel change dev dummy0 local 2001:1234::1 remote 2001:1234::2 +$ ip -6 tunnel show ip6tnl1 +ip6tnl1: gre/ipv6 remote fd::2 local fd::1 dev dummy0 encaplimit none hoplimit 127 tclass inherit flowlabel 0x00000 (flowinfo 0x00000000) + +This commit checks if tunnel interface name is equal to an empty +string: in this case, it prints a warning message to the user. +It intentionally avoids to return an error to not break existing +script setup. + +This is the output after this commit: +$ ip -6 tunnel add ip6tnl1 mode ip6gre local fd::1 remote fd::2 tos inherit ttl 127 encaplimit none dev dummy0 +$ ip -6 tunnel change dev dummy0 local 2001:1234::1 remote 2001:1234::2 +Tunnel interface name not specified +$ ip -6 tunnel show ip6tnl1 +ip6tnl1: gre/ipv6 remote fd::2 local fd::1 dev dummy0 encaplimit none hoplimit 127 tclass inherit flowlabel 0x00000 (flowinfo 0x00000000) + +Reviewed-by: Matteo Croce +Signed-off-by: Andrea Claudi +Signed-off-by: Stephen Hemminger +(cherry picked from commit d035cc1b4e83e2589ea2115cdc2fa7c6d3693a5a) +Signed-off-by: Phil Sutter +--- + ip/ip6tunnel.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c +index 999408ed801b1..e3da11eb4518e 100644 +--- a/ip/ip6tunnel.c ++++ b/ip/ip6tunnel.c +@@ -386,6 +386,9 @@ static int do_add(int cmd, int argc, char **argv) + if (parse_args(argc, argv, cmd, &p) < 0) + return -1; + ++ if (!*p.name) ++ fprintf(stderr, "Tunnel interface name not specified\n"); ++ + if (p.proto == IPPROTO_GRE) + basedev = "ip6gre0"; + else if (p.i_flags & VTI_ISVTI) +-- +2.22.0 + diff --git a/0002-lib-suppress-error-msg-when-filling-the-cache.patch b/0002-lib-suppress-error-msg-when-filling-the-cache.patch deleted file mode 100644 index 3f5a1cb..0000000 --- a/0002-lib-suppress-error-msg-when-filling-the-cache.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 179024901d8760312d153ff843306eec66863a4f Mon Sep 17 00:00:00 2001 -From: Nicolas Dichtel -Date: Fri, 24 May 2019 10:59:10 +0200 -Subject: [PATCH] lib: suppress error msg when filling the cache - -Before the patch: -$ ip netns add foo -$ ip link add name veth1 address 2a:a5:5c:b9:52:89 type veth peer name veth2 address 2a:a5:5c:b9:53:90 netns foo -RTNETLINK answers: No such device -RTNETLINK answers: No such device - -But the command was successful. This may break script. Let's remove those -error messages. - -Fixes: 55870dfe7f8b ("Improve batch and dump times by caching link lookups") -Reported-by: Philippe Guibert -Signed-off-by: Nicolas Dichtel -Signed-off-by: Stephen Hemminger -(cherry picked from commit 757837230a654d39623d0b90882b695a2facd107) -Signed-off-by: Phil Sutter ---- - lib/ll_map.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/ll_map.c b/lib/ll_map.c -index 2d7b65dcb8f7e..e0ed54bf77c98 100644 ---- a/lib/ll_map.c -+++ b/lib/ll_map.c -@@ -177,7 +177,7 @@ static int ll_link_get(const char *name, int index) - addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name, - strlen(name) + 1); - -- if (rtnl_talk(&rth, &req.n, &answer) < 0) -+ if (rtnl_talk_suppress_rtnl_errmsg(&rth, &req.n, &answer) < 0) - goto out; - - /* add entry to cache */ --- -2.21.0 - diff --git a/0003-ip-route-fix-json-formatting-for-metrics.patch b/0003-ip-route-fix-json-formatting-for-metrics.patch new file mode 100644 index 0000000..092ba3e --- /dev/null +++ b/0003-ip-route-fix-json-formatting-for-metrics.patch @@ -0,0 +1,78 @@ +From 9da7fb1dd27624ed6ab62f5595451f43c3a07d2d Mon Sep 17 00:00:00 2001 +From: Andrea Claudi +Date: Mon, 8 Jul 2019 11:36:42 +0200 +Subject: [PATCH] ip-route: fix json formatting for metrics + +Setting metrics for routes currently lead to non-parsable +json output. For example: + +$ ip link add type dummy +$ ip route add 192.168.2.0 dev dummy0 metric 100 mtu 1000 rto_min 3 +$ ip -j route | jq +parse error: ':' not as part of an object at line 1, column 319 + +Fixing this opening a json object in the metrics array and using +print_string() instead of fprintf(). + +This is the output for the above commands applying this patch: + +$ ip -j route | jq +[ + { + "dst": "192.168.2.0", + "dev": "dummy0", + "scope": "link", + "metric": 100, + "flags": [], + "metrics": [ + { + "mtu": 1000, + "rto_min": 3 + } + ] + } +] + +Fixes: 663c3cb23103f ("iproute: implement JSON and color output") +Fixes: 968272e791710 ("iproute: refactor metrics print") +Signed-off-by: Andrea Claudi +Reported-by: Frank Hofmann +Signed-off-by: Stephen Hemminger +(cherry picked from commit 89ce8012d71f5689074dc4cbe3db102cbdf76460) +Signed-off-by: Phil Sutter +--- + ip/iproute.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ip/iproute.c b/ip/iproute.c +index 1669e0138259e..2f9b612b0b506 100644 +--- a/ip/iproute.c ++++ b/ip/iproute.c +@@ -578,6 +578,7 @@ static void print_rta_metrics(FILE *fp, const struct rtattr *rta) + int i; + + open_json_array(PRINT_JSON, "metrics"); ++ open_json_object(NULL); + + parse_rtattr(mxrta, RTAX_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)); + +@@ -611,7 +612,7 @@ static void print_rta_metrics(FILE *fp, const struct rtattr *rta) + print_rtax_features(fp, val); + break; + default: +- fprintf(fp, "%u ", val); ++ print_uint(PRINT_ANY, mx_names[i], "%u ", val); + break; + + case RTAX_RTT: +@@ -639,6 +640,7 @@ static void print_rta_metrics(FILE *fp, const struct rtattr *rta) + } + } + ++ close_json_object(); + close_json_array(PRINT_JSON, NULL); + } + +-- +2.22.0 + diff --git a/0003-tc-flower-fix-port-value-truncation.patch b/0003-tc-flower-fix-port-value-truncation.patch deleted file mode 100644 index 63b1dec..0000000 --- a/0003-tc-flower-fix-port-value-truncation.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 9cfbfd6b5b3aa49b3966853d06fb3ddae82e207e Mon Sep 17 00:00:00 2001 -From: Lukasz Czapnik -Date: Mon, 27 May 2019 23:03:49 +0200 -Subject: [PATCH] tc: flower: fix port value truncation - -sscanf truncates read port values silently without any error. As sscanf -man says: -(...) sscanf() conform to C89 and C99 and POSIX.1-2001. These standards -do not specify the ERANGE error. - -Replace sscanf with safer get_be16 that returns error when value is out -of range. - -Example: -tc filter add dev eth0 protocol ip parent ffff: prio 1 flower ip_proto -tcp dst_port 70000 hw_tc 1 - -Would result in filter for port 4464 without any warning. - -Fixes: 8930840e678b ("tc: flower: Classify packets based port ranges") -Signed-off-by: Lukasz Czapnik -Signed-off-by: Stephen Hemminger -(cherry picked from commit 767b6fd620ddc4319a121595f953313b2e9789ff) -Signed-off-by: Phil Sutter ---- - tc/f_flower.c | 48 ++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 36 insertions(+), 12 deletions(-) - -diff --git a/tc/f_flower.c b/tc/f_flower.c -index 9659e894dd1f9..e2420d924248d 100644 ---- a/tc/f_flower.c -+++ b/tc/f_flower.c -@@ -493,23 +493,40 @@ static int flower_port_range_attr_type(__u8 ip_proto, enum flower_endpoint type, - return 0; - } - -+/* parse range args in format 10-20 */ -+static int parse_range(char *str, __be16 *min, __be16 *max) -+{ -+ char *sep; -+ -+ sep = strchr(str, '-'); -+ if (sep) { -+ *sep = '\0'; -+ -+ if (get_be16(min, str, 10)) -+ return -1; -+ -+ if (get_be16(max, sep + 1, 10)) -+ return -1; -+ } else { -+ if (get_be16(min, str, 10)) -+ return -1; -+ } -+ return 0; -+} -+ - static int flower_parse_port(char *str, __u8 ip_proto, - enum flower_endpoint endpoint, - struct nlmsghdr *n) - { -- __u16 min, max; -+ __be16 min = 0; -+ __be16 max = 0; - int ret; - -- ret = sscanf(str, "%hu-%hu", &min, &max); -- -- if (ret == 1) { -- int type; -+ ret = parse_range(str, &min, &max); -+ if (ret) -+ return -1; - -- type = flower_port_attr_type(ip_proto, endpoint); -- if (type < 0) -- return -1; -- addattr16(n, MAX_MSG, type, htons(min)); -- } else if (ret == 2) { -+ if (min && max) { - __be16 min_port_type, max_port_type; - - if (max <= min) { -@@ -520,8 +537,15 @@ static int flower_parse_port(char *str, __u8 ip_proto, - &min_port_type, &max_port_type)) - return -1; - -- addattr16(n, MAX_MSG, min_port_type, htons(min)); -- addattr16(n, MAX_MSG, max_port_type, htons(max)); -+ addattr16(n, MAX_MSG, min_port_type, min); -+ addattr16(n, MAX_MSG, max_port_type, max); -+ } else if (min && !max) { -+ int type; -+ -+ type = flower_port_attr_type(ip_proto, endpoint); -+ if (type < 0) -+ return -1; -+ addattr16(n, MAX_MSG, type, min); - } else { - return -1; - } --- -2.21.0 - diff --git a/0004-utils-move-parse_percent-to-tc_util.patch b/0004-utils-move-parse_percent-to-tc_util.patch new file mode 100644 index 0000000..fe3ce46 --- /dev/null +++ b/0004-utils-move-parse_percent-to-tc_util.patch @@ -0,0 +1,113 @@ +From 5b17171ce7363e597009e07fb143522a2d79c77b Mon Sep 17 00:00:00 2001 +From: Andrea Claudi +Date: Fri, 28 Jun 2019 18:03:45 +0200 +Subject: [PATCH] utils: move parse_percent() to tc_util + +As parse_percent() is used only in tc. + +This reduces ip, bridge and genl binaries size: + +$ bloat-o-meter -t bridge/bridge bridge/bridge.new +add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) +Total: Before=50973, After=50864, chg -0.21% + +$ bloat-o-meter -t genl/genl genl/genl.new +add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) +Total: Before=30298, After=30189, chg -0.36% + +$ bloat-o-meter ip/ip ip/ip.new +add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) +Total: Before=674164, After=674055, chg -0.02% + +Signed-off-by: Andrea Claudi +Signed-off-by: David Ahern +(cherry picked from commit 1e5746d5e13d895b63da954f0290cffbb076cefa) +Signed-off-by: Phil Sutter +--- + include/utils.h | 1 - + lib/utils.c | 16 ---------------- + tc/tc_util.c | 16 ++++++++++++++++ + tc/tc_util.h | 1 + + 4 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/include/utils.h b/include/utils.h +index 927fdc17e09dd..f9a4916b517ab 100644 +--- a/include/utils.h ++++ b/include/utils.h +@@ -145,7 +145,6 @@ int get_addr_rta(inet_prefix *dst, const struct rtattr *rta, int family); + int get_addr_ila(__u64 *val, const char *arg); + + int read_prop(const char *dev, char *prop, long *value); +-int parse_percent(double *val, const char *str); + int get_hex(char c); + int get_integer(int *val, const char *arg, int base); + int get_unsigned(unsigned *val, const char *arg, int base); +diff --git a/lib/utils.c b/lib/utils.c +index be0f11b00280d..5da9a47848966 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -101,22 +101,6 @@ out: + return -1; + } + +-/* Parse a percent e.g: '30%' +- * return: 0 = ok, -1 = error, 1 = out of range +- */ +-int parse_percent(double *val, const char *str) +-{ +- char *p; +- +- *val = strtod(str, &p) / 100.; +- if (*val == HUGE_VALF || *val == HUGE_VALL) +- return 1; +- if (*p && strcmp(p, "%")) +- return -1; +- +- return 0; +-} +- + int get_hex(char c) + { + if (c >= 'A' && c <= 'F') +diff --git a/tc/tc_util.c b/tc/tc_util.c +index e5d15281581df..53d15e08e9734 100644 +--- a/tc/tc_util.c ++++ b/tc/tc_util.c +@@ -190,6 +190,22 @@ static const struct rate_suffix { + { NULL } + }; + ++/* Parse a percent e.g: '30%' ++ * return: 0 = ok, -1 = error, 1 = out of range ++ */ ++int parse_percent(double *val, const char *str) ++{ ++ char *p; ++ ++ *val = strtod(str, &p) / 100.; ++ if (*val == HUGE_VALF || *val == HUGE_VALL) ++ return 1; ++ if (*p && strcmp(p, "%")) ++ return -1; ++ ++ return 0; ++} ++ + static int parse_percent_rate(char *rate, size_t len, + const char *str, const char *dev) + { +diff --git a/tc/tc_util.h b/tc/tc_util.h +index 825fea36a0809..eb4b60db3fdd7 100644 +--- a/tc/tc_util.h ++++ b/tc/tc_util.h +@@ -101,6 +101,7 @@ int print_tc_classid(char *buf, int len, __u32 h); + char *sprint_tc_classid(__u32 h, char *buf); + + int tc_print_police(FILE *f, struct rtattr *tb); ++int parse_percent(double *val, const char *str); + int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); + + int parse_action_control(int *argc_p, char ***argv_p, +-- +2.22.0 + diff --git a/0005-tc-util-constrain-percentage-in-0-100-interval.patch b/0005-tc-util-constrain-percentage-in-0-100-interval.patch new file mode 100644 index 0000000..d5928f5 --- /dev/null +++ b/0005-tc-util-constrain-percentage-in-0-100-interval.patch @@ -0,0 +1,97 @@ +From 29a5b8d072d06b685c428f15125ff62b8b470064 Mon Sep 17 00:00:00 2001 +From: Andrea Claudi +Date: Sat, 13 Jul 2019 11:44:07 +0200 +Subject: [PATCH] tc: util: constrain percentage in 0-100 interval + +parse_percent() currently allows to specify negative percentages +or value above 100%. However this does not seems to make sense, +as the function is used for probabilities or bandiwidth rates. + +Moreover, using negative values leads to erroneous results +(using Bernoulli loss model as example): + +$ ip link add test type dummy +$ ip link set test up +$ tc qdisc add dev test root netem loss gemodel -10% limit 10 +$ tc qdisc show dev test +qdisc netem 800c: root refcnt 2 limit 10 loss gemodel p 90% r 10% 1-h 100% 1-k 0% + +Using values above 100% we have instead: + +$ ip link add test type dummy +$ ip link set test up +$ tc qdisc add dev test root netem loss gemodel 140% limit 10 +$ tc qdisc show dev test +qdisc netem 800f: root refcnt 2 limit 10 loss gemodel p 40% r 60% 1-h 100% 1-k 0% + +This commit changes parse_percent() with a check to ensure +percentage values stay between 1.0 and 0.0. +parse_percent_rate() function, which already employs a similar +check, is adjusted accordingly. + +With this check in place, we have: + +$ ip link add test type dummy +$ ip link set test up +$ tc qdisc add dev test root netem loss gemodel -10% limit 10 +Illegal "loss gemodel p" + +Fixes: 927e3cfb52b58 ("tc: B.W limits can now be specified in %.") +Signed-off-by: Andrea Claudi +Signed-off-by: Stephen Hemminger +(cherry picked from commit 6bc13e4a20f50e9c37d5a504c78222913c433fd3) +Signed-off-by: Phil Sutter +--- + tc/tc_util.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/tc/tc_util.c b/tc/tc_util.c +index 53d15e08e9734..b90d256c33a4a 100644 +--- a/tc/tc_util.c ++++ b/tc/tc_util.c +@@ -198,7 +198,7 @@ int parse_percent(double *val, const char *str) + char *p; + + *val = strtod(str, &p) / 100.; +- if (*val == HUGE_VALF || *val == HUGE_VALL) ++ if (*val > 1.0 || *val < 0.0) + return 1; + if (*p && strcmp(p, "%")) + return -1; +@@ -226,16 +226,16 @@ static int parse_percent_rate(char *rate, size_t len, + if (ret != 1) + goto malf; + +- if (parse_percent(&perc, str_perc)) ++ ret = parse_percent(&perc, str_perc); ++ if (ret == 1) { ++ fprintf(stderr, "Invalid rate specified; should be between [0,100]%% but is %s\n", str); ++ goto err; ++ } else if (ret == -1) { + goto malf; ++ } + + free(str_perc); + +- if (perc > 1.0 || perc < 0.0) { +- fprintf(stderr, "Invalid rate specified; should be between [0,100]%% but is %s\n", str); +- return -1; +- } +- + rate_bit = perc * dev_mbit * 1000 * 1000; + + ret = snprintf(rate, len, "%lf", rate_bit); +@@ -247,8 +247,9 @@ static int parse_percent_rate(char *rate, size_t len, + return 0; + + malf: +- free(str_perc); + fprintf(stderr, "Specified rate value could not be read or is malformed\n"); ++err: ++ free(str_perc); + return -1; + } + +-- +2.22.0 + diff --git a/0006-devlink-Change-devlink-health-dump-show-command-to-d.patch b/0006-devlink-Change-devlink-health-dump-show-command-to-d.patch new file mode 100644 index 0000000..a0688e3 --- /dev/null +++ b/0006-devlink-Change-devlink-health-dump-show-command-to-d.patch @@ -0,0 +1,64 @@ +From f12ee1269f04a5f4ab5c18326004af32da4061ae Mon Sep 17 00:00:00 2001 +From: Aya Levin +Date: Wed, 10 Jul 2019 14:03:19 +0300 +Subject: [PATCH] devlink: Change devlink health dump show command to dumpit + +Although devlink health dump show command is given per reporter, it +returns large amounts of data. Trying to use the doit cb results in +OUT-OF-BUFFER error. This complementary patch raises the DUMP flag in +order to invoke the dumpit cb. We're safe as no existing drivers +implement the dump health reporter option yet. + +Fixes: 041e6e651a8e ("devlink: Add devlink health dump show command") +Signed-off-by: Aya Levin +Signed-off-by: Tariq Toukan +Acked-by: Jiri Pirko +Signed-off-by: Stephen Hemminger +(cherry picked from commit b4d97ef57fd4b7669971ed209065a72d115dffc2) +Signed-off-by: Phil Sutter +--- + devlink/devlink.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/devlink/devlink.c b/devlink/devlink.c +index 5618ba26d6fb3..9c338cb4ccc84 100644 +--- a/devlink/devlink.c ++++ b/devlink/devlink.c +@@ -6072,13 +6072,13 @@ static int cmd_fmsg_object_cb(const struct nlmsghdr *nlh, void *data) + return MNL_CB_OK; + } + +-static int cmd_health_object_common(struct dl *dl, uint8_t cmd) ++static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags) + { + struct fmsg_cb_data data; + struct nlmsghdr *nlh; + int err; + +- nlh = mnlg_msg_prepare(dl->nlg, cmd, NLM_F_REQUEST | NLM_F_ACK); ++ nlh = mnlg_msg_prepare(dl->nlg, cmd, flags | NLM_F_REQUEST | NLM_F_ACK); + + err = dl_argv_parse_put(nlh, dl, + DL_OPT_HANDLE | DL_OPT_HEALTH_REPORTER_NAME, 0); +@@ -6093,12 +6093,16 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd) + + static int cmd_health_dump_show(struct dl *dl) + { +- return cmd_health_object_common(dl, DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET); ++ return cmd_health_object_common(dl, ++ DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, ++ NLM_F_DUMP); + } + + static int cmd_health_diagnose(struct dl *dl) + { +- return cmd_health_object_common(dl, DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE); ++ return cmd_health_object_common(dl, ++ DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE, ++ 0); + } + + static int cmd_health_recover(struct dl *dl) +-- +2.22.0 + diff --git a/0007-devlink-Fix-binary-values-print.patch b/0007-devlink-Fix-binary-values-print.patch new file mode 100644 index 0000000..a91296f --- /dev/null +++ b/0007-devlink-Fix-binary-values-print.patch @@ -0,0 +1,83 @@ +From 4aaf5d7099e7b985973b49f59ceef9b1fd6f6810 Mon Sep 17 00:00:00 2001 +From: Aya Levin +Date: Wed, 10 Jul 2019 14:03:20 +0300 +Subject: [PATCH] devlink: Fix binary values print + +Fix function pr_out_binary_value() to start printing the binary buffer +from offset 0 instead of offset 1. Remove redundant new line at the +beginning of the output + +Example: +With patch: + mlx5e_txqsq: + 05 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 8e 6e 3a 13 07 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + c0 +Without patch + mlx5e_txqsq: + + 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 8e 6e 3a 13 07 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 + +Fixes: 844a61764c6f ("devlink: Add helper functions for name and value separately") +Signed-off-by: Aya Levin +Signed-off-by: Tariq Toukan +Signed-off-by: Stephen Hemminger +(cherry picked from commit 1d05cca2fd70a5bc8a9f4e978aa5629dbc99a973) +Signed-off-by: Phil Sutter +--- + devlink/devlink.c | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/devlink/devlink.c b/devlink/devlink.c +index 9c338cb4ccc84..5dff974c93c93 100644 +--- a/devlink/devlink.c ++++ b/devlink/devlink.c +@@ -1779,29 +1779,31 @@ static void pr_out_uint64_value(struct dl *dl, uint64_t value) + pr_out(" %"PRIu64, value); + } + ++static bool is_binary_eol(int i) ++{ ++ return !(i%16); ++} ++ + static void pr_out_binary_value(struct dl *dl, uint8_t *data, uint32_t len) + { +- int i = 1; ++ int i = 0; + + if (dl->json_output) + jsonw_start_array(dl->jw); +- else +- pr_out("\n"); + + while (i < len) { +- if (dl->json_output) { ++ if (dl->json_output) + jsonw_printf(dl->jw, "%d", data[i]); +- } else { +- pr_out(" %02x", data[i]); +- if (!(i % 16)) +- pr_out("\n"); +- } ++ else ++ pr_out("%02x ", data[i]); + i++; ++ if (!dl->json_output && is_binary_eol(i)) ++ __pr_out_newline(); + } + if (dl->json_output) + jsonw_end_array(dl->jw); +- else if ((i - 1) % 16) +- pr_out("\n"); ++ else if (!is_binary_eol(i)) ++ __pr_out_newline(); + } + + static void pr_out_str_value(struct dl *dl, const char *value) +-- +2.22.0 + diff --git a/0008-devlink-Remove-enclosing-array-brackets-binary-print.patch b/0008-devlink-Remove-enclosing-array-brackets-binary-print.patch new file mode 100644 index 0000000..b9d6096 --- /dev/null +++ b/0008-devlink-Remove-enclosing-array-brackets-binary-print.patch @@ -0,0 +1,47 @@ +From a5d73c80107321aafd1e2007a059a7eb950412d7 Mon Sep 17 00:00:00 2001 +From: Aya Levin +Date: Wed, 10 Jul 2019 14:03:21 +0300 +Subject: [PATCH] devlink: Remove enclosing array brackets binary print with + json format + +Keep pr_out_binary_value function only for printing. Inner relations +like array grouping should be done outside the function. + +Fixes: 844a61764c6f ("devlink: Add helper functions for name and value separately") +Signed-off-by: Aya Levin +Signed-off-by: Tariq Toukan +Signed-off-by: Stephen Hemminger +(cherry picked from commit f359942a25d368ccf2e47b79f95db2798e09f7a4) +Signed-off-by: Phil Sutter +--- + devlink/devlink.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/devlink/devlink.c b/devlink/devlink.c +index 5dff974c93c93..ebb1de3eb2eaa 100644 +--- a/devlink/devlink.c ++++ b/devlink/devlink.c +@@ -1788,9 +1788,6 @@ static void pr_out_binary_value(struct dl *dl, uint8_t *data, uint32_t len) + { + int i = 0; + +- if (dl->json_output) +- jsonw_start_array(dl->jw); +- + while (i < len) { + if (dl->json_output) + jsonw_printf(dl->jw, "%d", data[i]); +@@ -1800,9 +1797,7 @@ static void pr_out_binary_value(struct dl *dl, uint8_t *data, uint32_t len) + if (!dl->json_output && is_binary_eol(i)) + __pr_out_newline(); + } +- if (dl->json_output) +- jsonw_end_array(dl->jw); +- else if (!is_binary_eol(i)) ++ if (!dl->json_output && !is_binary_eol(i)) + __pr_out_newline(); + } + +-- +2.22.0 + diff --git a/0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch b/0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch new file mode 100644 index 0000000..52d01b1 --- /dev/null +++ b/0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch @@ -0,0 +1,30 @@ +From 742a2436d344ac15330c56a2326c03c8c56686a5 Mon Sep 17 00:00:00 2001 +From: Ivan Delalande +Date: Wed, 17 Jul 2019 18:15:31 -0700 +Subject: [PATCH] json: fix backslash escape typo in jsonw_puts + +Fixes: fcc16c22 ("provide common json output formatter") +Signed-off-by: Ivan Delalande +Signed-off-by: Stephen Hemminger +(cherry picked from commit ed54f76484b5ee47b190a202ecf29fce60d0d878) +Signed-off-by: Phil Sutter +--- + lib/json_writer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/json_writer.c b/lib/json_writer.c +index 5004c181e6225..88c5eb8882254 100644 +--- a/lib/json_writer.c ++++ b/lib/json_writer.c +@@ -75,7 +75,7 @@ static void jsonw_puts(json_writer_t *self, const char *str) + fputs("\\b", self->out); + break; + case '\\': +- fputs("\\n", self->out); ++ fputs("\\\\", self->out); + break; + case '"': + fputs("\\\"", self->out); +-- +2.22.0 + diff --git a/iproute.spec b/iproute.spec index 095b2c6..07fc76b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,14 +1,20 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.1.0 +Version: 5.2.0 Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch0: 0001-m_mirred-don-t-bail-if-the-control-action-is-missing.patch -Patch1: 0002-lib-suppress-error-msg-when-filling-the-cache.patch -Patch2: 0003-tc-flower-fix-port-value-truncation.patch +Patch1: 0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch +Patch2: 0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch +Patch3: 0003-ip-route-fix-json-formatting-for-metrics.patch +Patch4: 0004-utils-move-parse_percent-to-tc_util.patch +Patch5: 0005-tc-util-constrain-percentage-in-0-100-interval.patch +Patch6: 0006-devlink-Change-devlink-health-dump-show-command-to-d.patch +Patch7: 0007-devlink-Fix-binary-values-print.patch +Patch8: 0008-devlink-Remove-enclosing-array-brackets-binary-print.patch +Patch9: 0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -126,6 +132,11 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Jul 23 2019 Phil Sutter - 5.2.0-1 +- New version 5.2.0 +- Add upstream-suggested backports +- Fix for tunnel creation when using 'dev' parameter + * Wed May 29 2019 Phil Sutter - 5.1.0-1 - New version 5.1.0 diff --git a/sources b/sources index 3ebf39c..108351d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.1.0.tar.xz) = 5c8319b040bd0ba98cf1225b2a77efafc662741344c53877ee38cf108ca01906b03328e4f9b00b7557e301c6e64bca4e42e92af477b4d657bcbff5120c0c4e87 +SHA512 (iproute2-5.2.0.tar.xz) = 82bbeae29d98129d822c95ff7523186569e32c66132b8d781d501d61f396b04d122e3d13057dd4236455264008e5bfac7cb63c325908fc1c46d416cbde6ac7e1 From 40ec840b2dbdf2b376f468de04144c0d6aa11fb0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 09:39:27 +0000 Subject: [PATCH 057/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 07fc76b..fcc2832 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.2.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -132,6 +132,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 5.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Tue Jul 23 2019 Phil Sutter - 5.2.0-1 - New version 5.2.0 - Add upstream-suggested backports From 34a4fc8582afd78efb65d022e5c51924c3e46d2f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 26 Sep 2019 09:57:04 +0200 Subject: [PATCH 058/111] Rebase package on top of iproute2-5.3.0 --- .gitignore | 1 + ...l-fix-ip-6-show-change-dev-name-cmds.patch | 41 --- ...intf-with-asprintf-when-dealing-with.patch | 341 ++++++++++++++++++ ...hen-changing-IPv6-tunnel-without-tun.patch | 52 --- ...oute-fix-json-formatting-for-metrics.patch | 78 ---- ...-utils-move-parse_percent-to-tc_util.patch | 113 ------ ...nstrain-percentage-in-0-100-interval.patch | 97 ----- ...evlink-health-dump-show-command-to-d.patch | 64 ---- 0007-devlink-Fix-binary-values-print.patch | 83 ----- ...nclosing-array-brackets-binary-print.patch | 47 --- ...-backslash-escape-typo-in-jsonw_puts.patch | 30 -- iproute.spec | 18 +- sources | 2 +- 13 files changed, 350 insertions(+), 617 deletions(-) delete mode 100644 0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch create mode 100644 0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch delete mode 100644 0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch delete mode 100644 0003-ip-route-fix-json-formatting-for-metrics.patch delete mode 100644 0004-utils-move-parse_percent-to-tc_util.patch delete mode 100644 0005-tc-util-constrain-percentage-in-0-100-interval.patch delete mode 100644 0006-devlink-Change-devlink-health-dump-show-command-to-d.patch delete mode 100644 0007-devlink-Fix-binary-values-print.patch delete mode 100644 0008-devlink-Remove-enclosing-array-brackets-binary-print.patch delete mode 100644 0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch diff --git a/.gitignore b/.gitignore index 1af7f79..1103d18 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /iproute2-5.0.0.tar.xz /iproute2-5.1.0.tar.xz /iproute2-5.2.0.tar.xz +/iproute2-5.3.0.tar.xz diff --git a/0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch b/0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch deleted file mode 100644 index 5964cb0..0000000 --- a/0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8cfac8f16a88bac7453da91aeca9e2c4244ca92a Mon Sep 17 00:00:00 2001 -From: Andrea Claudi -Date: Tue, 9 Jul 2019 15:16:50 +0200 -Subject: [PATCH] Revert "ip6tunnel: fix 'ip -6 {show|change} dev ' cmds" - -This reverts commit ba126dcad20e6d0e472586541d78bdd1ac4f1123. -It breaks tunnel creation when using 'dev' parameter: - -$ ip link add type dummy -$ ip -6 tunnel add ip6tnl1 mode ip6ip6 remote 2001:db8:ffff:100::2 local 2001:db8:ffff:100::1 hoplimit 1 tclass 0x0 dev dummy0 -add tunnel "ip6tnl0" failed: File exists - -dev parameter must be used to specify the device to which -the tunnel is binded, and not the tunnel itself. - -Reported-by: Jianwen Ji -Reviewed-by: Matteo Croce -Signed-off-by: Andrea Claudi -Signed-off-by: Stephen Hemminger -(cherry picked from commit ad04dbc5b41df509cd6925eab36af73000632fd2) -Signed-off-by: Phil Sutter ---- - ip/ip6tunnel.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c -index 56fd3466ed062..999408ed801b1 100644 ---- a/ip/ip6tunnel.c -+++ b/ip/ip6tunnel.c -@@ -298,8 +298,6 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm2 *p) - p->link = ll_name_to_index(medium); - if (!p->link) - return nodev(medium); -- else -- strlcpy(p->name, medium, sizeof(p->name)); - } - return 0; - } --- -2.22.0 - diff --git a/0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch b/0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch new file mode 100644 index 0000000..85c1c85 --- /dev/null +++ b/0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch @@ -0,0 +1,341 @@ +From e72287abe26945d0cd453021baa75dd51b6c271b Mon Sep 17 00:00:00 2001 +From: Andrea Claudi +Date: Mon, 16 Sep 2019 15:00:55 +0200 +Subject: [PATCH] bpf: replace snprintf with asprintf when dealing with long + buffers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reduces stack usage, as asprintf allocates memory on the heap. + +This indirectly fixes a snprintf truncation warning (from gcc v9.2.1): + +bpf.c: In function ‘bpf_get_work_dir’: +bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] + 784 | snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); + | ^ +bpf.c:784:2: note: ‘snprintf’ output between 2 and 4097 bytes into a destination of size 4096 + 784 | snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Fixes: e42256699cac ("bpf: make tc's bpf loader generic and move into lib") +Signed-off-by: Andrea Claudi +Signed-off-by: David Ahern +(cherry picked from commit c0325b06382cb4f7ebfaf80c29c8800d74666fd9) +Signed-off-by: Phil Sutter +--- + lib/bpf.c | 155 ++++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 116 insertions(+), 39 deletions(-) + +diff --git a/lib/bpf.c b/lib/bpf.c +index 23cb0d96a85ba..10cf9bf44419a 100644 +--- a/lib/bpf.c ++++ b/lib/bpf.c +@@ -406,13 +406,21 @@ static int bpf_derive_elf_map_from_fdinfo(int fd, struct bpf_elf_map *map, + struct bpf_map_ext *ext) + { + unsigned int val, owner_type = 0, owner_jited = 0; +- char file[PATH_MAX], buff[4096]; ++ char *file = NULL; ++ char buff[4096]; + FILE *fp; ++ int ret; + +- snprintf(file, sizeof(file), "/proc/%d/fdinfo/%d", getpid(), fd); ++ ret = asprintf(&file, "/proc/%d/fdinfo/%d", getpid(), fd); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ free(file); ++ return ret; ++ } + memset(map, 0, sizeof(*map)); + + fp = fopen(file, "r"); ++ free(file); + if (!fp) { + fprintf(stderr, "No procfs support?!\n"); + return -EIO; +@@ -600,8 +608,9 @@ int bpf_trace_pipe(void) + 0, + }; + int fd_in, fd_out = STDERR_FILENO; +- char tpipe[PATH_MAX]; ++ char *tpipe = NULL; + const char *mnt; ++ int ret; + + mnt = bpf_find_mntpt("tracefs", TRACEFS_MAGIC, tracefs_mnt, + sizeof(tracefs_mnt), tracefs_known_mnts); +@@ -610,9 +619,15 @@ int bpf_trace_pipe(void) + return -1; + } + +- snprintf(tpipe, sizeof(tpipe), "%s/trace_pipe", mnt); ++ ret = asprintf(&tpipe, "%s/trace_pipe", mnt); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ free(tpipe); ++ return ret; ++ } + + fd_in = open(tpipe, O_RDONLY); ++ free(tpipe); + if (fd_in < 0) + return -1; + +@@ -633,37 +648,50 @@ int bpf_trace_pipe(void) + + static int bpf_gen_global(const char *bpf_sub_dir) + { +- char bpf_glo_dir[PATH_MAX]; ++ char *bpf_glo_dir = NULL; + int ret; + +- snprintf(bpf_glo_dir, sizeof(bpf_glo_dir), "%s/%s/", +- bpf_sub_dir, BPF_DIR_GLOBALS); ++ ret = asprintf(&bpf_glo_dir, "%s/%s/", bpf_sub_dir, BPF_DIR_GLOBALS); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } + + ret = mkdir(bpf_glo_dir, S_IRWXU); + if (ret && errno != EEXIST) { + fprintf(stderr, "mkdir %s failed: %s\n", bpf_glo_dir, + strerror(errno)); +- return ret; ++ goto out; + } + +- return 0; ++ ret = 0; ++out: ++ free(bpf_glo_dir); ++ return ret; + } + + static int bpf_gen_master(const char *base, const char *name) + { +- char bpf_sub_dir[PATH_MAX + NAME_MAX + 1]; ++ char *bpf_sub_dir = NULL; + int ret; + +- snprintf(bpf_sub_dir, sizeof(bpf_sub_dir), "%s%s/", base, name); ++ ret = asprintf(&bpf_sub_dir, "%s%s/", base, name); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } + + ret = mkdir(bpf_sub_dir, S_IRWXU); + if (ret && errno != EEXIST) { + fprintf(stderr, "mkdir %s failed: %s\n", bpf_sub_dir, + strerror(errno)); +- return ret; ++ goto out; + } + +- return bpf_gen_global(bpf_sub_dir); ++ ret = bpf_gen_global(bpf_sub_dir); ++out: ++ free(bpf_sub_dir); ++ return ret; + } + + static int bpf_slave_via_bind_mnt(const char *full_name, +@@ -692,13 +720,22 @@ static int bpf_slave_via_bind_mnt(const char *full_name, + static int bpf_gen_slave(const char *base, const char *name, + const char *link) + { +- char bpf_lnk_dir[PATH_MAX + NAME_MAX + 1]; +- char bpf_sub_dir[PATH_MAX + NAME_MAX]; ++ char *bpf_lnk_dir = NULL; ++ char *bpf_sub_dir = NULL; + struct stat sb = {}; + int ret; + +- snprintf(bpf_lnk_dir, sizeof(bpf_lnk_dir), "%s%s/", base, link); +- snprintf(bpf_sub_dir, sizeof(bpf_sub_dir), "%s%s", base, name); ++ ret = asprintf(&bpf_lnk_dir, "%s%s/", base, link); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } ++ ++ ret = asprintf(&bpf_sub_dir, "%s%s", base, name); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } + + ret = symlink(bpf_lnk_dir, bpf_sub_dir); + if (ret) { +@@ -706,25 +743,30 @@ static int bpf_gen_slave(const char *base, const char *name, + if (errno != EPERM) { + fprintf(stderr, "symlink %s failed: %s\n", + bpf_sub_dir, strerror(errno)); +- return ret; ++ goto out; + } + +- return bpf_slave_via_bind_mnt(bpf_sub_dir, +- bpf_lnk_dir); ++ ret = bpf_slave_via_bind_mnt(bpf_sub_dir, bpf_lnk_dir); ++ goto out; + } + + ret = lstat(bpf_sub_dir, &sb); + if (ret) { + fprintf(stderr, "lstat %s failed: %s\n", + bpf_sub_dir, strerror(errno)); +- return ret; ++ goto out; + } + +- if ((sb.st_mode & S_IFMT) != S_IFLNK) +- return bpf_gen_global(bpf_sub_dir); ++ if ((sb.st_mode & S_IFMT) != S_IFLNK) { ++ ret = bpf_gen_global(bpf_sub_dir); ++ goto out; ++ } + } + +- return 0; ++out: ++ free(bpf_lnk_dir); ++ free(bpf_sub_dir); ++ return ret; + } + + static int bpf_gen_hierarchy(const char *base) +@@ -742,7 +784,7 @@ static int bpf_gen_hierarchy(const char *base) + static const char *bpf_get_work_dir(enum bpf_prog_type type) + { + static char bpf_tmp[PATH_MAX] = BPF_DIR_MNT; +- static char bpf_wrk_dir[PATH_MAX]; ++ static char *bpf_wrk_dir; + static const char *mnt; + static bool bpf_mnt_cached; + const char *mnt_env = getenv(BPF_ENV_MNT); +@@ -781,7 +823,12 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type) + } + } + +- snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); ++ ret = asprintf(&bpf_wrk_dir, "%s/", mnt); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ free(bpf_wrk_dir); ++ goto out; ++ } + + ret = bpf_gen_hierarchy(bpf_wrk_dir); + if (ret) { +@@ -1438,31 +1485,48 @@ static int bpf_probe_pinned(const char *name, const struct bpf_elf_ctx *ctx, + + static int bpf_make_obj_path(const struct bpf_elf_ctx *ctx) + { +- char tmp[PATH_MAX]; ++ char *tmp = NULL; + int ret; + +- snprintf(tmp, sizeof(tmp), "%s/%s", bpf_get_work_dir(ctx->type), +- ctx->obj_uid); ++ ret = asprintf(&tmp, "%s/%s", bpf_get_work_dir(ctx->type), ctx->obj_uid); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } + + ret = mkdir(tmp, S_IRWXU); + if (ret && errno != EEXIST) { + fprintf(stderr, "mkdir %s failed: %s\n", tmp, strerror(errno)); +- return ret; ++ goto out; + } + +- return 0; ++ ret = 0; ++out: ++ free(tmp); ++ return ret; + } + + static int bpf_make_custom_path(const struct bpf_elf_ctx *ctx, + const char *todo) + { +- char tmp[PATH_MAX], rem[PATH_MAX], *sub; ++ char *tmp = NULL; ++ char *rem = NULL; ++ char *sub; + int ret; + +- snprintf(tmp, sizeof(tmp), "%s/../", bpf_get_work_dir(ctx->type)); +- snprintf(rem, sizeof(rem), "%s/", todo); +- sub = strtok(rem, "/"); ++ ret = asprintf(&tmp, "%s/../", bpf_get_work_dir(ctx->type)); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } + ++ ret = asprintf(&rem, "%s/", todo); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ goto out; ++ } ++ ++ sub = strtok(rem, "/"); + while (sub) { + if (strlen(tmp) + strlen(sub) + 2 > PATH_MAX) + return -EINVAL; +@@ -1474,13 +1538,17 @@ static int bpf_make_custom_path(const struct bpf_elf_ctx *ctx, + if (ret && errno != EEXIST) { + fprintf(stderr, "mkdir %s failed: %s\n", tmp, + strerror(errno)); +- return ret; ++ goto out; + } + + sub = strtok(NULL, "/"); + } + +- return 0; ++ ret = 0; ++out: ++ free(rem); ++ free(tmp); ++ return ret; + } + + static int bpf_place_pinned(int fd, const char *name, +@@ -2587,14 +2655,23 @@ struct bpf_jited_aux { + + static int bpf_derive_prog_from_fdinfo(int fd, struct bpf_prog_data *prog) + { +- char file[PATH_MAX], buff[4096]; ++ char *file = NULL; ++ char buff[4096]; + unsigned int val; + FILE *fp; ++ int ret; ++ ++ ret = asprintf(&file, "/proc/%d/fdinfo/%d", getpid(), fd); ++ if (ret < 0) { ++ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); ++ free(file); ++ return ret; ++ } + +- snprintf(file, sizeof(file), "/proc/%d/fdinfo/%d", getpid(), fd); + memset(prog, 0, sizeof(*prog)); + + fp = fopen(file, "r"); ++ free(file); + if (!fp) { + fprintf(stderr, "No procfs support?!\n"); + return -EIO; +-- +2.23.0 + diff --git a/0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch b/0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch deleted file mode 100644 index acf0c21..0000000 --- a/0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 141c6e6397d373126bba14982678dd6f1e9fbfd7 Mon Sep 17 00:00:00 2001 -From: Andrea Claudi -Date: Tue, 9 Jul 2019 15:16:51 +0200 -Subject: [PATCH] ip tunnel: warn when changing IPv6 tunnel without tunnel name - -Tunnel change fails if a tunnel name is not specified while using -'ip -6 tunnel change'. However, no warning message is printed and -no error code is returned. - -$ ip -6 tunnel add ip6tnl1 mode ip6gre local fd::1 remote fd::2 tos inherit ttl 127 encaplimit none dev dummy0 -$ ip -6 tunnel change dev dummy0 local 2001:1234::1 remote 2001:1234::2 -$ ip -6 tunnel show ip6tnl1 -ip6tnl1: gre/ipv6 remote fd::2 local fd::1 dev dummy0 encaplimit none hoplimit 127 tclass inherit flowlabel 0x00000 (flowinfo 0x00000000) - -This commit checks if tunnel interface name is equal to an empty -string: in this case, it prints a warning message to the user. -It intentionally avoids to return an error to not break existing -script setup. - -This is the output after this commit: -$ ip -6 tunnel add ip6tnl1 mode ip6gre local fd::1 remote fd::2 tos inherit ttl 127 encaplimit none dev dummy0 -$ ip -6 tunnel change dev dummy0 local 2001:1234::1 remote 2001:1234::2 -Tunnel interface name not specified -$ ip -6 tunnel show ip6tnl1 -ip6tnl1: gre/ipv6 remote fd::2 local fd::1 dev dummy0 encaplimit none hoplimit 127 tclass inherit flowlabel 0x00000 (flowinfo 0x00000000) - -Reviewed-by: Matteo Croce -Signed-off-by: Andrea Claudi -Signed-off-by: Stephen Hemminger -(cherry picked from commit d035cc1b4e83e2589ea2115cdc2fa7c6d3693a5a) -Signed-off-by: Phil Sutter ---- - ip/ip6tunnel.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c -index 999408ed801b1..e3da11eb4518e 100644 ---- a/ip/ip6tunnel.c -+++ b/ip/ip6tunnel.c -@@ -386,6 +386,9 @@ static int do_add(int cmd, int argc, char **argv) - if (parse_args(argc, argv, cmd, &p) < 0) - return -1; - -+ if (!*p.name) -+ fprintf(stderr, "Tunnel interface name not specified\n"); -+ - if (p.proto == IPPROTO_GRE) - basedev = "ip6gre0"; - else if (p.i_flags & VTI_ISVTI) --- -2.22.0 - diff --git a/0003-ip-route-fix-json-formatting-for-metrics.patch b/0003-ip-route-fix-json-formatting-for-metrics.patch deleted file mode 100644 index 092ba3e..0000000 --- a/0003-ip-route-fix-json-formatting-for-metrics.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 9da7fb1dd27624ed6ab62f5595451f43c3a07d2d Mon Sep 17 00:00:00 2001 -From: Andrea Claudi -Date: Mon, 8 Jul 2019 11:36:42 +0200 -Subject: [PATCH] ip-route: fix json formatting for metrics - -Setting metrics for routes currently lead to non-parsable -json output. For example: - -$ ip link add type dummy -$ ip route add 192.168.2.0 dev dummy0 metric 100 mtu 1000 rto_min 3 -$ ip -j route | jq -parse error: ':' not as part of an object at line 1, column 319 - -Fixing this opening a json object in the metrics array and using -print_string() instead of fprintf(). - -This is the output for the above commands applying this patch: - -$ ip -j route | jq -[ - { - "dst": "192.168.2.0", - "dev": "dummy0", - "scope": "link", - "metric": 100, - "flags": [], - "metrics": [ - { - "mtu": 1000, - "rto_min": 3 - } - ] - } -] - -Fixes: 663c3cb23103f ("iproute: implement JSON and color output") -Fixes: 968272e791710 ("iproute: refactor metrics print") -Signed-off-by: Andrea Claudi -Reported-by: Frank Hofmann -Signed-off-by: Stephen Hemminger -(cherry picked from commit 89ce8012d71f5689074dc4cbe3db102cbdf76460) -Signed-off-by: Phil Sutter ---- - ip/iproute.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/ip/iproute.c b/ip/iproute.c -index 1669e0138259e..2f9b612b0b506 100644 ---- a/ip/iproute.c -+++ b/ip/iproute.c -@@ -578,6 +578,7 @@ static void print_rta_metrics(FILE *fp, const struct rtattr *rta) - int i; - - open_json_array(PRINT_JSON, "metrics"); -+ open_json_object(NULL); - - parse_rtattr(mxrta, RTAX_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)); - -@@ -611,7 +612,7 @@ static void print_rta_metrics(FILE *fp, const struct rtattr *rta) - print_rtax_features(fp, val); - break; - default: -- fprintf(fp, "%u ", val); -+ print_uint(PRINT_ANY, mx_names[i], "%u ", val); - break; - - case RTAX_RTT: -@@ -639,6 +640,7 @@ static void print_rta_metrics(FILE *fp, const struct rtattr *rta) - } - } - -+ close_json_object(); - close_json_array(PRINT_JSON, NULL); - } - --- -2.22.0 - diff --git a/0004-utils-move-parse_percent-to-tc_util.patch b/0004-utils-move-parse_percent-to-tc_util.patch deleted file mode 100644 index fe3ce46..0000000 --- a/0004-utils-move-parse_percent-to-tc_util.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 5b17171ce7363e597009e07fb143522a2d79c77b Mon Sep 17 00:00:00 2001 -From: Andrea Claudi -Date: Fri, 28 Jun 2019 18:03:45 +0200 -Subject: [PATCH] utils: move parse_percent() to tc_util - -As parse_percent() is used only in tc. - -This reduces ip, bridge and genl binaries size: - -$ bloat-o-meter -t bridge/bridge bridge/bridge.new -add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) -Total: Before=50973, After=50864, chg -0.21% - -$ bloat-o-meter -t genl/genl genl/genl.new -add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) -Total: Before=30298, After=30189, chg -0.36% - -$ bloat-o-meter ip/ip ip/ip.new -add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) -Total: Before=674164, After=674055, chg -0.02% - -Signed-off-by: Andrea Claudi -Signed-off-by: David Ahern -(cherry picked from commit 1e5746d5e13d895b63da954f0290cffbb076cefa) -Signed-off-by: Phil Sutter ---- - include/utils.h | 1 - - lib/utils.c | 16 ---------------- - tc/tc_util.c | 16 ++++++++++++++++ - tc/tc_util.h | 1 + - 4 files changed, 17 insertions(+), 17 deletions(-) - -diff --git a/include/utils.h b/include/utils.h -index 927fdc17e09dd..f9a4916b517ab 100644 ---- a/include/utils.h -+++ b/include/utils.h -@@ -145,7 +145,6 @@ int get_addr_rta(inet_prefix *dst, const struct rtattr *rta, int family); - int get_addr_ila(__u64 *val, const char *arg); - - int read_prop(const char *dev, char *prop, long *value); --int parse_percent(double *val, const char *str); - int get_hex(char c); - int get_integer(int *val, const char *arg, int base); - int get_unsigned(unsigned *val, const char *arg, int base); -diff --git a/lib/utils.c b/lib/utils.c -index be0f11b00280d..5da9a47848966 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -101,22 +101,6 @@ out: - return -1; - } - --/* Parse a percent e.g: '30%' -- * return: 0 = ok, -1 = error, 1 = out of range -- */ --int parse_percent(double *val, const char *str) --{ -- char *p; -- -- *val = strtod(str, &p) / 100.; -- if (*val == HUGE_VALF || *val == HUGE_VALL) -- return 1; -- if (*p && strcmp(p, "%")) -- return -1; -- -- return 0; --} -- - int get_hex(char c) - { - if (c >= 'A' && c <= 'F') -diff --git a/tc/tc_util.c b/tc/tc_util.c -index e5d15281581df..53d15e08e9734 100644 ---- a/tc/tc_util.c -+++ b/tc/tc_util.c -@@ -190,6 +190,22 @@ static const struct rate_suffix { - { NULL } - }; - -+/* Parse a percent e.g: '30%' -+ * return: 0 = ok, -1 = error, 1 = out of range -+ */ -+int parse_percent(double *val, const char *str) -+{ -+ char *p; -+ -+ *val = strtod(str, &p) / 100.; -+ if (*val == HUGE_VALF || *val == HUGE_VALL) -+ return 1; -+ if (*p && strcmp(p, "%")) -+ return -1; -+ -+ return 0; -+} -+ - static int parse_percent_rate(char *rate, size_t len, - const char *str, const char *dev) - { -diff --git a/tc/tc_util.h b/tc/tc_util.h -index 825fea36a0809..eb4b60db3fdd7 100644 ---- a/tc/tc_util.h -+++ b/tc/tc_util.h -@@ -101,6 +101,7 @@ int print_tc_classid(char *buf, int len, __u32 h); - char *sprint_tc_classid(__u32 h, char *buf); - - int tc_print_police(FILE *f, struct rtattr *tb); -+int parse_percent(double *val, const char *str); - int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); - - int parse_action_control(int *argc_p, char ***argv_p, --- -2.22.0 - diff --git a/0005-tc-util-constrain-percentage-in-0-100-interval.patch b/0005-tc-util-constrain-percentage-in-0-100-interval.patch deleted file mode 100644 index d5928f5..0000000 --- a/0005-tc-util-constrain-percentage-in-0-100-interval.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 29a5b8d072d06b685c428f15125ff62b8b470064 Mon Sep 17 00:00:00 2001 -From: Andrea Claudi -Date: Sat, 13 Jul 2019 11:44:07 +0200 -Subject: [PATCH] tc: util: constrain percentage in 0-100 interval - -parse_percent() currently allows to specify negative percentages -or value above 100%. However this does not seems to make sense, -as the function is used for probabilities or bandiwidth rates. - -Moreover, using negative values leads to erroneous results -(using Bernoulli loss model as example): - -$ ip link add test type dummy -$ ip link set test up -$ tc qdisc add dev test root netem loss gemodel -10% limit 10 -$ tc qdisc show dev test -qdisc netem 800c: root refcnt 2 limit 10 loss gemodel p 90% r 10% 1-h 100% 1-k 0% - -Using values above 100% we have instead: - -$ ip link add test type dummy -$ ip link set test up -$ tc qdisc add dev test root netem loss gemodel 140% limit 10 -$ tc qdisc show dev test -qdisc netem 800f: root refcnt 2 limit 10 loss gemodel p 40% r 60% 1-h 100% 1-k 0% - -This commit changes parse_percent() with a check to ensure -percentage values stay between 1.0 and 0.0. -parse_percent_rate() function, which already employs a similar -check, is adjusted accordingly. - -With this check in place, we have: - -$ ip link add test type dummy -$ ip link set test up -$ tc qdisc add dev test root netem loss gemodel -10% limit 10 -Illegal "loss gemodel p" - -Fixes: 927e3cfb52b58 ("tc: B.W limits can now be specified in %.") -Signed-off-by: Andrea Claudi -Signed-off-by: Stephen Hemminger -(cherry picked from commit 6bc13e4a20f50e9c37d5a504c78222913c433fd3) -Signed-off-by: Phil Sutter ---- - tc/tc_util.c | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/tc/tc_util.c b/tc/tc_util.c -index 53d15e08e9734..b90d256c33a4a 100644 ---- a/tc/tc_util.c -+++ b/tc/tc_util.c -@@ -198,7 +198,7 @@ int parse_percent(double *val, const char *str) - char *p; - - *val = strtod(str, &p) / 100.; -- if (*val == HUGE_VALF || *val == HUGE_VALL) -+ if (*val > 1.0 || *val < 0.0) - return 1; - if (*p && strcmp(p, "%")) - return -1; -@@ -226,16 +226,16 @@ static int parse_percent_rate(char *rate, size_t len, - if (ret != 1) - goto malf; - -- if (parse_percent(&perc, str_perc)) -+ ret = parse_percent(&perc, str_perc); -+ if (ret == 1) { -+ fprintf(stderr, "Invalid rate specified; should be between [0,100]%% but is %s\n", str); -+ goto err; -+ } else if (ret == -1) { - goto malf; -+ } - - free(str_perc); - -- if (perc > 1.0 || perc < 0.0) { -- fprintf(stderr, "Invalid rate specified; should be between [0,100]%% but is %s\n", str); -- return -1; -- } -- - rate_bit = perc * dev_mbit * 1000 * 1000; - - ret = snprintf(rate, len, "%lf", rate_bit); -@@ -247,8 +247,9 @@ static int parse_percent_rate(char *rate, size_t len, - return 0; - - malf: -- free(str_perc); - fprintf(stderr, "Specified rate value could not be read or is malformed\n"); -+err: -+ free(str_perc); - return -1; - } - --- -2.22.0 - diff --git a/0006-devlink-Change-devlink-health-dump-show-command-to-d.patch b/0006-devlink-Change-devlink-health-dump-show-command-to-d.patch deleted file mode 100644 index a0688e3..0000000 --- a/0006-devlink-Change-devlink-health-dump-show-command-to-d.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f12ee1269f04a5f4ab5c18326004af32da4061ae Mon Sep 17 00:00:00 2001 -From: Aya Levin -Date: Wed, 10 Jul 2019 14:03:19 +0300 -Subject: [PATCH] devlink: Change devlink health dump show command to dumpit - -Although devlink health dump show command is given per reporter, it -returns large amounts of data. Trying to use the doit cb results in -OUT-OF-BUFFER error. This complementary patch raises the DUMP flag in -order to invoke the dumpit cb. We're safe as no existing drivers -implement the dump health reporter option yet. - -Fixes: 041e6e651a8e ("devlink: Add devlink health dump show command") -Signed-off-by: Aya Levin -Signed-off-by: Tariq Toukan -Acked-by: Jiri Pirko -Signed-off-by: Stephen Hemminger -(cherry picked from commit b4d97ef57fd4b7669971ed209065a72d115dffc2) -Signed-off-by: Phil Sutter ---- - devlink/devlink.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/devlink/devlink.c b/devlink/devlink.c -index 5618ba26d6fb3..9c338cb4ccc84 100644 ---- a/devlink/devlink.c -+++ b/devlink/devlink.c -@@ -6072,13 +6072,13 @@ static int cmd_fmsg_object_cb(const struct nlmsghdr *nlh, void *data) - return MNL_CB_OK; - } - --static int cmd_health_object_common(struct dl *dl, uint8_t cmd) -+static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags) - { - struct fmsg_cb_data data; - struct nlmsghdr *nlh; - int err; - -- nlh = mnlg_msg_prepare(dl->nlg, cmd, NLM_F_REQUEST | NLM_F_ACK); -+ nlh = mnlg_msg_prepare(dl->nlg, cmd, flags | NLM_F_REQUEST | NLM_F_ACK); - - err = dl_argv_parse_put(nlh, dl, - DL_OPT_HANDLE | DL_OPT_HEALTH_REPORTER_NAME, 0); -@@ -6093,12 +6093,16 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd) - - static int cmd_health_dump_show(struct dl *dl) - { -- return cmd_health_object_common(dl, DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET); -+ return cmd_health_object_common(dl, -+ DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, -+ NLM_F_DUMP); - } - - static int cmd_health_diagnose(struct dl *dl) - { -- return cmd_health_object_common(dl, DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE); -+ return cmd_health_object_common(dl, -+ DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE, -+ 0); - } - - static int cmd_health_recover(struct dl *dl) --- -2.22.0 - diff --git a/0007-devlink-Fix-binary-values-print.patch b/0007-devlink-Fix-binary-values-print.patch deleted file mode 100644 index a91296f..0000000 --- a/0007-devlink-Fix-binary-values-print.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 4aaf5d7099e7b985973b49f59ceef9b1fd6f6810 Mon Sep 17 00:00:00 2001 -From: Aya Levin -Date: Wed, 10 Jul 2019 14:03:20 +0300 -Subject: [PATCH] devlink: Fix binary values print - -Fix function pr_out_binary_value() to start printing the binary buffer -from offset 0 instead of offset 1. Remove redundant new line at the -beginning of the output - -Example: -With patch: - mlx5e_txqsq: - 05 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 8e 6e 3a 13 07 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - c0 -Without patch - mlx5e_txqsq: - - 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 8e 6e 3a 13 07 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 - -Fixes: 844a61764c6f ("devlink: Add helper functions for name and value separately") -Signed-off-by: Aya Levin -Signed-off-by: Tariq Toukan -Signed-off-by: Stephen Hemminger -(cherry picked from commit 1d05cca2fd70a5bc8a9f4e978aa5629dbc99a973) -Signed-off-by: Phil Sutter ---- - devlink/devlink.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/devlink/devlink.c b/devlink/devlink.c -index 9c338cb4ccc84..5dff974c93c93 100644 ---- a/devlink/devlink.c -+++ b/devlink/devlink.c -@@ -1779,29 +1779,31 @@ static void pr_out_uint64_value(struct dl *dl, uint64_t value) - pr_out(" %"PRIu64, value); - } - -+static bool is_binary_eol(int i) -+{ -+ return !(i%16); -+} -+ - static void pr_out_binary_value(struct dl *dl, uint8_t *data, uint32_t len) - { -- int i = 1; -+ int i = 0; - - if (dl->json_output) - jsonw_start_array(dl->jw); -- else -- pr_out("\n"); - - while (i < len) { -- if (dl->json_output) { -+ if (dl->json_output) - jsonw_printf(dl->jw, "%d", data[i]); -- } else { -- pr_out(" %02x", data[i]); -- if (!(i % 16)) -- pr_out("\n"); -- } -+ else -+ pr_out("%02x ", data[i]); - i++; -+ if (!dl->json_output && is_binary_eol(i)) -+ __pr_out_newline(); - } - if (dl->json_output) - jsonw_end_array(dl->jw); -- else if ((i - 1) % 16) -- pr_out("\n"); -+ else if (!is_binary_eol(i)) -+ __pr_out_newline(); - } - - static void pr_out_str_value(struct dl *dl, const char *value) --- -2.22.0 - diff --git a/0008-devlink-Remove-enclosing-array-brackets-binary-print.patch b/0008-devlink-Remove-enclosing-array-brackets-binary-print.patch deleted file mode 100644 index b9d6096..0000000 --- a/0008-devlink-Remove-enclosing-array-brackets-binary-print.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a5d73c80107321aafd1e2007a059a7eb950412d7 Mon Sep 17 00:00:00 2001 -From: Aya Levin -Date: Wed, 10 Jul 2019 14:03:21 +0300 -Subject: [PATCH] devlink: Remove enclosing array brackets binary print with - json format - -Keep pr_out_binary_value function only for printing. Inner relations -like array grouping should be done outside the function. - -Fixes: 844a61764c6f ("devlink: Add helper functions for name and value separately") -Signed-off-by: Aya Levin -Signed-off-by: Tariq Toukan -Signed-off-by: Stephen Hemminger -(cherry picked from commit f359942a25d368ccf2e47b79f95db2798e09f7a4) -Signed-off-by: Phil Sutter ---- - devlink/devlink.c | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/devlink/devlink.c b/devlink/devlink.c -index 5dff974c93c93..ebb1de3eb2eaa 100644 ---- a/devlink/devlink.c -+++ b/devlink/devlink.c -@@ -1788,9 +1788,6 @@ static void pr_out_binary_value(struct dl *dl, uint8_t *data, uint32_t len) - { - int i = 0; - -- if (dl->json_output) -- jsonw_start_array(dl->jw); -- - while (i < len) { - if (dl->json_output) - jsonw_printf(dl->jw, "%d", data[i]); -@@ -1800,9 +1797,7 @@ static void pr_out_binary_value(struct dl *dl, uint8_t *data, uint32_t len) - if (!dl->json_output && is_binary_eol(i)) - __pr_out_newline(); - } -- if (dl->json_output) -- jsonw_end_array(dl->jw); -- else if (!is_binary_eol(i)) -+ if (!dl->json_output && !is_binary_eol(i)) - __pr_out_newline(); - } - --- -2.22.0 - diff --git a/0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch b/0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch deleted file mode 100644 index 52d01b1..0000000 --- a/0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 742a2436d344ac15330c56a2326c03c8c56686a5 Mon Sep 17 00:00:00 2001 -From: Ivan Delalande -Date: Wed, 17 Jul 2019 18:15:31 -0700 -Subject: [PATCH] json: fix backslash escape typo in jsonw_puts - -Fixes: fcc16c22 ("provide common json output formatter") -Signed-off-by: Ivan Delalande -Signed-off-by: Stephen Hemminger -(cherry picked from commit ed54f76484b5ee47b190a202ecf29fce60d0d878) -Signed-off-by: Phil Sutter ---- - lib/json_writer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/json_writer.c b/lib/json_writer.c -index 5004c181e6225..88c5eb8882254 100644 ---- a/lib/json_writer.c -+++ b/lib/json_writer.c -@@ -75,7 +75,7 @@ static void jsonw_puts(json_writer_t *self, const char *str) - fputs("\\b", self->out); - break; - case '\\': -- fputs("\\n", self->out); -+ fputs("\\\\", self->out); - break; - case '"': - fputs("\\\"", self->out); --- -2.22.0 - diff --git a/iproute.spec b/iproute.spec index fcc2832..c3f48c3 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,20 +1,12 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.2.0 -Release: 2%{?dist} +Version: 5.3.0 +Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch1: 0001-Revert-ip6tunnel-fix-ip-6-show-change-dev-name-cmds.patch -Patch2: 0002-ip-tunnel-warn-when-changing-IPv6-tunnel-without-tun.patch -Patch3: 0003-ip-route-fix-json-formatting-for-metrics.patch -Patch4: 0004-utils-move-parse_percent-to-tc_util.patch -Patch5: 0005-tc-util-constrain-percentage-in-0-100-interval.patch -Patch6: 0006-devlink-Change-devlink-health-dump-show-command-to-d.patch -Patch7: 0007-devlink-Fix-binary-values-print.patch -Patch8: 0008-devlink-Remove-enclosing-array-brackets-binary-print.patch -Patch9: 0009-json-fix-backslash-escape-typo-in-jsonw_puts.patch +Patch1: 0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -132,6 +124,10 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Sep 26 2019 Phil Sutter - 5.3.0-1 +- New version 5.3.0 +- Add upstream-suggested backports + * Thu Jul 25 2019 Fedora Release Engineering - 5.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 108351d..0629eb2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.2.0.tar.xz) = 82bbeae29d98129d822c95ff7523186569e32c66132b8d781d501d61f396b04d122e3d13057dd4236455264008e5bfac7cb63c325908fc1c46d416cbde6ac7e1 +SHA512 (iproute2-5.3.0.tar.xz) = c20ce477cb3ec24194ea56d3d9037795e26975ffde188b63ba974a0aa671dd169f356e9446bf43dc56523e01c0bafa442b91d83da9b2302daee18e237f2f3157 From e919693befd1be0dcfb5639ecd911715ded7c11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 8 Oct 2019 12:32:08 +0200 Subject: [PATCH 059/111] Add a dependency on psmisc The ifcfg script uses killall, provided by the psmisc package. --- iproute.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/iproute.spec b/iproute.spec index c3f48c3..da0a79d 100644 --- a/iproute.spec +++ b/iproute.spec @@ -26,6 +26,7 @@ BuildRequires: linux-atm-libs-devel %endif Provides: /sbin/ip Recommends: %{name}-tc +Requires: psmisc %description The iproute package contains networking utilities (ip and rtmon, for example) From 26d638db91fa316f706ea947ab076bce216ec8cc Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 8 Oct 2019 13:51:27 +0200 Subject: [PATCH 060/111] iproute-5.3.0-2 - ifcfg script uses killall, therefore requires psmisc package --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index da0a79d..198d6f1 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.3.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -125,6 +125,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Oct 08 2019 Phil Sutter - 5.3.0-2 +- ifcfg script uses killall, therefore requires psmisc package + * Thu Sep 26 2019 Phil Sutter - 5.3.0-1 - New version 5.3.0 - Add upstream-suggested backports From 51429ab2bfb43c742c5e1cfd54367bdd61cea57b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 26 Nov 2019 16:37:12 +0100 Subject: [PATCH 061/111] Rebase package on top of iproute2-5.4.0 --- .gitignore | 1 + ...intf-with-asprintf-when-dealing-with.patch | 341 ------------------ ...k-allow-full-range-of-resource-sizes.patch | 43 +++ iproute.spec | 30 +- sources | 2 +- 5 files changed, 54 insertions(+), 363 deletions(-) delete mode 100644 0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch create mode 100644 0001-devlink-allow-full-range-of-resource-sizes.patch diff --git a/.gitignore b/.gitignore index 1103d18..b21cca6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /iproute2-5.1.0.tar.xz /iproute2-5.2.0.tar.xz /iproute2-5.3.0.tar.xz +/iproute2-5.4.0.tar.xz diff --git a/0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch b/0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch deleted file mode 100644 index 85c1c85..0000000 --- a/0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch +++ /dev/null @@ -1,341 +0,0 @@ -From e72287abe26945d0cd453021baa75dd51b6c271b Mon Sep 17 00:00:00 2001 -From: Andrea Claudi -Date: Mon, 16 Sep 2019 15:00:55 +0200 -Subject: [PATCH] bpf: replace snprintf with asprintf when dealing with long - buffers -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reduces stack usage, as asprintf allocates memory on the heap. - -This indirectly fixes a snprintf truncation warning (from gcc v9.2.1): - -bpf.c: In function ‘bpf_get_work_dir’: -bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] - 784 | snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); - | ^ -bpf.c:784:2: note: ‘snprintf’ output between 2 and 4097 bytes into a destination of size 4096 - 784 | snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Fixes: e42256699cac ("bpf: make tc's bpf loader generic and move into lib") -Signed-off-by: Andrea Claudi -Signed-off-by: David Ahern -(cherry picked from commit c0325b06382cb4f7ebfaf80c29c8800d74666fd9) -Signed-off-by: Phil Sutter ---- - lib/bpf.c | 155 ++++++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 116 insertions(+), 39 deletions(-) - -diff --git a/lib/bpf.c b/lib/bpf.c -index 23cb0d96a85ba..10cf9bf44419a 100644 ---- a/lib/bpf.c -+++ b/lib/bpf.c -@@ -406,13 +406,21 @@ static int bpf_derive_elf_map_from_fdinfo(int fd, struct bpf_elf_map *map, - struct bpf_map_ext *ext) - { - unsigned int val, owner_type = 0, owner_jited = 0; -- char file[PATH_MAX], buff[4096]; -+ char *file = NULL; -+ char buff[4096]; - FILE *fp; -+ int ret; - -- snprintf(file, sizeof(file), "/proc/%d/fdinfo/%d", getpid(), fd); -+ ret = asprintf(&file, "/proc/%d/fdinfo/%d", getpid(), fd); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ free(file); -+ return ret; -+ } - memset(map, 0, sizeof(*map)); - - fp = fopen(file, "r"); -+ free(file); - if (!fp) { - fprintf(stderr, "No procfs support?!\n"); - return -EIO; -@@ -600,8 +608,9 @@ int bpf_trace_pipe(void) - 0, - }; - int fd_in, fd_out = STDERR_FILENO; -- char tpipe[PATH_MAX]; -+ char *tpipe = NULL; - const char *mnt; -+ int ret; - - mnt = bpf_find_mntpt("tracefs", TRACEFS_MAGIC, tracefs_mnt, - sizeof(tracefs_mnt), tracefs_known_mnts); -@@ -610,9 +619,15 @@ int bpf_trace_pipe(void) - return -1; - } - -- snprintf(tpipe, sizeof(tpipe), "%s/trace_pipe", mnt); -+ ret = asprintf(&tpipe, "%s/trace_pipe", mnt); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ free(tpipe); -+ return ret; -+ } - - fd_in = open(tpipe, O_RDONLY); -+ free(tpipe); - if (fd_in < 0) - return -1; - -@@ -633,37 +648,50 @@ int bpf_trace_pipe(void) - - static int bpf_gen_global(const char *bpf_sub_dir) - { -- char bpf_glo_dir[PATH_MAX]; -+ char *bpf_glo_dir = NULL; - int ret; - -- snprintf(bpf_glo_dir, sizeof(bpf_glo_dir), "%s/%s/", -- bpf_sub_dir, BPF_DIR_GLOBALS); -+ ret = asprintf(&bpf_glo_dir, "%s/%s/", bpf_sub_dir, BPF_DIR_GLOBALS); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } - - ret = mkdir(bpf_glo_dir, S_IRWXU); - if (ret && errno != EEXIST) { - fprintf(stderr, "mkdir %s failed: %s\n", bpf_glo_dir, - strerror(errno)); -- return ret; -+ goto out; - } - -- return 0; -+ ret = 0; -+out: -+ free(bpf_glo_dir); -+ return ret; - } - - static int bpf_gen_master(const char *base, const char *name) - { -- char bpf_sub_dir[PATH_MAX + NAME_MAX + 1]; -+ char *bpf_sub_dir = NULL; - int ret; - -- snprintf(bpf_sub_dir, sizeof(bpf_sub_dir), "%s%s/", base, name); -+ ret = asprintf(&bpf_sub_dir, "%s%s/", base, name); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } - - ret = mkdir(bpf_sub_dir, S_IRWXU); - if (ret && errno != EEXIST) { - fprintf(stderr, "mkdir %s failed: %s\n", bpf_sub_dir, - strerror(errno)); -- return ret; -+ goto out; - } - -- return bpf_gen_global(bpf_sub_dir); -+ ret = bpf_gen_global(bpf_sub_dir); -+out: -+ free(bpf_sub_dir); -+ return ret; - } - - static int bpf_slave_via_bind_mnt(const char *full_name, -@@ -692,13 +720,22 @@ static int bpf_slave_via_bind_mnt(const char *full_name, - static int bpf_gen_slave(const char *base, const char *name, - const char *link) - { -- char bpf_lnk_dir[PATH_MAX + NAME_MAX + 1]; -- char bpf_sub_dir[PATH_MAX + NAME_MAX]; -+ char *bpf_lnk_dir = NULL; -+ char *bpf_sub_dir = NULL; - struct stat sb = {}; - int ret; - -- snprintf(bpf_lnk_dir, sizeof(bpf_lnk_dir), "%s%s/", base, link); -- snprintf(bpf_sub_dir, sizeof(bpf_sub_dir), "%s%s", base, name); -+ ret = asprintf(&bpf_lnk_dir, "%s%s/", base, link); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } -+ -+ ret = asprintf(&bpf_sub_dir, "%s%s", base, name); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } - - ret = symlink(bpf_lnk_dir, bpf_sub_dir); - if (ret) { -@@ -706,25 +743,30 @@ static int bpf_gen_slave(const char *base, const char *name, - if (errno != EPERM) { - fprintf(stderr, "symlink %s failed: %s\n", - bpf_sub_dir, strerror(errno)); -- return ret; -+ goto out; - } - -- return bpf_slave_via_bind_mnt(bpf_sub_dir, -- bpf_lnk_dir); -+ ret = bpf_slave_via_bind_mnt(bpf_sub_dir, bpf_lnk_dir); -+ goto out; - } - - ret = lstat(bpf_sub_dir, &sb); - if (ret) { - fprintf(stderr, "lstat %s failed: %s\n", - bpf_sub_dir, strerror(errno)); -- return ret; -+ goto out; - } - -- if ((sb.st_mode & S_IFMT) != S_IFLNK) -- return bpf_gen_global(bpf_sub_dir); -+ if ((sb.st_mode & S_IFMT) != S_IFLNK) { -+ ret = bpf_gen_global(bpf_sub_dir); -+ goto out; -+ } - } - -- return 0; -+out: -+ free(bpf_lnk_dir); -+ free(bpf_sub_dir); -+ return ret; - } - - static int bpf_gen_hierarchy(const char *base) -@@ -742,7 +784,7 @@ static int bpf_gen_hierarchy(const char *base) - static const char *bpf_get_work_dir(enum bpf_prog_type type) - { - static char bpf_tmp[PATH_MAX] = BPF_DIR_MNT; -- static char bpf_wrk_dir[PATH_MAX]; -+ static char *bpf_wrk_dir; - static const char *mnt; - static bool bpf_mnt_cached; - const char *mnt_env = getenv(BPF_ENV_MNT); -@@ -781,7 +823,12 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type) - } - } - -- snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); -+ ret = asprintf(&bpf_wrk_dir, "%s/", mnt); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ free(bpf_wrk_dir); -+ goto out; -+ } - - ret = bpf_gen_hierarchy(bpf_wrk_dir); - if (ret) { -@@ -1438,31 +1485,48 @@ static int bpf_probe_pinned(const char *name, const struct bpf_elf_ctx *ctx, - - static int bpf_make_obj_path(const struct bpf_elf_ctx *ctx) - { -- char tmp[PATH_MAX]; -+ char *tmp = NULL; - int ret; - -- snprintf(tmp, sizeof(tmp), "%s/%s", bpf_get_work_dir(ctx->type), -- ctx->obj_uid); -+ ret = asprintf(&tmp, "%s/%s", bpf_get_work_dir(ctx->type), ctx->obj_uid); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } - - ret = mkdir(tmp, S_IRWXU); - if (ret && errno != EEXIST) { - fprintf(stderr, "mkdir %s failed: %s\n", tmp, strerror(errno)); -- return ret; -+ goto out; - } - -- return 0; -+ ret = 0; -+out: -+ free(tmp); -+ return ret; - } - - static int bpf_make_custom_path(const struct bpf_elf_ctx *ctx, - const char *todo) - { -- char tmp[PATH_MAX], rem[PATH_MAX], *sub; -+ char *tmp = NULL; -+ char *rem = NULL; -+ char *sub; - int ret; - -- snprintf(tmp, sizeof(tmp), "%s/../", bpf_get_work_dir(ctx->type)); -- snprintf(rem, sizeof(rem), "%s/", todo); -- sub = strtok(rem, "/"); -+ ret = asprintf(&tmp, "%s/../", bpf_get_work_dir(ctx->type)); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } - -+ ret = asprintf(&rem, "%s/", todo); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ goto out; -+ } -+ -+ sub = strtok(rem, "/"); - while (sub) { - if (strlen(tmp) + strlen(sub) + 2 > PATH_MAX) - return -EINVAL; -@@ -1474,13 +1538,17 @@ static int bpf_make_custom_path(const struct bpf_elf_ctx *ctx, - if (ret && errno != EEXIST) { - fprintf(stderr, "mkdir %s failed: %s\n", tmp, - strerror(errno)); -- return ret; -+ goto out; - } - - sub = strtok(NULL, "/"); - } - -- return 0; -+ ret = 0; -+out: -+ free(rem); -+ free(tmp); -+ return ret; - } - - static int bpf_place_pinned(int fd, const char *name, -@@ -2587,14 +2655,23 @@ struct bpf_jited_aux { - - static int bpf_derive_prog_from_fdinfo(int fd, struct bpf_prog_data *prog) - { -- char file[PATH_MAX], buff[4096]; -+ char *file = NULL; -+ char buff[4096]; - unsigned int val; - FILE *fp; -+ int ret; -+ -+ ret = asprintf(&file, "/proc/%d/fdinfo/%d", getpid(), fd); -+ if (ret < 0) { -+ fprintf(stderr, "asprintf failed: %s\n", strerror(errno)); -+ free(file); -+ return ret; -+ } - -- snprintf(file, sizeof(file), "/proc/%d/fdinfo/%d", getpid(), fd); - memset(prog, 0, sizeof(*prog)); - - fp = fopen(file, "r"); -+ free(file); - if (!fp) { - fprintf(stderr, "No procfs support?!\n"); - return -EIO; --- -2.23.0 - diff --git a/0001-devlink-allow-full-range-of-resource-sizes.patch b/0001-devlink-allow-full-range-of-resource-sizes.patch new file mode 100644 index 0000000..1d45b21 --- /dev/null +++ b/0001-devlink-allow-full-range-of-resource-sizes.patch @@ -0,0 +1,43 @@ +From b9cee97db2169bd9627c5a7117e57c0892e8f552 Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Tue, 5 Nov 2019 13:17:07 -0800 +Subject: [PATCH] devlink: allow full range of resource sizes + +Resource size is a 64 bit attribute at netlink level. +Make the command line argument 64 bit as well. + +Fixes: 8cd644095842 ("devlink: Add support for devlink resource abstraction") +Signed-off-by: Jakub Kicinski +Acked-by: Jiri Pirko +Signed-off-by: David Ahern +(cherry picked from commit c3f69bf923dea50e48564fd520fec6314ddbcf5f) +Signed-off-by: Phil Sutter +--- + devlink/devlink.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/devlink/devlink.c b/devlink/devlink.c +index 056ac95ee726f..ebffa8c80ffef 100644 +--- a/devlink/devlink.c ++++ b/devlink/devlink.c +@@ -281,7 +281,7 @@ struct dl_opts { + bool dpipe_counters_enable; + bool eswitch_encap_mode; + const char *resource_path; +- uint32_t resource_size; ++ uint64_t resource_size; + uint32_t resource_id; + bool resource_id_valid; + const char *param_name; +@@ -1334,7 +1334,7 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required, + } else if (dl_argv_match(dl, "size") && + (o_all & DL_OPT_RESOURCE_SIZE)) { + dl_arg_inc(dl); +- err = dl_argv_uint32_t(dl, &opts->resource_size); ++ err = dl_argv_uint64_t(dl, &opts->resource_size); + if (err) + return err; + o_found |= DL_OPT_RESOURCE_SIZE; +-- +2.24.0 + diff --git a/iproute.spec b/iproute.spec index 198d6f1..b973427 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,12 +1,12 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.3.0 -Release: 2%{?dist} +Version: 5.4.0 +Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch1: 0001-bpf-replace-snprintf-with-asprintf-when-dealing-with.patch +Patch1: 0001-devlink-allow-full-range-of-resource-sizes.patch License: GPLv2+ and Public Domain BuildRequires: gcc @@ -27,6 +27,7 @@ BuildRequires: linux-atm-libs-devel Provides: /sbin/ip Recommends: %{name}-tc Requires: psmisc +Obsoletes: iproute-doc < %{version}-%{release} %description The iproute package contains networking utilities (ip and rtmon, for example) @@ -44,15 +45,6 @@ The Traffic Control utility manages queueing disciplines, their classes and attached filters and actions. It is the standard tool to configure QoS in Linux. -%if ! 0%{?_module_build} -%package doc -Summary: Documentation for iproute2 utilities with examples -License: GPLv2+ - -%description doc -The iproute documentation contains howtos and examples of settings. -%endif - %package devel Summary: iproute development files License: GPLv2+ @@ -89,7 +81,7 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %dir %{_sysconfdir}/iproute2 %{!?_licensedir:%global license %%doc} %license COPYING -%doc README README.distribution README.lnstat +%doc README %{_mandir}/man7/* %exclude %{_mandir}/man7/tc-* %{_mandir}/man8/* @@ -101,7 +93,6 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %files tc %{!?_licensedir:%global license %%doc} %license COPYING -%doc README.iproute2+tc %{_mandir}/man7/tc-* %{_mandir}/man8/tc* %dir %{_libdir}/tc/ @@ -109,13 +100,6 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_sbindir}/tc %{_datadir}/bash-completion/completions/tc -%if ! 0%{?_module_build} -%files doc -%{!?_licensedir:%global license %%doc} -%license COPYING -%doc %{_docdir}/examples -%endif - %files devel %{!?_licensedir:%global license %%doc} %license COPYING @@ -125,6 +109,10 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Nov 26 2019 Phil Sutter - 5.4.0-1 +- New version 5.4.0 +- Drop iproute-doc package, upstream removed all non-manpage documentation + * Tue Oct 08 2019 Phil Sutter - 5.3.0-2 - ifcfg script uses killall, therefore requires psmisc package diff --git a/sources b/sources index 0629eb2..c870a64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.3.0.tar.xz) = c20ce477cb3ec24194ea56d3d9037795e26975ffde188b63ba974a0aa671dd169f356e9446bf43dc56523e01c0bafa442b91d83da9b2302daee18e237f2f3157 +SHA512 (iproute2-5.4.0.tar.xz) = 26d1230e10d9ba4466edd3fe95cb6f595df691eeb27b87ae845ceb9da09fe11c2e0daa8d67187121320413f9ee7131fd426182055eb285be7c4de558d9e47051 From ba82a868379228bef3ef59a0e26aa48e54b7f7cb Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 28 Jan 2020 11:06:32 +0100 Subject: [PATCH 062/111] Rebase package on top of iproute2-5.5.0 --- .gitignore | 1 + ...k-allow-full-range-of-resource-sizes.patch | 43 ------------------- iproute.spec | 7 +-- sources | 2 +- 4 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 0001-devlink-allow-full-range-of-resource-sizes.patch diff --git a/.gitignore b/.gitignore index b21cca6..6d00acb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /iproute2-5.2.0.tar.xz /iproute2-5.3.0.tar.xz /iproute2-5.4.0.tar.xz +/iproute2-5.5.0.tar.xz diff --git a/0001-devlink-allow-full-range-of-resource-sizes.patch b/0001-devlink-allow-full-range-of-resource-sizes.patch deleted file mode 100644 index 1d45b21..0000000 --- a/0001-devlink-allow-full-range-of-resource-sizes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b9cee97db2169bd9627c5a7117e57c0892e8f552 Mon Sep 17 00:00:00 2001 -From: Jakub Kicinski -Date: Tue, 5 Nov 2019 13:17:07 -0800 -Subject: [PATCH] devlink: allow full range of resource sizes - -Resource size is a 64 bit attribute at netlink level. -Make the command line argument 64 bit as well. - -Fixes: 8cd644095842 ("devlink: Add support for devlink resource abstraction") -Signed-off-by: Jakub Kicinski -Acked-by: Jiri Pirko -Signed-off-by: David Ahern -(cherry picked from commit c3f69bf923dea50e48564fd520fec6314ddbcf5f) -Signed-off-by: Phil Sutter ---- - devlink/devlink.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/devlink/devlink.c b/devlink/devlink.c -index 056ac95ee726f..ebffa8c80ffef 100644 ---- a/devlink/devlink.c -+++ b/devlink/devlink.c -@@ -281,7 +281,7 @@ struct dl_opts { - bool dpipe_counters_enable; - bool eswitch_encap_mode; - const char *resource_path; -- uint32_t resource_size; -+ uint64_t resource_size; - uint32_t resource_id; - bool resource_id_valid; - const char *param_name; -@@ -1334,7 +1334,7 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required, - } else if (dl_argv_match(dl, "size") && - (o_all & DL_OPT_RESOURCE_SIZE)) { - dl_arg_inc(dl); -- err = dl_argv_uint32_t(dl, &opts->resource_size); -+ err = dl_argv_uint64_t(dl, &opts->resource_size); - if (err) - return err; - o_found |= DL_OPT_RESOURCE_SIZE; --- -2.24.0 - diff --git a/iproute.spec b/iproute.spec index b973427..38bb655 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,13 +1,11 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.4.0 +Version: 5.5.0 Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch1: 0001-devlink-allow-full-range-of-resource-sizes.patch - License: GPLv2+ and Public Domain BuildRequires: gcc BuildRequires: bison @@ -109,6 +107,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Jan 28 2020 Phil Sutter - 5.5.0-1 +- New version 5.5.0 + * Tue Nov 26 2019 Phil Sutter - 5.4.0-1 - New version 5.4.0 - Drop iproute-doc package, upstream removed all non-manpage documentation diff --git a/sources b/sources index c870a64..fd93a9a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.4.0.tar.xz) = 26d1230e10d9ba4466edd3fe95cb6f595df691eeb27b87ae845ceb9da09fe11c2e0daa8d67187121320413f9ee7131fd426182055eb285be7c4de558d9e47051 +SHA512 (iproute2-5.5.0.tar.xz) = a59fb6d620206aa17a4ff7d4510b99322e39b6cf34a00953a7d4cd4d62ca85de16d2e28e33cafa7b026edd4f63c81f3f337954aafe963b964ca0cd2d5c54ac78 From 415ca140888e863342401aaa72681515603df002 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 3 Jun 2020 10:29:13 +0200 Subject: [PATCH 063/111] Rebase package on top of iproute2-5.7.0 --- .gitignore | 1 + iproute.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6d00acb..6e1d42c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /iproute2-5.3.0.tar.xz /iproute2-5.4.0.tar.xz /iproute2-5.5.0.tar.xz +/iproute2-5.7.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 38bb655..bd74579 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.5.0 +Version: 5.7.0 Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -87,6 +87,7 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc +%{_datadir}/bash-completion/completions/devlink %files tc %{!?_licensedir:%global license %%doc} @@ -107,6 +108,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Jun 03 2020 Phil Sutter - 5.7.0-1 +- New version 5.7.0 + * Tue Jan 28 2020 Phil Sutter - 5.5.0-1 - New version 5.5.0 diff --git a/sources b/sources index fd93a9a..d9b2c5b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.5.0.tar.xz) = a59fb6d620206aa17a4ff7d4510b99322e39b6cf34a00953a7d4cd4d62ca85de16d2e28e33cafa7b026edd4f63c81f3f337954aafe963b964ca0cd2d5c54ac78 +SHA512 (iproute2-5.7.0.tar.xz) = d5ef68e0eb8e84fbff68c2e7dd4097b9ceb438c928d17ede4130876802dfeafe8bf08d82b4fd39005314e0679c0b261aaa3d6a0a2ff364074a43a043a855a634 From fc0b49e928bc5dec727b1b9931e9ce6afae2029f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 01:55:14 +0000 Subject: [PATCH 064/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index bd74579..c6881f6 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.7.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -108,6 +108,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 5.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jun 03 2020 Phil Sutter - 5.7.0-1 - New version 5.7.0 From 3e3e60bdb8a4a9eac937eb1b076b5f381c6b978c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 10 Aug 2020 12:35:26 +0200 Subject: [PATCH 065/111] Rebase package on top of iproute2-5.8.0 --- .gitignore | 1 + iproute.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6e1d42c..da0698b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /iproute2-5.4.0.tar.xz /iproute2-5.5.0.tar.xz /iproute2-5.7.0.tar.xz +/iproute2-5.8.0.tar.xz diff --git a/iproute.spec b/iproute.spec index c6881f6..43e421b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.7.0 -Release: 2%{?dist} +Version: 5.8.0 +Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -108,6 +108,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Mon Aug 10 2020 Phil Sutter - 5.8.0-1 +- New version 5.8.0 + * Tue Jul 28 2020 Fedora Release Engineering - 5.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index d9b2c5b..71785b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.7.0.tar.xz) = d5ef68e0eb8e84fbff68c2e7dd4097b9ceb438c928d17ede4130876802dfeafe8bf08d82b4fd39005314e0679c0b261aaa3d6a0a2ff364074a43a043a855a634 +SHA512 (iproute2-5.8.0.tar.xz) = f2a3f7dcf5cb39ca7cd14f0e40e45641eccf4b93427c527a09fd789ac8621c5c3359769ca61fcc8bab7e915edd943c39b7c3e15cbfc497187aa6271eed0a9152 From 495711a13bccaad8f8aa720595131550dc71d7b5 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 2 Dec 2020 20:23:47 +0100 Subject: [PATCH 066/111] Use rpm configure/build/install rpm macros Signed-off-by: Andrea Claudi --- iproute.spec | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/iproute.spec b/iproute.spec index 43e421b..e71d221 100644 --- a/iproute.spec +++ b/iproute.spec @@ -55,21 +55,13 @@ The libnetlink static library. %autosetup -p1 -n %{name}2-%{version} %build -export CFLAGS='%{optflags}' -export LDFLAGS='%{build_ldflags}' -export LIBDIR='%{_libdir}' -export IPT_LIB_DIR='/%{_lib}/xtables' -./configure -make %{?_smp_mflags} +%configure +%make_build %install -export DESTDIR='%{buildroot}' export SBINDIR='%{_sbindir}' -export MANDIR='%{_mandir}' export LIBDIR='%{_libdir}' -export CONFDIR='%{_sysconfdir}/iproute2' -export DOCDIR='%{_docdir}' -make install +%make_install # libnetlink install -D -m644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h From 6e849e5270fa82cb4978947efa38224c562a9b01 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 2 Dec 2020 20:29:21 +0100 Subject: [PATCH 067/111] Fix rpmlint warn unversioned-explicit-provides on tc Signed-off-by: Andrea Claudi --- iproute.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index e71d221..2fee2cc 100644 --- a/iproute.spec +++ b/iproute.spec @@ -36,7 +36,7 @@ kernel. Summary: Linux Traffic Control utility License: GPLv2+ Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: tc +Provides: /sbin/tc %description tc The Traffic Control utility manages queueing disciplines, their classes and From 26cbcf8539dc51111dcf0da6d5423b3e2ba7839b Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Fri, 4 Dec 2020 14:03:57 +0100 Subject: [PATCH 068/111] Add Provides: iproute-doc This fix an rpmlint warning caused by Obsoletes: iproute-doc without any package providing it. Signed-off-by: Andrea Claudi --- iproute.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/iproute.spec b/iproute.spec index 2fee2cc..8258543 100644 --- a/iproute.spec +++ b/iproute.spec @@ -23,6 +23,7 @@ BuildRequires: linux-atm-libs-devel %endif %endif Provides: /sbin/ip +Provides: iproute-doc = %{version}-%{release} Recommends: %{name}-tc Requires: psmisc Obsoletes: iproute-doc < %{version}-%{release} From 32597caac48b7382bfa1b5bf95e37f870829e9ad Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 2 Dec 2020 18:48:54 +0100 Subject: [PATCH 069/111] Rebase package on top of iproute2-5.9.0 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index da0698b..061a864 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /iproute2-5.5.0.tar.xz /iproute2-5.7.0.tar.xz /iproute2-5.8.0.tar.xz +/iproute2-5.9.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 8258543..ef8a217 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.8.0 +Version: 5.9.0 Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -101,6 +101,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Dec 2 2020 Andrea Claudi - 5.9.0-1 +- New version 5.9.0 + * Mon Aug 10 2020 Phil Sutter - 5.8.0-1 - New version 5.8.0 diff --git a/sources b/sources index 71785b2..5228a25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.8.0.tar.xz) = f2a3f7dcf5cb39ca7cd14f0e40e45641eccf4b93427c527a09fd789ac8621c5c3359769ca61fcc8bab7e915edd943c39b7c3e15cbfc497187aa6271eed0a9152 +SHA512 (iproute2-5.9.0.tar.xz) = bce59b0e8d876f10f94926be7f2a7cda0de15db04fabedfe938649d486ca6d6d222523d1661b8b36ea50e35369a4730938d6ebeb80577ac0522a3432037bcd50 From 49aaa709ec0ba08167b7909b6f103d882c08161b Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Mon, 21 Dec 2020 20:08:58 +0100 Subject: [PATCH 070/111] Rebase package on top of iproute2-5.10.0 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 061a864..7ae29dc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /iproute2-5.7.0.tar.xz /iproute2-5.8.0.tar.xz /iproute2-5.9.0.tar.xz +/iproute2-5.10.0.tar.xz diff --git a/iproute.spec b/iproute.spec index ef8a217..a8f4e05 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.9.0 +Version: 5.10.0 Release: 1%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -101,6 +101,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Mon Dec 21 2020 Andrea Claudi - 5.10.0-1 +- New version 5.10.0 (#1909551) + * Wed Dec 2 2020 Andrea Claudi - 5.9.0-1 - New version 5.9.0 diff --git a/sources b/sources index 5228a25..33bd142 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-5.9.0.tar.xz) = bce59b0e8d876f10f94926be7f2a7cda0de15db04fabedfe938649d486ca6d6d222523d1661b8b36ea50e35369a4730938d6ebeb80577ac0522a3432037bcd50 +SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13 From d90e533c293975caf831c232ac451b210ab22956 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 5 Jan 2021 06:19:11 +0000 Subject: [PATCH 071/111] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- iproute.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/iproute.spec b/iproute.spec index a8f4e05..cfb86ea 100644 --- a/iproute.spec +++ b/iproute.spec @@ -17,6 +17,7 @@ BuildRequires: libdb-devel BuildRequires: libmnl-devel BuildRequires: libselinux-devel BuildRequires: pkgconfig +BuildRequires: make %if ! 0%{?_module_build} %if 0%{?fedora} BuildRequires: linux-atm-libs-devel From 9440bece435ac69d0b611f0266c63d62b7b1e238 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 14:27:39 +0000 Subject: [PATCH 072/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index cfb86ea..4d11f70 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.10.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -102,6 +102,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 5.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Dec 21 2020 Andrea Claudi - 5.10.0-1 - New version 5.10.0 (#1909551) From e100ed01fc4b57f1579015ac66bcb748b1995d4a Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Mon, 18 Jan 2021 01:02:33 +0000 Subject: [PATCH 073/111] Spec file cleanup --- iproute.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/iproute.spec b/iproute.spec index 4d11f70..8ab529b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -3,8 +3,8 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.10.0 Release: 2%{?dist} -URL: http://kernel.org/pub/linux/utils/net/%{name}2/ -Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +URL: https://kernel.org/pub/linux/utils/net/%{name}2/ +Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz License: GPLv2+ and Public Domain BuildRequires: gcc @@ -71,7 +71,6 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %files %dir %{_sysconfdir}/iproute2 -%{!?_licensedir:%global license %%doc} %license COPYING %doc README %{_mandir}/man7/* @@ -84,7 +83,6 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_datadir}/bash-completion/completions/devlink %files tc -%{!?_licensedir:%global license %%doc} %license COPYING %{_mandir}/man7/tc-* %{_mandir}/man8/tc* @@ -94,7 +92,6 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_datadir}/bash-completion/completions/tc %files devel -%{!?_licensedir:%global license %%doc} %license COPYING %{_mandir}/man3/* %{_libdir}/libnetlink.a From 50c05074a3161f1cdd09d3b88c52585872bb6b86 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Fri, 26 Feb 2021 18:07:44 +0100 Subject: [PATCH 074/111] Rebase package on top of iproute2-5.11.0 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 7 +++++-- sources | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7ae29dc..823e4bc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /iproute2-5.8.0.tar.xz /iproute2-5.9.0.tar.xz /iproute2-5.10.0.tar.xz +/iproute2-5.11.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 8ab529b..aadf6cf 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.10.0 -Release: 2%{?dist} +Version: 5.11.0 +Release: 1%{?dist} URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -99,6 +99,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Feb 26 2021 Andrea Claudi - 5.11.0-1 +- New version 5.11.0 (#1931731) + * Tue Jan 26 2021 Fedora Release Engineering - 5.10.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 33bd142..5c68742 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13 +SHA512 (iproute2-5.11.0.tar.xz) = 8d0e7efc20db70af2d344962610b7fb7f464da567f63e094a2e2a9915f6e9087a2282163d2c73eb2065aaec4f0b0cf19614253798153b31e34b06f57e704f3ed From c193bd78b0b81d728edd083fa9361f91ddf5ff7c Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Tue, 27 Apr 2021 21:46:31 +0200 Subject: [PATCH 075/111] Rebase package on top of iproute2-5.12.0 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 823e4bc..6970810 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /iproute2-5.9.0.tar.xz /iproute2-5.10.0.tar.xz /iproute2-5.11.0.tar.xz +/iproute2-5.12.0.tar.xz diff --git a/iproute.spec b/iproute.spec index aadf6cf..7839897 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.11.0 +Version: 5.12.0 Release: 1%{?dist} URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -99,6 +99,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Apr 27 2021 Andrea Claudi - 5.12.0-1 +- Update to 5.12.0 (#1954257) + * Fri Feb 26 2021 Andrea Claudi - 5.11.0-1 - New version 5.11.0 (#1931731) diff --git a/sources b/sources index 5c68742..1de9de1 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13 SHA512 (iproute2-5.11.0.tar.xz) = 8d0e7efc20db70af2d344962610b7fb7f464da567f63e094a2e2a9915f6e9087a2282163d2c73eb2065aaec4f0b0cf19614253798153b31e34b06f57e704f3ed +SHA512 (iproute2-5.12.0.tar.xz) = 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac From 89005f26e9bc81764fe719aec9a4c65915494497 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 30 Jun 2021 13:18:11 +0200 Subject: [PATCH 076/111] Rebase package on top of iproute2-5.13.0 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6970810..bcdf03a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /iproute2-5.10.0.tar.xz /iproute2-5.11.0.tar.xz /iproute2-5.12.0.tar.xz +/iproute2-5.13.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 7839897..d7a8f65 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.12.0 +Version: 5.13.0 Release: 1%{?dist} URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -99,6 +99,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Jun 30 2021 Andrea Claudi - 5.13.0-1 +- Update to 5.13.0 (#1977463) + * Tue Apr 27 2021 Andrea Claudi - 5.12.0-1 - Update to 5.12.0 (#1954257) diff --git a/sources b/sources index 1de9de1..8513c83 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13 SHA512 (iproute2-5.11.0.tar.xz) = 8d0e7efc20db70af2d344962610b7fb7f464da567f63e094a2e2a9915f6e9087a2282163d2c73eb2065aaec4f0b0cf19614253798153b31e34b06f57e704f3ed SHA512 (iproute2-5.12.0.tar.xz) = 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac +SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d From 477162c60518eb67b4eb3a83dcc359e2a6ac3ba4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 08:41:51 +0000 Subject: [PATCH 077/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index d7a8f65..d5135d6 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.13.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -99,6 +99,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 5.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jun 30 2021 Andrea Claudi - 5.13.0-1 - Update to 5.13.0 (#1977463) From 665ce7375fdb003966a76ff4100510ef49f06e63 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 20 Oct 2021 14:51:03 +0200 Subject: [PATCH 078/111] iproute-5.14.0-1 * Wed Oct 20 2021 Andrea Claudi - 5.14.0-1 - New version 5.14.0 [1999860] Resolves: rhbz#1999860 Signed-off-by: Andrea Claudi --- .gitignore | 1 + ...igure-restore-backward-compatibility.patch | 50 ++++++ ...-parsing-issue-on-include_dir-option.patch | 76 +++++++++ ...x-parsing-issue-on-libbpf_dir-option.patch | 79 +++++++++ ...rsing-issue-with-more-than-one-value.patch | 63 ++++++++ 0005-configure-simplify-options-parsing.patch | 114 +++++++++++++ ...-configure-support-param-value-style.patch | 53 ++++++ 0007-configure-add-the-prefix-option.patch | 72 +++++++++ 0008-configure-add-the-libdir-option.patch | 151 ++++++++++++++++++ iproute.spec | 101 +++++++++--- sources | 1 + 11 files changed, 743 insertions(+), 18 deletions(-) create mode 100644 0001-configure-restore-backward-compatibility.patch create mode 100644 0002-configure-fix-parsing-issue-on-include_dir-option.patch create mode 100644 0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch create mode 100644 0004-configure-fix-parsing-issue-with-more-than-one-value.patch create mode 100644 0005-configure-simplify-options-parsing.patch create mode 100644 0006-configure-support-param-value-style.patch create mode 100644 0007-configure-add-the-prefix-option.patch create mode 100644 0008-configure-add-the-libdir-option.patch diff --git a/.gitignore b/.gitignore index bcdf03a..2f6d853 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /iproute2-5.11.0.tar.xz /iproute2-5.12.0.tar.xz /iproute2-5.13.0.tar.xz +/iproute2-5.14.0.tar.xz diff --git a/0001-configure-restore-backward-compatibility.patch b/0001-configure-restore-backward-compatibility.patch new file mode 100644 index 0000000..ad8178d --- /dev/null +++ b/0001-configure-restore-backward-compatibility.patch @@ -0,0 +1,50 @@ +From 5e6e93a55d2335b90aacb0107e962610cce64007 Mon Sep 17 00:00:00 2001 +Message-Id: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: restore backward compatibility + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2.git commit a3272b93 + +commit a3272b93725a406bc98b67373da67a4bdf6fcdb0 +Author: Luca Boccassi +Date: Thu Sep 2 12:38:54 2021 +0100 + + configure: restore backward compatibility + + Commit a9c3d70d902a0473ee5c13336317006a52ce8242 broke backward compatibility + by making 'configure' error out if parameters are passed, instead of + ignoring them. + Sometimes packaging systems detect 'configure' and assume it's from + autotools, and pass a bunch of options. Eg: + + dh_auto_configure + ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking + + Ignore unknown options again instead of erroring out. + + Fixes: a9c3d70d902a ("configure: add options ability") + + Signed-off-by: Luca Boccassi + Signed-off-by: Stephen Hemminger +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 0a4a0fc9..7f4f3bd9 100755 +--- a/configure ++++ b/configure +@@ -518,7 +518,7 @@ else + "") + break ;; + *) +- usage 1 ;; ++ shift 1 ;; + esac + done + fi +-- +2.31.1 + diff --git a/0002-configure-fix-parsing-issue-on-include_dir-option.patch b/0002-configure-fix-parsing-issue-on-include_dir-option.patch new file mode 100644 index 0000000..c061c51 --- /dev/null +++ b/0002-configure-fix-parsing-issue-on-include_dir-option.patch @@ -0,0 +1,76 @@ +From 290ce87f0a59ec4ddc83918c073364540057ae64 Mon Sep 17 00:00:00 2001 +Message-Id: <290ce87f0a59ec4ddc83918c073364540057ae64.1634733799.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: fix parsing issue on include_dir option + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit 1d819dcc + +commit 1d819dcc741e25958190e31f8186c940713fa0a8 +Author: Andrea Claudi +Date: Thu Oct 14 10:50:49 2021 +0200 + + configure: fix parsing issue on include_dir option + + configure is stuck in an endless loop if '--include_dir' option is used + without a value: + + $ ./configure --include_dir + ./configure: line 506: shift: 2: shift count out of range + ./configure: line 506: shift: 2: shift count out of range + [...] + + Fix it splitting 'shift 2' into two consecutive shifts, and making the + second one conditional to the number of remaining arguments. + + A check is also provided after the while loop to verify the include dir + exists; this avoid to produce an erroneous configuration. + + Fixes: a9c3d70d902a ("configure: add options ability") + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + configure | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index 7f4f3bd9..ea9051ab 100755 +--- a/configure ++++ b/configure +@@ -485,7 +485,7 @@ usage() + { + cat < Path to iproute2 include dir + --libbpf_dir Path to libbpf DESTDIR + --libbpf_force Enable/disable libbpf by force. Available options: + on: require link against libbpf, quit config if no libbpf support +@@ -502,8 +502,9 @@ else + while true; do + case "$1" in + --include_dir) +- INCLUDE=$2 +- shift 2 ;; ++ shift ++ INCLUDE="$1" ++ [ "$#" -gt 0 ] && shift ;; + --libbpf_dir) + LIBBPF_DIR="$2" + shift 2 ;; +@@ -523,6 +524,8 @@ else + done + fi + ++[ -d "$INCLUDE" ] || usage 1 ++ + echo "# Generated config based on" $INCLUDE >$CONFIG + quiet_config >> $CONFIG + +-- +2.31.1 + diff --git a/0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch b/0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch new file mode 100644 index 0000000..5a8c17d --- /dev/null +++ b/0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch @@ -0,0 +1,79 @@ +From 5f717b9a1bb8c49e101670682d73bc5ae9ee701a Mon Sep 17 00:00:00 2001 +Message-Id: <5f717b9a1bb8c49e101670682d73bc5ae9ee701a.1634733799.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: fix parsing issue on libbpf_dir option + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit 48c379bc + +commit 48c379bc2afd43b3246f68ed46475f5318b1218f +Author: Andrea Claudi +Date: Thu Oct 14 10:50:50 2021 +0200 + + configure: fix parsing issue on libbpf_dir option + + configure is stuck in an endless loop if '--libbpf_dir' option is used + without a value: + + $ ./configure --libbpf_dir + ./configure: line 515: shift: 2: shift count out of range + ./configure: line 515: shift: 2: shift count out of range + [...] + + Fix it splitting 'shift 2' into two consecutive shifts, and making the + second one conditional to the number of remaining arguments. + + A check is also provided after the while loop to verify the libbpf dir + exists; also, as LIBBPF_DIR does not have a default value, configure bails + out if the user does not specify a value after --libbpf_dir, thus avoiding + to produce an erroneous configuration. + + Fixes: 7ae2585b865a ("configure: convert LIBBPF environment variables to command-line options") + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + configure | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index ea9051ab..0f304206 100755 +--- a/configure ++++ b/configure +@@ -486,7 +486,7 @@ usage() + cat < Path to iproute2 include dir +- --libbpf_dir Path to libbpf DESTDIR ++ --libbpf_dir Path to libbpf DESTDIR + --libbpf_force Enable/disable libbpf by force. Available options: + on: require link against libbpf, quit config if no libbpf support + off: disable libbpf probing +@@ -506,8 +506,9 @@ else + INCLUDE="$1" + [ "$#" -gt 0 ] && shift ;; + --libbpf_dir) +- LIBBPF_DIR="$2" +- shift 2 ;; ++ shift ++ LIBBPF_DIR="$1" ++ [ "$#" -gt 0 ] && shift ;; + --libbpf_force) + if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then + usage 1 +@@ -525,6 +526,9 @@ else + fi + + [ -d "$INCLUDE" ] || usage 1 ++if [ "${LIBBPF_DIR-unused}" != "unused" ]; then ++ [ -d "$LIBBPF_DIR" ] || usage 1 ++fi + + echo "# Generated config based on" $INCLUDE >$CONFIG + quiet_config >> $CONFIG +-- +2.31.1 + diff --git a/0004-configure-fix-parsing-issue-with-more-than-one-value.patch b/0004-configure-fix-parsing-issue-with-more-than-one-value.patch new file mode 100644 index 0000000..72d90a6 --- /dev/null +++ b/0004-configure-fix-parsing-issue-with-more-than-one-value.patch @@ -0,0 +1,63 @@ +From 4f9ade07eafe74db184eb09603e8187f3ca14423 Mon Sep 17 00:00:00 2001 +Message-Id: <4f9ade07eafe74db184eb09603e8187f3ca14423.1634733799.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: fix parsing issue with more than one value per + option + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit c330d097 + +commit c330d0979440a1dec4a436fd742bb6e28d195526 +Author: Andrea Claudi +Date: Thu Oct 14 10:50:51 2021 +0200 + + configure: fix parsing issue with more than one value per option + + With commit a9c3d70d902a ("configure: add options ability") users are no + more able to provide wrong command lines like: + + $ ./configure --include_dir foo bar + + The script simply bails out when user provides more than one value for a + single option. However, in doing so, it breaks backward compatibility with + some packaging system, which expects unknown options to be ignored. + + Commit a3272b93725a ("configure: restore backward compatibility") fix this + issue, but makes it possible again for users to provide wrong command lines + such as the one above. + + This fixes the issue simply ignoring autoconf-like options such as + '--opt=value'. + + Fixes: a3272b93725a ("configure: restore backward compatibility") + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + configure | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 0f304206..9ec19a5b 100755 +--- a/configure ++++ b/configure +@@ -517,10 +517,12 @@ else + shift 2 ;; + -h | --help) + usage 0 ;; ++ --*) ++ shift ;; + "") + break ;; + *) +- shift 1 ;; ++ usage 1 ;; + esac + done + fi +-- +2.31.1 + diff --git a/0005-configure-simplify-options-parsing.patch b/0005-configure-simplify-options-parsing.patch new file mode 100644 index 0000000..b44439c --- /dev/null +++ b/0005-configure-simplify-options-parsing.patch @@ -0,0 +1,114 @@ +From e563a97894c173dcfe2ccdb061c9bfe16526678b Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: simplify options parsing + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit 99245d17 + +commit 99245d1741a85e4397973782578d4a78673eb348 +Author: Andrea Claudi +Date: Thu Oct 14 10:50:52 2021 +0200 + + configure: simplify options parsing + + This commit simplifies options parsing moving all the code not related to + parsing out of the case statement. + + - The conditional shift after the assignments is moved right after the + case, reducing code duplication. + - The semantic checks on the LIBBPF_FORCE value is moved after the loop + like we already did for INCLUDE and LIBBPF_DIR. + - Finally, the loop condition is changed to check remaining arguments, thus + making it possible to get rid of the null string case break. + + As a bonus, now the help message states that on or off should follow + --libbpf_force + + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + configure | 37 ++++++++++++++++++------------------- + 1 file changed, 18 insertions(+), 19 deletions(-) + +diff --git a/configure b/configure +index 9ec19a5b..26e06eb8 100755 +--- a/configure ++++ b/configure +@@ -485,12 +485,12 @@ usage() + { + cat < Path to iproute2 include dir +- --libbpf_dir Path to libbpf DESTDIR +- --libbpf_force Enable/disable libbpf by force. Available options: +- on: require link against libbpf, quit config if no libbpf support +- off: disable libbpf probing +- -h | --help Show this usage info ++ --include_dir Path to iproute2 include dir ++ --libbpf_dir Path to libbpf DESTDIR ++ --libbpf_force Enable/disable libbpf by force. Available options: ++ on: require link against libbpf, quit config if no libbpf support ++ off: disable libbpf probing ++ -h | --help Show this usage info + EOF + exit $1 + } +@@ -499,31 +499,25 @@ EOF + if [ $# -eq 1 ] && [ "$(echo $1 | cut -c 1)" != '-' ]; then + INCLUDE="$1" + else +- while true; do ++ while [ "$#" -gt 0 ]; do + case "$1" in + --include_dir) + shift +- INCLUDE="$1" +- [ "$#" -gt 0 ] && shift ;; ++ INCLUDE="$1" ;; + --libbpf_dir) + shift +- LIBBPF_DIR="$1" +- [ "$#" -gt 0 ] && shift ;; ++ LIBBPF_DIR="$1" ;; + --libbpf_force) +- if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then +- usage 1 +- fi +- LIBBPF_FORCE=$2 +- shift 2 ;; ++ shift ++ LIBBPF_FORCE="$1" ;; + -h | --help) + usage 0 ;; + --*) +- shift ;; +- "") +- break ;; ++ ;; + *) + usage 1 ;; + esac ++ [ "$#" -gt 0 ] && shift + done + fi + +@@ -531,6 +525,11 @@ fi + if [ "${LIBBPF_DIR-unused}" != "unused" ]; then + [ -d "$LIBBPF_DIR" ] || usage 1 + fi ++if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then ++ if [ "$LIBBPF_FORCE" != 'on' ] && [ "$LIBBPF_FORCE" != 'off' ]; then ++ usage 1 ++ fi ++fi + + echo "# Generated config based on" $INCLUDE >$CONFIG + quiet_config >> $CONFIG +-- +2.31.1 + diff --git a/0006-configure-support-param-value-style.patch b/0006-configure-support-param-value-style.patch new file mode 100644 index 0000000..0596c47 --- /dev/null +++ b/0006-configure-support-param-value-style.patch @@ -0,0 +1,53 @@ +From 6de1c71cf82d67784a185ba912bdbfa24fa6bce5 Mon Sep 17 00:00:00 2001 +Message-Id: <6de1c71cf82d67784a185ba912bdbfa24fa6bce5.1634733799.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: support --param=value style + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit 4b8bca5f + +commit 4b8bca5f9e3e6f210b1036166dc98801e76d8ee5 +Author: Andrea Claudi +Date: Thu Oct 14 10:50:53 2021 +0200 + + configure: support --param=value style + + This commit makes it possible to specify values for configure params + using the common autotools configure syntax '--param=value'. + + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + configure | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure b/configure +index 26e06eb8..9a2645d9 100755 +--- a/configure ++++ b/configure +@@ -504,12 +504,18 @@ else + --include_dir) + shift + INCLUDE="$1" ;; ++ --include_dir=*) ++ INCLUDE="${1#*=}" ;; + --libbpf_dir) + shift + LIBBPF_DIR="$1" ;; ++ --libbpf_dir=*) ++ LIBBPF_DIR="${1#*=}" ;; + --libbpf_force) + shift + LIBBPF_FORCE="$1" ;; ++ --libbpf_force=*) ++ LIBBPF_FORCE="${1#*=}" ;; + -h | --help) + usage 0 ;; + --*) +-- +2.31.1 + diff --git a/0007-configure-add-the-prefix-option.patch b/0007-configure-add-the-prefix-option.patch new file mode 100644 index 0000000..be26253 --- /dev/null +++ b/0007-configure-add-the-prefix-option.patch @@ -0,0 +1,72 @@ +From aad7307a1ca9f2c8df26e1ed5e8a8b9816f87792 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: add the --prefix option + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit 0ee1950b + +commit 0ee1950b5c38986ea896606810231f5f9d761a00 +Author: Andrea Claudi +Date: Thu Oct 14 10:50:54 2021 +0200 + + configure: add the --prefix option + + This commit add the '--prefix' option to the iproute2 configure script. + + This mimics the '--prefix' option that autotools configure provides, and + will be used later to allow users or packagers to set the lib directory. + + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + configure | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/configure b/configure +index 9a2645d9..05e23eff 100755 +--- a/configure ++++ b/configure +@@ -3,6 +3,7 @@ + # This is not an autoconf generated configure + + INCLUDE="$PWD/include" ++PREFIX="/usr" + + # Output file which is input to Makefile + CONFIG=config.mk +@@ -490,6 +491,7 @@ Usage: $0 [OPTIONS] + --libbpf_force Enable/disable libbpf by force. Available options: + on: require link against libbpf, quit config if no libbpf support + off: disable libbpf probing ++ --prefix Path prefix of the lib files to install + -h | --help Show this usage info + EOF + exit $1 +@@ -516,6 +518,11 @@ else + LIBBPF_FORCE="$1" ;; + --libbpf_force=*) + LIBBPF_FORCE="${1#*=}" ;; ++ --prefix) ++ shift ++ PREFIX="$1" ;; ++ --prefix=*) ++ PREFIX="${1#*=}" ;; + -h | --help) + usage 0 ;; + --*) +@@ -536,6 +543,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then + usage 1 + fi + fi ++[ -z "$PREFIX" ] && usage 1 + + echo "# Generated config based on" $INCLUDE >$CONFIG + quiet_config >> $CONFIG +-- +2.31.1 + diff --git a/0008-configure-add-the-libdir-option.patch b/0008-configure-add-the-libdir-option.patch new file mode 100644 index 0000000..425b5cc --- /dev/null +++ b/0008-configure-add-the-libdir-option.patch @@ -0,0 +1,151 @@ +From d2e278fcff8a699a2dbac8d74758b4e5f86fd5f0 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Oct 2021 12:32:38 +0200 +Subject: [PATCH] configure: add the --libdir option + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 +Upstream Status: iproute2-next.git commit cee0cf84 + +commit cee0cf84bd32c8d9215f0c155187ad99d52a69b1 +Author: Andrea Claudi +Date: Thu Oct 14 10:50:55 2021 +0200 + + configure: add the --libdir option + + This commit allows users/packagers to choose a lib directory to store + iproute2 lib files. + + At the moment iproute2 ship lib files in /usr/lib and offers no way to + modify this setting. However, according to the FHS, distros may choose + "one or more variants of the /lib directory on systems which support + more than one binary format" (e.g. /usr/lib64 on Fedora). + + As Luca states in commit a3272b93725a ("configure: restore backward + compatibility"), packaging systems may assume that 'configure' is from + autotools, and try to pass it some parameters. + + Allowing the '--libdir=/path/to/libdir' syntax, we can use this to our + advantage, and let the lib directory to be chosen by the distro + packaging system. + + Note that LIBDIR uses "\${prefix}/lib" as default value because autoconf + allows this to be expanded to the --prefix value at configure runtime. + "\${prefix}" is replaced with the PREFIX value in check_lib_dir(). + + Signed-off-by: Andrea Claudi + Acked-by: Phil Sutter + Signed-off-by: David Ahern +--- + Makefile | 7 ++++--- + configure | 18 ++++++++++++++++++ + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 5bc11477..45655ca4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,8 @@ + # SPDX-License-Identifier: GPL-2.0 + # Top level Makefile for iproute2 + ++-include config.mk ++ + ifeq ("$(origin V)", "command line") + VERBOSE = $(V) + endif +@@ -13,7 +15,6 @@ MAKEFLAGS += --no-print-directory + endif + + PREFIX?=/usr +-LIBDIR?=$(PREFIX)/lib + SBINDIR?=/sbin + CONFDIR?=/etc/iproute2 + NETNS_RUN_DIR?=/var/run/netns +@@ -60,7 +61,7 @@ SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa + LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a + LDLIBS += $(LIBNETLINK) + +-all: config ++all: config.mk + @set -e; \ + for i in $(SUBDIRS); \ + do echo; echo $$i; $(MAKE) -C $$i; done +@@ -80,7 +81,7 @@ help: + @echo "Make Arguments:" + @echo " V=[0|1] - set build verbosity level" + +-config: ++config.mk: + @if [ ! -f config.mk -o configure -nt config.mk ]; then \ + sh configure $(KERNEL_INCLUDE); \ + fi +diff --git a/configure b/configure +index 05e23eff..8ddff43c 100755 +--- a/configure ++++ b/configure +@@ -4,6 +4,7 @@ + + INCLUDE="$PWD/include" + PREFIX="/usr" ++LIBDIR="\${prefix}/lib" + + # Output file which is input to Makefile + CONFIG=config.mk +@@ -149,6 +150,15 @@ EOF + rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest + } + ++check_lib_dir() ++{ ++ LIBDIR=$(echo $LIBDIR | sed "s|\${prefix}|$PREFIX|") ++ ++ echo -n "lib directory: " ++ echo "$LIBDIR" ++ echo "LIBDIR:=$LIBDIR" >> $CONFIG ++} ++ + check_ipt() + { + if ! grep TC_CONFIG_XT $CONFIG > /dev/null; then +@@ -487,6 +497,7 @@ usage() + cat < Path to iproute2 include dir ++ --libdir Path to iproute2 lib dir + --libbpf_dir Path to libbpf DESTDIR + --libbpf_force Enable/disable libbpf by force. Available options: + on: require link against libbpf, quit config if no libbpf support +@@ -508,6 +519,11 @@ else + INCLUDE="$1" ;; + --include_dir=*) + INCLUDE="${1#*=}" ;; ++ --libdir) ++ shift ++ LIBDIR="$1" ;; ++ --libdir=*) ++ LIBDIR="${1#*=}" ;; + --libbpf_dir) + shift + LIBBPF_DIR="$1" ;; +@@ -544,6 +560,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then + fi + fi + [ -z "$PREFIX" ] && usage 1 ++[ -z "$LIBDIR" ] && usage 1 + + echo "# Generated config based on" $INCLUDE >$CONFIG + quiet_config >> $CONFIG +@@ -568,6 +585,7 @@ if ! grep -q TC_CONFIG_NO_XT $CONFIG; then + fi + + echo ++check_lib_dir + if ! grep -q TC_CONFIG_NO_XT $CONFIG; then + echo -n "iptables modules directory: " + check_ipt_lib_dir +-- +2.31.1 + diff --git a/iproute.spec b/iproute.spec index d5135d6..8e6cc6f 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,33 +1,46 @@ -%global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.13.0 -Release: 2%{?dist} +Version: 5.14.0 +Release: 1%{?dist}%{?buildid} +%if 0%{?rhel} +Group: Applications/System +%endif URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +%if ! 0%{?fedora} +Source1: iproute2.sh +Source2: rt_dsfield.deprecated +%endif +Patch0: 0001-configure-restore-backward-compatibility.patch +Patch1: 0002-configure-fix-parsing-issue-on-include_dir-option.patch +Patch2: 0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch +Patch3: 0004-configure-fix-parsing-issue-with-more-than-one-value.patch +Patch4: 0005-configure-simplify-options-parsing.patch +Patch5: 0006-configure-support-param-value-style.patch +Patch6: 0007-configure-add-the-prefix-option.patch +Patch7: 0008-configure-add-the-libdir-option.patch License: GPLv2+ and Public Domain -BuildRequires: gcc BuildRequires: bison BuildRequires: elfutils-libelf-devel BuildRequires: flex +BuildRequires: gcc BuildRequires: iptables-devel >= 1.4.5 +BuildRequires: libbpf-devel BuildRequires: libcap-devel BuildRequires: libdb-devel BuildRequires: libmnl-devel BuildRequires: libselinux-devel -BuildRequires: pkgconfig BuildRequires: make +BuildRequires: pkgconfig %if ! 0%{?_module_build} %if 0%{?fedora} BuildRequires: linux-atm-libs-devel %endif %endif -Provides: /sbin/ip -Provides: iproute-doc = %{version}-%{release} -Recommends: %{name}-tc +Requires: libbpf Requires: psmisc -Obsoletes: iproute-doc < %{version}-%{release} +Provides: /sbin/ip %description The iproute package contains networking utilities (ip and rtmon, for example) @@ -36,6 +49,9 @@ kernel. %package tc Summary: Linux Traffic Control utility +%if 0%{?rhel} +Group: Applications/System +%endif License: GPLv2+ Requires: %{name}%{?_isa} = %{version}-%{release} Provides: /sbin/tc @@ -45,9 +61,26 @@ The Traffic Control utility manages queueing disciplines, their classes and attached filters and actions. It is the standard tool to configure QoS in Linux. +%if ! 0%{?_module_build} +%package doc +Summary: Documentation for iproute2 utilities with examples +%if 0%{?rhel} +Group: Applications/System +%endif +License: GPLv2+ +Requires: %{name} = %{version}-%{release} + +%description doc +The iproute documentation contains howtos and examples of settings. +%endif + %package devel Summary: iproute development files +%if 0%{?rhel} +Group: Development/Libraries +%endif License: GPLv2+ +Requires: %{name} = %{version}-%{release} Provides: iproute-static = %{version}-%{release} %description devel @@ -65,18 +98,32 @@ export SBINDIR='%{_sbindir}' export LIBDIR='%{_libdir}' %make_install +echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8 + # libnetlink install -D -m644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a +# drop these files, iproute-doc package extracts files directly from _builddir +rm -rf '%{buildroot}%{_docdir}' + +# RHEL-specific stuff +%if ! 0%{?fedora} +# use TC_LIB_DIR environment variable +install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/iproute2.sh +# append deprecated values to rt_dsfield for compatibility reasons +cat %{SOURCE2} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield +%endif + %files %dir %{_sysconfdir}/iproute2 %license COPYING -%doc README +%doc README README.devel %{_mandir}/man7/* %exclude %{_mandir}/man7/tc-* %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* +%exclude %{_mandir}/man8/cbq* %attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc @@ -84,13 +131,23 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %files tc %license COPYING +%if ! 0%{?fedora} +%{_sysconfdir}/profile.d/iproute2.sh +%endif %{_mandir}/man7/tc-* %{_mandir}/man8/tc* +%{_mandir}/man8/cbq* %dir %{_libdir}/tc/ %{_libdir}/tc/* %{_sbindir}/tc %{_datadir}/bash-completion/completions/tc +%if ! 0%{?_module_build} +%files doc +%license COPYING +%doc examples +%endif + %files devel %license COPYING %{_mandir}/man3/* @@ -99,17 +156,25 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog -* Thu Jul 22 2021 Fedora Release Engineering - 5.13.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild +* Wed Oct 20 2021 Andrea Claudi - 5.14.0-1 +- New version 5.14.0 [1999860] -* Wed Jun 30 2021 Andrea Claudi - 5.13.0-1 -- Update to 5.13.0 (#1977463) +* Mon Aug 09 2021 Mohan Boddu - 5.13.0-4.el9 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 -* Tue Apr 27 2021 Andrea Claudi - 5.12.0-1 -- Update to 5.12.0 (#1954257) +* Fri Jul 16 2021 Andrea Claudi - 5.13.0-3.el9 +- Fix changelog (Andrea Claudi) [1947854] +- Add RHEL gating configuration (Aleksandra Fedorova) -* Fri Feb 26 2021 Andrea Claudi - 5.11.0-1 -- New version 5.11.0 (#1931731) +* Thu Jul 15 2021 Andrea Claudi - 5.13.0-2.el9 +- Remove Recommends: iproute-tc from spec file (Andrea Claudi) [1947854] + +* Wed Jun 30 2021 Andrea Claudi - 5.13.0-1.el9 +- New version 5.13.0 (#1977898) + +* Fri Apr 16 2021 Mohan Boddu - 5.10.0-3.el9 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 * Tue Jan 26 2021 Fedora Release Engineering - 5.10.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 8513c83..c893066 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5 SHA512 (iproute2-5.11.0.tar.xz) = 8d0e7efc20db70af2d344962610b7fb7f464da567f63e094a2e2a9915f6e9087a2282163d2c73eb2065aaec4f0b0cf19614253798153b31e34b06f57e704f3ed SHA512 (iproute2-5.12.0.tar.xz) = 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d +SHA512 (iproute2-5.14.0.tar.xz) = e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c From dfbb7f212cfb31d78f9c67d389fd659e2a7723ad Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Thu, 4 Nov 2021 18:52:27 +0100 Subject: [PATCH 079/111] iproute-5.15.0-1 * Thu Nov 04 2021 Andrea Claudi - 5.15.0-1 - New version 5.15.0 [2019267] Resolves: rhbz#2019267 Signed-off-by: Andrea Claudi --- .gitignore | 1 + ...-parsing-issue-on-include_dir-option.patch | 6 +-- ...igure-restore-backward-compatibility.patch | 50 ------------------- ...x-parsing-issue-on-libbpf_dir-option.patch | 6 +-- ...rsing-issue-with-more-than-one-value.patch | 6 +-- ...4-configure-simplify-options-parsing.patch | 6 +-- ...-configure-support-param-value-style.patch | 6 +-- ...0006-configure-add-the-prefix-option.patch | 6 +-- ...0007-configure-add-the-libdir-option.patch | 6 +-- iproute.spec | 33 ++++++------ sources | 1 + 11 files changed, 37 insertions(+), 90 deletions(-) rename 0002-configure-fix-parsing-issue-on-include_dir-option.patch => 0001-configure-fix-parsing-issue-on-include_dir-option.patch (91%) delete mode 100644 0001-configure-restore-backward-compatibility.patch rename 0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch => 0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch (92%) rename 0004-configure-fix-parsing-issue-with-more-than-one-value.patch => 0003-configure-fix-parsing-issue-with-more-than-one-value.patch (89%) rename 0005-configure-simplify-options-parsing.patch => 0004-configure-simplify-options-parsing.patch (93%) rename 0006-configure-support-param-value-style.patch => 0005-configure-support-param-value-style.patch (86%) rename 0007-configure-add-the-prefix-option.patch => 0006-configure-add-the-prefix-option.patch (90%) rename 0008-configure-add-the-libdir-option.patch => 0007-configure-add-the-libdir-option.patch (95%) diff --git a/.gitignore b/.gitignore index 2f6d853..03cfd44 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /iproute2-5.12.0.tar.xz /iproute2-5.13.0.tar.xz /iproute2-5.14.0.tar.xz +/iproute2-5.15.0.tar.xz diff --git a/0002-configure-fix-parsing-issue-on-include_dir-option.patch b/0001-configure-fix-parsing-issue-on-include_dir-option.patch similarity index 91% rename from 0002-configure-fix-parsing-issue-on-include_dir-option.patch rename to 0001-configure-fix-parsing-issue-on-include_dir-option.patch index c061c51..231fffe 100644 --- a/0002-configure-fix-parsing-issue-on-include_dir-option.patch +++ b/0001-configure-fix-parsing-issue-on-include_dir-option.patch @@ -1,7 +1,7 @@ From 290ce87f0a59ec4ddc83918c073364540057ae64 Mon Sep 17 00:00:00 2001 -Message-Id: <290ce87f0a59ec4ddc83918c073364540057ae64.1634733799.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: <290ce87f0a59ec4ddc83918c073364540057ae64.1636047125.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: fix parsing issue on include_dir option diff --git a/0001-configure-restore-backward-compatibility.patch b/0001-configure-restore-backward-compatibility.patch deleted file mode 100644 index ad8178d..0000000 --- a/0001-configure-restore-backward-compatibility.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 5e6e93a55d2335b90aacb0107e962610cce64007 Mon Sep 17 00:00:00 2001 -Message-Id: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: restore backward compatibility - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2.git commit a3272b93 - -commit a3272b93725a406bc98b67373da67a4bdf6fcdb0 -Author: Luca Boccassi -Date: Thu Sep 2 12:38:54 2021 +0100 - - configure: restore backward compatibility - - Commit a9c3d70d902a0473ee5c13336317006a52ce8242 broke backward compatibility - by making 'configure' error out if parameters are passed, instead of - ignoring them. - Sometimes packaging systems detect 'configure' and assume it's from - autotools, and pass a bunch of options. Eg: - - dh_auto_configure - ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking - - Ignore unknown options again instead of erroring out. - - Fixes: a9c3d70d902a ("configure: add options ability") - - Signed-off-by: Luca Boccassi - Signed-off-by: Stephen Hemminger ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index 0a4a0fc9..7f4f3bd9 100755 ---- a/configure -+++ b/configure -@@ -518,7 +518,7 @@ else - "") - break ;; - *) -- usage 1 ;; -+ shift 1 ;; - esac - done - fi --- -2.31.1 - diff --git a/0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch b/0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch similarity index 92% rename from 0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch rename to 0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch index 5a8c17d..007e9bb 100644 --- a/0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch +++ b/0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch @@ -1,7 +1,7 @@ From 5f717b9a1bb8c49e101670682d73bc5ae9ee701a Mon Sep 17 00:00:00 2001 -Message-Id: <5f717b9a1bb8c49e101670682d73bc5ae9ee701a.1634733799.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: <5f717b9a1bb8c49e101670682d73bc5ae9ee701a.1636047125.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: fix parsing issue on libbpf_dir option diff --git a/0004-configure-fix-parsing-issue-with-more-than-one-value.patch b/0003-configure-fix-parsing-issue-with-more-than-one-value.patch similarity index 89% rename from 0004-configure-fix-parsing-issue-with-more-than-one-value.patch rename to 0003-configure-fix-parsing-issue-with-more-than-one-value.patch index 72d90a6..2f4d55a 100644 --- a/0004-configure-fix-parsing-issue-with-more-than-one-value.patch +++ b/0003-configure-fix-parsing-issue-with-more-than-one-value.patch @@ -1,7 +1,7 @@ From 4f9ade07eafe74db184eb09603e8187f3ca14423 Mon Sep 17 00:00:00 2001 -Message-Id: <4f9ade07eafe74db184eb09603e8187f3ca14423.1634733799.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: <4f9ade07eafe74db184eb09603e8187f3ca14423.1636047125.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: fix parsing issue with more than one value per diff --git a/0005-configure-simplify-options-parsing.patch b/0004-configure-simplify-options-parsing.patch similarity index 93% rename from 0005-configure-simplify-options-parsing.patch rename to 0004-configure-simplify-options-parsing.patch index b44439c..e27ddab 100644 --- a/0005-configure-simplify-options-parsing.patch +++ b/0004-configure-simplify-options-parsing.patch @@ -1,7 +1,7 @@ From e563a97894c173dcfe2ccdb061c9bfe16526678b Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: simplify options parsing diff --git a/0006-configure-support-param-value-style.patch b/0005-configure-support-param-value-style.patch similarity index 86% rename from 0006-configure-support-param-value-style.patch rename to 0005-configure-support-param-value-style.patch index 0596c47..d012369 100644 --- a/0006-configure-support-param-value-style.patch +++ b/0005-configure-support-param-value-style.patch @@ -1,7 +1,7 @@ From 6de1c71cf82d67784a185ba912bdbfa24fa6bce5 Mon Sep 17 00:00:00 2001 -Message-Id: <6de1c71cf82d67784a185ba912bdbfa24fa6bce5.1634733799.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: <6de1c71cf82d67784a185ba912bdbfa24fa6bce5.1636047125.git.aclaudi@redhat.com> +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: support --param=value style diff --git a/0007-configure-add-the-prefix-option.patch b/0006-configure-add-the-prefix-option.patch similarity index 90% rename from 0007-configure-add-the-prefix-option.patch rename to 0006-configure-add-the-prefix-option.patch index be26253..0725dfb 100644 --- a/0007-configure-add-the-prefix-option.patch +++ b/0006-configure-add-the-prefix-option.patch @@ -1,7 +1,7 @@ From aad7307a1ca9f2c8df26e1ed5e8a8b9816f87792 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: add the --prefix option diff --git a/0008-configure-add-the-libdir-option.patch b/0007-configure-add-the-libdir-option.patch similarity index 95% rename from 0008-configure-add-the-libdir-option.patch rename to 0007-configure-add-the-libdir-option.patch index 425b5cc..6c7beac 100644 --- a/0008-configure-add-the-libdir-option.patch +++ b/0007-configure-add-the-libdir-option.patch @@ -1,7 +1,7 @@ From d2e278fcff8a699a2dbac8d74758b4e5f86fd5f0 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1634733799.git.aclaudi@redhat.com> +Message-Id: +In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> +References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> From: Andrea Claudi Date: Wed, 20 Oct 2021 12:32:38 +0200 Subject: [PATCH] configure: add the --libdir option diff --git a/iproute.spec b/iproute.spec index 8e6cc6f..6114a8a 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,6 +1,6 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.14.0 +Version: 5.15.0 Release: 1%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System @@ -8,17 +8,15 @@ Group: Applications/System URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz %if ! 0%{?fedora} -Source1: iproute2.sh -Source2: rt_dsfield.deprecated +Source1: rt_dsfield.deprecated %endif -Patch0: 0001-configure-restore-backward-compatibility.patch -Patch1: 0002-configure-fix-parsing-issue-on-include_dir-option.patch -Patch2: 0003-configure-fix-parsing-issue-on-libbpf_dir-option.patch -Patch3: 0004-configure-fix-parsing-issue-with-more-than-one-value.patch -Patch4: 0005-configure-simplify-options-parsing.patch -Patch5: 0006-configure-support-param-value-style.patch -Patch6: 0007-configure-add-the-prefix-option.patch -Patch7: 0008-configure-add-the-libdir-option.patch +Patch0: 0001-configure-fix-parsing-issue-on-include_dir-option.patch +Patch1: 0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch +Patch2: 0003-configure-fix-parsing-issue-with-more-than-one-value.patch +Patch3: 0004-configure-simplify-options-parsing.patch +Patch4: 0005-configure-support-param-value-style.patch +Patch5: 0006-configure-add-the-prefix-option.patch +Patch6: 0007-configure-add-the-libdir-option.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -107,12 +105,9 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a # drop these files, iproute-doc package extracts files directly from _builddir rm -rf '%{buildroot}%{_docdir}' -# RHEL-specific stuff -%if ! 0%{?fedora} -# use TC_LIB_DIR environment variable -install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/iproute2.sh # append deprecated values to rt_dsfield for compatibility reasons -cat %{SOURCE2} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield +%if ! 0%{?fedora} +cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %endif %files @@ -131,9 +126,6 @@ cat %{SOURCE2} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %files tc %license COPYING -%if ! 0%{?fedora} -%{_sysconfdir}/profile.d/iproute2.sh -%endif %{_mandir}/man7/tc-* %{_mandir}/man8/tc* %{_mandir}/man8/cbq* @@ -156,6 +148,9 @@ cat %{SOURCE2} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Nov 04 2021 Andrea Claudi - 5.15.0-1 +- New version 5.15.0 [2019267] + * Wed Oct 20 2021 Andrea Claudi - 5.14.0-1 - New version 5.14.0 [1999860] diff --git a/sources b/sources index c893066..d426c9e 100644 --- a/sources +++ b/sources @@ -3,3 +3,4 @@ SHA512 (iproute2-5.11.0.tar.xz) = 8d0e7efc20db70af2d344962610b7fb7f464da567f63e0 SHA512 (iproute2-5.12.0.tar.xz) = 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d SHA512 (iproute2-5.14.0.tar.xz) = e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c +SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 From bc9be1bd5b5a343d15944fb84f46a4a762c5f892 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 13:24:55 +0000 Subject: [PATCH 080/111] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 6114a8a..a5cb087 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.15.0 -Release: 1%{?dist}%{?buildid} +Release: 2%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -148,6 +148,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 5.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Nov 04 2021 Andrea Claudi - 5.15.0-1 - New version 5.15.0 [2019267] From 93abbcde57b64d67bd5d998a8a423d0093d1383c Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 23 Mar 2022 15:21:14 +0100 Subject: [PATCH 081/111] iproute-5.17.0-1 * Wed Mar 23 2022 Andrea Claudi - 5.17.0-1 - New version 5.17.0 [2039103] Resolves: rhbz#2039103 Signed-off-by: Andrea Claudi --- .gitignore | 1 + ...-parsing-issue-on-include_dir-option.patch | 76 --------- ...x-parsing-issue-on-libbpf_dir-option.patch | 79 --------- ...rsing-issue-with-more-than-one-value.patch | 63 -------- 0004-configure-simplify-options-parsing.patch | 114 ------------- ...-configure-support-param-value-style.patch | 53 ------ 0006-configure-add-the-prefix-option.patch | 72 --------- 0007-configure-add-the-libdir-option.patch | 151 ------------------ iproute.spec | 14 +- sources | 1 + 10 files changed, 7 insertions(+), 617 deletions(-) delete mode 100644 0001-configure-fix-parsing-issue-on-include_dir-option.patch delete mode 100644 0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch delete mode 100644 0003-configure-fix-parsing-issue-with-more-than-one-value.patch delete mode 100644 0004-configure-simplify-options-parsing.patch delete mode 100644 0005-configure-support-param-value-style.patch delete mode 100644 0006-configure-add-the-prefix-option.patch delete mode 100644 0007-configure-add-the-libdir-option.patch diff --git a/.gitignore b/.gitignore index 03cfd44..44c7c55 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /iproute2-5.13.0.tar.xz /iproute2-5.14.0.tar.xz /iproute2-5.15.0.tar.xz +/iproute2-5.17.0.tar.xz diff --git a/0001-configure-fix-parsing-issue-on-include_dir-option.patch b/0001-configure-fix-parsing-issue-on-include_dir-option.patch deleted file mode 100644 index 231fffe..0000000 --- a/0001-configure-fix-parsing-issue-on-include_dir-option.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 290ce87f0a59ec4ddc83918c073364540057ae64 Mon Sep 17 00:00:00 2001 -Message-Id: <290ce87f0a59ec4ddc83918c073364540057ae64.1636047125.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: fix parsing issue on include_dir option - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit 1d819dcc - -commit 1d819dcc741e25958190e31f8186c940713fa0a8 -Author: Andrea Claudi -Date: Thu Oct 14 10:50:49 2021 +0200 - - configure: fix parsing issue on include_dir option - - configure is stuck in an endless loop if '--include_dir' option is used - without a value: - - $ ./configure --include_dir - ./configure: line 506: shift: 2: shift count out of range - ./configure: line 506: shift: 2: shift count out of range - [...] - - Fix it splitting 'shift 2' into two consecutive shifts, and making the - second one conditional to the number of remaining arguments. - - A check is also provided after the while loop to verify the include dir - exists; this avoid to produce an erroneous configuration. - - Fixes: a9c3d70d902a ("configure: add options ability") - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - configure | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/configure b/configure -index 7f4f3bd9..ea9051ab 100755 ---- a/configure -+++ b/configure -@@ -485,7 +485,7 @@ usage() - { - cat < Path to iproute2 include dir - --libbpf_dir Path to libbpf DESTDIR - --libbpf_force Enable/disable libbpf by force. Available options: - on: require link against libbpf, quit config if no libbpf support -@@ -502,8 +502,9 @@ else - while true; do - case "$1" in - --include_dir) -- INCLUDE=$2 -- shift 2 ;; -+ shift -+ INCLUDE="$1" -+ [ "$#" -gt 0 ] && shift ;; - --libbpf_dir) - LIBBPF_DIR="$2" - shift 2 ;; -@@ -523,6 +524,8 @@ else - done - fi - -+[ -d "$INCLUDE" ] || usage 1 -+ - echo "# Generated config based on" $INCLUDE >$CONFIG - quiet_config >> $CONFIG - --- -2.31.1 - diff --git a/0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch b/0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch deleted file mode 100644 index 007e9bb..0000000 --- a/0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5f717b9a1bb8c49e101670682d73bc5ae9ee701a Mon Sep 17 00:00:00 2001 -Message-Id: <5f717b9a1bb8c49e101670682d73bc5ae9ee701a.1636047125.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: fix parsing issue on libbpf_dir option - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit 48c379bc - -commit 48c379bc2afd43b3246f68ed46475f5318b1218f -Author: Andrea Claudi -Date: Thu Oct 14 10:50:50 2021 +0200 - - configure: fix parsing issue on libbpf_dir option - - configure is stuck in an endless loop if '--libbpf_dir' option is used - without a value: - - $ ./configure --libbpf_dir - ./configure: line 515: shift: 2: shift count out of range - ./configure: line 515: shift: 2: shift count out of range - [...] - - Fix it splitting 'shift 2' into two consecutive shifts, and making the - second one conditional to the number of remaining arguments. - - A check is also provided after the while loop to verify the libbpf dir - exists; also, as LIBBPF_DIR does not have a default value, configure bails - out if the user does not specify a value after --libbpf_dir, thus avoiding - to produce an erroneous configuration. - - Fixes: 7ae2585b865a ("configure: convert LIBBPF environment variables to command-line options") - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - configure | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/configure b/configure -index ea9051ab..0f304206 100755 ---- a/configure -+++ b/configure -@@ -486,7 +486,7 @@ usage() - cat < Path to iproute2 include dir -- --libbpf_dir Path to libbpf DESTDIR -+ --libbpf_dir Path to libbpf DESTDIR - --libbpf_force Enable/disable libbpf by force. Available options: - on: require link against libbpf, quit config if no libbpf support - off: disable libbpf probing -@@ -506,8 +506,9 @@ else - INCLUDE="$1" - [ "$#" -gt 0 ] && shift ;; - --libbpf_dir) -- LIBBPF_DIR="$2" -- shift 2 ;; -+ shift -+ LIBBPF_DIR="$1" -+ [ "$#" -gt 0 ] && shift ;; - --libbpf_force) - if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then - usage 1 -@@ -525,6 +526,9 @@ else - fi - - [ -d "$INCLUDE" ] || usage 1 -+if [ "${LIBBPF_DIR-unused}" != "unused" ]; then -+ [ -d "$LIBBPF_DIR" ] || usage 1 -+fi - - echo "# Generated config based on" $INCLUDE >$CONFIG - quiet_config >> $CONFIG --- -2.31.1 - diff --git a/0003-configure-fix-parsing-issue-with-more-than-one-value.patch b/0003-configure-fix-parsing-issue-with-more-than-one-value.patch deleted file mode 100644 index 2f4d55a..0000000 --- a/0003-configure-fix-parsing-issue-with-more-than-one-value.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 4f9ade07eafe74db184eb09603e8187f3ca14423 Mon Sep 17 00:00:00 2001 -Message-Id: <4f9ade07eafe74db184eb09603e8187f3ca14423.1636047125.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: fix parsing issue with more than one value per - option - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit c330d097 - -commit c330d0979440a1dec4a436fd742bb6e28d195526 -Author: Andrea Claudi -Date: Thu Oct 14 10:50:51 2021 +0200 - - configure: fix parsing issue with more than one value per option - - With commit a9c3d70d902a ("configure: add options ability") users are no - more able to provide wrong command lines like: - - $ ./configure --include_dir foo bar - - The script simply bails out when user provides more than one value for a - single option. However, in doing so, it breaks backward compatibility with - some packaging system, which expects unknown options to be ignored. - - Commit a3272b93725a ("configure: restore backward compatibility") fix this - issue, but makes it possible again for users to provide wrong command lines - such as the one above. - - This fixes the issue simply ignoring autoconf-like options such as - '--opt=value'. - - Fixes: a3272b93725a ("configure: restore backward compatibility") - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - configure | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure b/configure -index 0f304206..9ec19a5b 100755 ---- a/configure -+++ b/configure -@@ -517,10 +517,12 @@ else - shift 2 ;; - -h | --help) - usage 0 ;; -+ --*) -+ shift ;; - "") - break ;; - *) -- shift 1 ;; -+ usage 1 ;; - esac - done - fi --- -2.31.1 - diff --git a/0004-configure-simplify-options-parsing.patch b/0004-configure-simplify-options-parsing.patch deleted file mode 100644 index e27ddab..0000000 --- a/0004-configure-simplify-options-parsing.patch +++ /dev/null @@ -1,114 +0,0 @@ -From e563a97894c173dcfe2ccdb061c9bfe16526678b Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: simplify options parsing - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit 99245d17 - -commit 99245d1741a85e4397973782578d4a78673eb348 -Author: Andrea Claudi -Date: Thu Oct 14 10:50:52 2021 +0200 - - configure: simplify options parsing - - This commit simplifies options parsing moving all the code not related to - parsing out of the case statement. - - - The conditional shift after the assignments is moved right after the - case, reducing code duplication. - - The semantic checks on the LIBBPF_FORCE value is moved after the loop - like we already did for INCLUDE and LIBBPF_DIR. - - Finally, the loop condition is changed to check remaining arguments, thus - making it possible to get rid of the null string case break. - - As a bonus, now the help message states that on or off should follow - --libbpf_force - - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - configure | 37 ++++++++++++++++++------------------- - 1 file changed, 18 insertions(+), 19 deletions(-) - -diff --git a/configure b/configure -index 9ec19a5b..26e06eb8 100755 ---- a/configure -+++ b/configure -@@ -485,12 +485,12 @@ usage() - { - cat < Path to iproute2 include dir -- --libbpf_dir Path to libbpf DESTDIR -- --libbpf_force Enable/disable libbpf by force. Available options: -- on: require link against libbpf, quit config if no libbpf support -- off: disable libbpf probing -- -h | --help Show this usage info -+ --include_dir Path to iproute2 include dir -+ --libbpf_dir Path to libbpf DESTDIR -+ --libbpf_force Enable/disable libbpf by force. Available options: -+ on: require link against libbpf, quit config if no libbpf support -+ off: disable libbpf probing -+ -h | --help Show this usage info - EOF - exit $1 - } -@@ -499,31 +499,25 @@ EOF - if [ $# -eq 1 ] && [ "$(echo $1 | cut -c 1)" != '-' ]; then - INCLUDE="$1" - else -- while true; do -+ while [ "$#" -gt 0 ]; do - case "$1" in - --include_dir) - shift -- INCLUDE="$1" -- [ "$#" -gt 0 ] && shift ;; -+ INCLUDE="$1" ;; - --libbpf_dir) - shift -- LIBBPF_DIR="$1" -- [ "$#" -gt 0 ] && shift ;; -+ LIBBPF_DIR="$1" ;; - --libbpf_force) -- if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then -- usage 1 -- fi -- LIBBPF_FORCE=$2 -- shift 2 ;; -+ shift -+ LIBBPF_FORCE="$1" ;; - -h | --help) - usage 0 ;; - --*) -- shift ;; -- "") -- break ;; -+ ;; - *) - usage 1 ;; - esac -+ [ "$#" -gt 0 ] && shift - done - fi - -@@ -531,6 +525,11 @@ fi - if [ "${LIBBPF_DIR-unused}" != "unused" ]; then - [ -d "$LIBBPF_DIR" ] || usage 1 - fi -+if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then -+ if [ "$LIBBPF_FORCE" != 'on' ] && [ "$LIBBPF_FORCE" != 'off' ]; then -+ usage 1 -+ fi -+fi - - echo "# Generated config based on" $INCLUDE >$CONFIG - quiet_config >> $CONFIG --- -2.31.1 - diff --git a/0005-configure-support-param-value-style.patch b/0005-configure-support-param-value-style.patch deleted file mode 100644 index d012369..0000000 --- a/0005-configure-support-param-value-style.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 6de1c71cf82d67784a185ba912bdbfa24fa6bce5 Mon Sep 17 00:00:00 2001 -Message-Id: <6de1c71cf82d67784a185ba912bdbfa24fa6bce5.1636047125.git.aclaudi@redhat.com> -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: support --param=value style - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit 4b8bca5f - -commit 4b8bca5f9e3e6f210b1036166dc98801e76d8ee5 -Author: Andrea Claudi -Date: Thu Oct 14 10:50:53 2021 +0200 - - configure: support --param=value style - - This commit makes it possible to specify values for configure params - using the common autotools configure syntax '--param=value'. - - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - configure | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/configure b/configure -index 26e06eb8..9a2645d9 100755 ---- a/configure -+++ b/configure -@@ -504,12 +504,18 @@ else - --include_dir) - shift - INCLUDE="$1" ;; -+ --include_dir=*) -+ INCLUDE="${1#*=}" ;; - --libbpf_dir) - shift - LIBBPF_DIR="$1" ;; -+ --libbpf_dir=*) -+ LIBBPF_DIR="${1#*=}" ;; - --libbpf_force) - shift - LIBBPF_FORCE="$1" ;; -+ --libbpf_force=*) -+ LIBBPF_FORCE="${1#*=}" ;; - -h | --help) - usage 0 ;; - --*) --- -2.31.1 - diff --git a/0006-configure-add-the-prefix-option.patch b/0006-configure-add-the-prefix-option.patch deleted file mode 100644 index 0725dfb..0000000 --- a/0006-configure-add-the-prefix-option.patch +++ /dev/null @@ -1,72 +0,0 @@ -From aad7307a1ca9f2c8df26e1ed5e8a8b9816f87792 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: add the --prefix option - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit 0ee1950b - -commit 0ee1950b5c38986ea896606810231f5f9d761a00 -Author: Andrea Claudi -Date: Thu Oct 14 10:50:54 2021 +0200 - - configure: add the --prefix option - - This commit add the '--prefix' option to the iproute2 configure script. - - This mimics the '--prefix' option that autotools configure provides, and - will be used later to allow users or packagers to set the lib directory. - - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - configure | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/configure b/configure -index 9a2645d9..05e23eff 100755 ---- a/configure -+++ b/configure -@@ -3,6 +3,7 @@ - # This is not an autoconf generated configure - - INCLUDE="$PWD/include" -+PREFIX="/usr" - - # Output file which is input to Makefile - CONFIG=config.mk -@@ -490,6 +491,7 @@ Usage: $0 [OPTIONS] - --libbpf_force Enable/disable libbpf by force. Available options: - on: require link against libbpf, quit config if no libbpf support - off: disable libbpf probing -+ --prefix Path prefix of the lib files to install - -h | --help Show this usage info - EOF - exit $1 -@@ -516,6 +518,11 @@ else - LIBBPF_FORCE="$1" ;; - --libbpf_force=*) - LIBBPF_FORCE="${1#*=}" ;; -+ --prefix) -+ shift -+ PREFIX="$1" ;; -+ --prefix=*) -+ PREFIX="${1#*=}" ;; - -h | --help) - usage 0 ;; - --*) -@@ -536,6 +543,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then - usage 1 - fi - fi -+[ -z "$PREFIX" ] && usage 1 - - echo "# Generated config based on" $INCLUDE >$CONFIG - quiet_config >> $CONFIG --- -2.31.1 - diff --git a/0007-configure-add-the-libdir-option.patch b/0007-configure-add-the-libdir-option.patch deleted file mode 100644 index 6c7beac..0000000 --- a/0007-configure-add-the-libdir-option.patch +++ /dev/null @@ -1,151 +0,0 @@ -From d2e278fcff8a699a2dbac8d74758b4e5f86fd5f0 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -References: <5e6e93a55d2335b90aacb0107e962610cce64007.1636047125.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Oct 2021 12:32:38 +0200 -Subject: [PATCH] configure: add the --libdir option - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999860 -Upstream Status: iproute2-next.git commit cee0cf84 - -commit cee0cf84bd32c8d9215f0c155187ad99d52a69b1 -Author: Andrea Claudi -Date: Thu Oct 14 10:50:55 2021 +0200 - - configure: add the --libdir option - - This commit allows users/packagers to choose a lib directory to store - iproute2 lib files. - - At the moment iproute2 ship lib files in /usr/lib and offers no way to - modify this setting. However, according to the FHS, distros may choose - "one or more variants of the /lib directory on systems which support - more than one binary format" (e.g. /usr/lib64 on Fedora). - - As Luca states in commit a3272b93725a ("configure: restore backward - compatibility"), packaging systems may assume that 'configure' is from - autotools, and try to pass it some parameters. - - Allowing the '--libdir=/path/to/libdir' syntax, we can use this to our - advantage, and let the lib directory to be chosen by the distro - packaging system. - - Note that LIBDIR uses "\${prefix}/lib" as default value because autoconf - allows this to be expanded to the --prefix value at configure runtime. - "\${prefix}" is replaced with the PREFIX value in check_lib_dir(). - - Signed-off-by: Andrea Claudi - Acked-by: Phil Sutter - Signed-off-by: David Ahern ---- - Makefile | 7 ++++--- - configure | 18 ++++++++++++++++++ - 2 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 5bc11477..45655ca4 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,8 @@ - # SPDX-License-Identifier: GPL-2.0 - # Top level Makefile for iproute2 - -+-include config.mk -+ - ifeq ("$(origin V)", "command line") - VERBOSE = $(V) - endif -@@ -13,7 +15,6 @@ MAKEFLAGS += --no-print-directory - endif - - PREFIX?=/usr --LIBDIR?=$(PREFIX)/lib - SBINDIR?=/sbin - CONFDIR?=/etc/iproute2 - NETNS_RUN_DIR?=/var/run/netns -@@ -60,7 +61,7 @@ SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa - LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a - LDLIBS += $(LIBNETLINK) - --all: config -+all: config.mk - @set -e; \ - for i in $(SUBDIRS); \ - do echo; echo $$i; $(MAKE) -C $$i; done -@@ -80,7 +81,7 @@ help: - @echo "Make Arguments:" - @echo " V=[0|1] - set build verbosity level" - --config: -+config.mk: - @if [ ! -f config.mk -o configure -nt config.mk ]; then \ - sh configure $(KERNEL_INCLUDE); \ - fi -diff --git a/configure b/configure -index 05e23eff..8ddff43c 100755 ---- a/configure -+++ b/configure -@@ -4,6 +4,7 @@ - - INCLUDE="$PWD/include" - PREFIX="/usr" -+LIBDIR="\${prefix}/lib" - - # Output file which is input to Makefile - CONFIG=config.mk -@@ -149,6 +150,15 @@ EOF - rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest - } - -+check_lib_dir() -+{ -+ LIBDIR=$(echo $LIBDIR | sed "s|\${prefix}|$PREFIX|") -+ -+ echo -n "lib directory: " -+ echo "$LIBDIR" -+ echo "LIBDIR:=$LIBDIR" >> $CONFIG -+} -+ - check_ipt() - { - if ! grep TC_CONFIG_XT $CONFIG > /dev/null; then -@@ -487,6 +497,7 @@ usage() - cat < Path to iproute2 include dir -+ --libdir Path to iproute2 lib dir - --libbpf_dir Path to libbpf DESTDIR - --libbpf_force Enable/disable libbpf by force. Available options: - on: require link against libbpf, quit config if no libbpf support -@@ -508,6 +519,11 @@ else - INCLUDE="$1" ;; - --include_dir=*) - INCLUDE="${1#*=}" ;; -+ --libdir) -+ shift -+ LIBDIR="$1" ;; -+ --libdir=*) -+ LIBDIR="${1#*=}" ;; - --libbpf_dir) - shift - LIBBPF_DIR="$1" ;; -@@ -544,6 +560,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then - fi - fi - [ -z "$PREFIX" ] && usage 1 -+[ -z "$LIBDIR" ] && usage 1 - - echo "# Generated config based on" $INCLUDE >$CONFIG - quiet_config >> $CONFIG -@@ -568,6 +585,7 @@ if ! grep -q TC_CONFIG_NO_XT $CONFIG; then - fi - - echo -+check_lib_dir - if ! grep -q TC_CONFIG_NO_XT $CONFIG; then - echo -n "iptables modules directory: " - check_ipt_lib_dir --- -2.31.1 - diff --git a/iproute.spec b/iproute.spec index a5cb087..debfa7c 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.15.0 -Release: 2%{?dist}%{?buildid} +Version: 5.17.0 +Release: 1%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -10,13 +10,6 @@ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{v %if ! 0%{?fedora} Source1: rt_dsfield.deprecated %endif -Patch0: 0001-configure-fix-parsing-issue-on-include_dir-option.patch -Patch1: 0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch -Patch2: 0003-configure-fix-parsing-issue-with-more-than-one-value.patch -Patch3: 0004-configure-simplify-options-parsing.patch -Patch4: 0005-configure-support-param-value-style.patch -Patch5: 0006-configure-add-the-prefix-option.patch -Patch6: 0007-configure-add-the-libdir-option.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -148,6 +141,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Mar 23 2022 Andrea Claudi - 5.17.0-1 +- New version 5.17.0 [2039103] + * Thu Jan 20 2022 Fedora Release Engineering - 5.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index d426c9e..ccbe23a 100644 --- a/sources +++ b/sources @@ -4,3 +4,4 @@ SHA512 (iproute2-5.12.0.tar.xz) = 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c8 SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d SHA512 (iproute2-5.14.0.tar.xz) = e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 +SHA512 (iproute2-5.17.0.tar.xz) = fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d From 59e7b4ef2f08259f568320e7fbd66c8b64330cef Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 30 Mar 2022 18:11:16 +0200 Subject: [PATCH 082/111] iproute-5.17.0-2 * Wed Mar 30 2022 Andrea Claudi - 5.17.0-2 - iproute.spec: do not ship routel (Andrea Claudi) [2068118] Resolves: rhbz#2068118 Signed-off-by: Andrea Claudi --- iproute.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index debfa7c..d56fbd0 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.17.0 -Release: 1%{?dist}%{?buildid} +Release: 2%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -115,6 +115,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc +%exclude %{_sbindir}/routel %{_datadir}/bash-completion/completions/devlink %files tc @@ -141,6 +142,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Wed Mar 30 2022 Andrea Claudi - 5.17.0-2 +- iproute.spec: do not ship routel (Andrea Claudi) [2068118] + * Wed Mar 23 2022 Andrea Claudi - 5.17.0-1 - New version 5.17.0 [2039103] From 9b3f8a94d69481090f77535fc468c712e82f37e6 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 15 Jun 2022 01:04:40 +0200 Subject: [PATCH 083/111] iproute-5.18.0-1 * Tue Jun 14 2022 Andrea Claudi - 5.18.0-1 - New version 5.18.0 [2090930] Resolves: rhbz#2090930 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 11 ++++++----- sources | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 44c7c55..6441e01 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /iproute2-5.14.0.tar.xz /iproute2-5.15.0.tar.xz /iproute2-5.17.0.tar.xz +/iproute2-5.18.0.tar.xz diff --git a/iproute.spec b/iproute.spec index d56fbd0..393cf08 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,15 +1,13 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.17.0 -Release: 2%{?dist}%{?buildid} +Version: 5.18.0 +Release: 1%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -%if ! 0%{?fedora} -Source1: rt_dsfield.deprecated -%endif + License: GPLv2+ and Public Domain BuildRequires: bison @@ -142,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Jun 14 2022 Andrea Claudi - 5.18.0-1 +- New version 5.18.0 [2090930] + * Wed Mar 30 2022 Andrea Claudi - 5.17.0-2 - iproute.spec: do not ship routel (Andrea Claudi) [2068118] diff --git a/sources b/sources index ccbe23a..69ee7a2 100644 --- a/sources +++ b/sources @@ -5,3 +5,4 @@ SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e8 SHA512 (iproute2-5.14.0.tar.xz) = e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 SHA512 (iproute2-5.17.0.tar.xz) = fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d +SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068 From c48c29082d38750428cadc158b3f458012deaa35 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 14:48:38 +0000 Subject: [PATCH 084/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 393cf08..a35a470 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.18.0 -Release: 1%{?dist}%{?buildid} +Release: 2%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -140,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 5.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Jun 14 2022 Andrea Claudi - 5.18.0-1 - New version 5.18.0 [2090930] From 35ccaf5271c5f2e70b994a410202925b3c7ea5e4 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Thu, 6 Oct 2022 16:13:20 +0200 Subject: [PATCH 085/111] iproute-6.0.0-1 * Thu Oct 06 2022 Andrea Claudi - 6.0.0-1 - New version 6.0.0 [2114514] - Fix some trailing whitespaces in iproute.spec - Also fix eln build (wrongly including SOURCE1 file) Resolves: rhbz#2114514 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 31 +++++++++++++++++-------------- sources | 1 + 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 6441e01..44b2f8d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /iproute2-5.15.0.tar.xz /iproute2-5.17.0.tar.xz /iproute2-5.18.0.tar.xz +/iproute2-6.0.0.tar.xz diff --git a/iproute.spec b/iproute.spec index a35a470..9149c1c 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 5.18.0 -Release: 2%{?dist}%{?buildid} +Version: 6.0.0 +Release: 1%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -97,7 +97,7 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a rm -rf '%{buildroot}%{_docdir}' # append deprecated values to rt_dsfield for compatibility reasons -%if ! 0%{?fedora} +%if 0%{?rhel} && ! 0%{?eln} cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %endif @@ -140,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Oct 06 2022 Andrea Claudi - 6.0.0-1 +- New version 6.0.0 [2114514] + * Thu Jul 21 2022 Fedora Release Engineering - 5.18.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild @@ -657,14 +660,14 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Apr 23 2009 Marcela Mašláňová - 2.6.29-3 -- new iptables (xtables) bring problems to tc, when ipt is used. +- new iptables (xtables) bring problems to tc, when ipt is used. rhbz#497344 still broken. tc_modules.patch brings correct paths to xtables, but that doesn't fix whole issue. -- 497355 ip should allow creation of an IPsec SA with 'proto any' +- 497355 ip should allow creation of an IPsec SA with 'proto any' and specified sport and dport as selectors * Tue Apr 14 2009 Marcela Mašláňová - 2.6.29-2 -- c3651bf4763d7247e3edd4e20526a85de459041b ip6tunnel: Fix no default +- c3651bf4763d7247e3edd4e20526a85de459041b ip6tunnel: Fix no default display of ip4ip6 tunnels - e48f73d6a5e90d2f883e15ccedf4f53d26bb6e74 missing arpd directory @@ -723,7 +726,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield * Wed Feb 6 2008 Marcela Maslanova - 2.6.23-3 - rebuild without tetex files. It isn't working in rawhide yet. Added - new source for ps files. + new source for ps files. - #431179 backward compatibility for previous iproute versions * Mon Jan 21 2008 Marcela Maslanova - 2.6.23-2 @@ -775,7 +778,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield - bug fix for xfrm monitor - alignment fixes for cris - documentation corrections - + * Mon Oct 2 2006 Radek Vokal - 2.6.16-7 - fix ip.8 man page, add initcwnd option @@ -825,7 +828,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield - use tc manpages and cbq.init from source tarball (#172851) * Thu Nov 10 2005 Radek Vokal 2.6.14-8 -- new upstream source +- new upstream source * Mon Oct 31 2005 Radek Vokal 2.6.14-7 - add warning to ip tunnel add command (#128107) @@ -841,7 +844,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield - add RPM_OPT_FLAGS * Mon Sep 19 2005 Radek Vokal 2.6.14-3 -- forget to apply the patch :( +- forget to apply the patch :( * Mon Sep 19 2005 Radek Vokal 2.6.14-2 - make ip help work again (#168449) @@ -860,7 +863,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield * Tue May 24 2005 Radek Vokal 2.6.11-2 - removed useless initvar patch (#150798) -- new upstream source +- new upstream source * Tue Mar 15 2005 Radek Vokal 2.6.11-1 - update to iproute-2.6.11 @@ -879,7 +882,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield * Tue Nov 16 2004 Radek Vokal 2.6.9-4 - source file updated from snapshot version -- endian patch adding +- endian patch adding * Sat Sep 18 2004 Joshua Blanton 2.6.9-3 - added installation of netem module for tc @@ -905,7 +908,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield * Wed Apr 21 2004 Phil Knirsch 2.4.7-14 - Fixed -f option for ss (#118355). - Small description fix (#110997). -- Added initialization of some vars (#74961). +- Added initialization of some vars (#74961). - Added patch to initialize "default" rule as well (#60693). * Fri Feb 13 2004 Elliot Lee @@ -958,7 +961,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield - fix build problem in beehive if kernel-sources is not installed * Fri May 25 2001 Helge Deller -- updated to iproute2-2.2.4-now-ss001007.tar.gz +- updated to iproute2-2.2.4-now-ss001007.tar.gz - bzip2 source tar file - "License" replaces "Copyright" - added "BuildPrereq: tetex-latex tetex-dvips psutils" diff --git a/sources b/sources index 69ee7a2..958b7ca 100644 --- a/sources +++ b/sources @@ -6,3 +6,4 @@ SHA512 (iproute2-5.14.0.tar.xz) = e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a4 SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 SHA512 (iproute2-5.17.0.tar.xz) = fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068 +SHA512 (iproute2-6.0.0.tar.xz) = be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a From 3b389914ec602928d74d86d67f1a4c11164aec4c Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 1 Nov 2022 22:18:36 +0100 Subject: [PATCH 086/111] libbpf 1.0 support Extra release for libbpf 1.0 build. Signed-off-by: Jiri Olsa --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 9149c1c..b5c206d 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 6.0.0 -Release: 1%{?dist}%{?buildid} +Release: 2%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -140,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Nov 01 2022 Jiri Olsa - 6.0.0-2 +- libbpf 1.0 support + * Thu Oct 06 2022 Andrea Claudi - 6.0.0-1 - New version 6.0.0 [2114514] From a833ccb56dc76b2db10f9568c30d36ef36b13e31 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 13:18:39 +0000 Subject: [PATCH 087/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iproute.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index b5c206d..27e353a 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 6.0.0 -Release: 2%{?dist}%{?buildid} +Release: 3%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -140,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 6.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Nov 01 2022 Jiri Olsa - 6.0.0-2 - libbpf 1.0 support From e2a8a76a86596946328288a41bc0f3a078956729 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Fri, 27 Jan 2023 20:11:50 +0100 Subject: [PATCH 088/111] iproute-6.1.0-1 * Fri Jan 27 2023 Andrea Claudi - 6.1.0-1 - New version 6.1.0 [2114514] Resolves: rhbz#2114514 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 7 +++++-- sources | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 44b2f8d..a41b0f5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /iproute2-5.17.0.tar.xz /iproute2-5.18.0.tar.xz /iproute2-6.0.0.tar.xz +/iproute2-6.1.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 27e353a..d0bad43 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.0.0 -Release: 3%{?dist}%{?buildid} +Version: 6.1.0 +Release: 1%{?dist}%{?buildid} %if 0%{?rhel} Group: Applications/System %endif @@ -140,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Jan 27 2023 Andrea Claudi - 6.1.0-1 +- New version 6.1.0 [2114514] + * Thu Jan 19 2023 Fedora Release Engineering - 6.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 958b7ca..641f77b 100644 --- a/sources +++ b/sources @@ -7,3 +7,4 @@ SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149 SHA512 (iproute2-5.17.0.tar.xz) = fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068 SHA512 (iproute2-6.0.0.tar.xz) = be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a +SHA512 (iproute2-6.1.0.tar.xz) = 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28 From 1a364a91200b485b7825bcd905b1fed7da1a6642 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 12 Feb 2023 19:50:19 -0500 Subject: [PATCH 089/111] Fix flatpak build --- iproute.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/iproute.spec b/iproute.spec index d0bad43..6972e37 100644 --- a/iproute.spec +++ b/iproute.spec @@ -79,12 +79,11 @@ The libnetlink static library. %autosetup -p1 -n %{name}2-%{version} %build -%configure +%configure --libdir %{_libdir} +echo -e "\nPREFIX=%{_prefix}\nCONFDIR:=%{_sysconfdir}/iproute2\nSBINDIR=%{_sbindir}" >> config.mk %make_build %install -export SBINDIR='%{_sbindir}' -export LIBDIR='%{_libdir}' %make_install echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8 From cbbae567ba4f3b443bc5a932cacb7ddc264be777 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 26 Apr 2023 11:43:32 +0200 Subject: [PATCH 090/111] iproute-6.2.0-1.f39 * Wed Apr 26 2023 Andrea Claudi - 6.2.0-1.f39 - Adopt SPDX license ids - Use rpmautospec machinery - New version 6.2.0 (Andrea Claudi) [2171899] Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 885 +-------------------------------------------------- sources | 1 + 3 files changed, 9 insertions(+), 878 deletions(-) diff --git a/.gitignore b/.gitignore index a41b0f5..9243517 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /iproute2-5.18.0.tar.xz /iproute2-6.0.0.tar.xz /iproute2-6.1.0.tar.xz +/iproute2-6.2.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 6972e37..861b294 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.1.0 -Release: 1%{?dist}%{?buildid} +Version: 6.2.0 +Release: %autorelease %if 0%{?rhel} Group: Applications/System %endif @@ -9,7 +9,7 @@ URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -License: GPLv2+ and Public Domain +License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison BuildRequires: elfutils-libelf-devel BuildRequires: flex @@ -41,7 +41,7 @@ Summary: Linux Traffic Control utility %if 0%{?rhel} Group: Applications/System %endif -License: GPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{version}-%{release} Provides: /sbin/tc @@ -56,7 +56,7 @@ Summary: Documentation for iproute2 utilities with examples %if 0%{?rhel} Group: Applications/System %endif -License: GPLv2+ +License: GPL-2.0-or-later Requires: %{name} = %{version}-%{release} %description doc @@ -68,7 +68,7 @@ Summary: iproute development files %if 0%{?rhel} Group: Development/Libraries %endif -License: GPLv2+ +License: GPL-2.0-or-later Requires: %{name} = %{version}-%{release} Provides: iproute-static = %{version}-%{release} @@ -139,875 +139,4 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog -* Fri Jan 27 2023 Andrea Claudi - 6.1.0-1 -- New version 6.1.0 [2114514] - -* Thu Jan 19 2023 Fedora Release Engineering - 6.0.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Nov 01 2022 Jiri Olsa - 6.0.0-2 -- libbpf 1.0 support - -* Thu Oct 06 2022 Andrea Claudi - 6.0.0-1 -- New version 6.0.0 [2114514] - -* Thu Jul 21 2022 Fedora Release Engineering - 5.18.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Tue Jun 14 2022 Andrea Claudi - 5.18.0-1 -- New version 5.18.0 [2090930] - -* Wed Mar 30 2022 Andrea Claudi - 5.17.0-2 -- iproute.spec: do not ship routel (Andrea Claudi) [2068118] - -* Wed Mar 23 2022 Andrea Claudi - 5.17.0-1 -- New version 5.17.0 [2039103] - -* Thu Jan 20 2022 Fedora Release Engineering - 5.15.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Nov 04 2021 Andrea Claudi - 5.15.0-1 -- New version 5.15.0 [2019267] - -* Wed Oct 20 2021 Andrea Claudi - 5.14.0-1 -- New version 5.14.0 [1999860] - -* Mon Aug 09 2021 Mohan Boddu - 5.13.0-4.el9 -- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Related: rhbz#1991688 - -* Fri Jul 16 2021 Andrea Claudi - 5.13.0-3.el9 -- Fix changelog (Andrea Claudi) [1947854] -- Add RHEL gating configuration (Aleksandra Fedorova) - -* Thu Jul 15 2021 Andrea Claudi - 5.13.0-2.el9 -- Remove Recommends: iproute-tc from spec file (Andrea Claudi) [1947854] - -* Wed Jun 30 2021 Andrea Claudi - 5.13.0-1.el9 -- New version 5.13.0 (#1977898) - -* Fri Apr 16 2021 Mohan Boddu - 5.10.0-3.el9 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - -* Tue Jan 26 2021 Fedora Release Engineering - 5.10.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Dec 21 2020 Andrea Claudi - 5.10.0-1 -- New version 5.10.0 (#1909551) - -* Wed Dec 2 2020 Andrea Claudi - 5.9.0-1 -- New version 5.9.0 - -* Mon Aug 10 2020 Phil Sutter - 5.8.0-1 -- New version 5.8.0 - -* Tue Jul 28 2020 Fedora Release Engineering - 5.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jun 03 2020 Phil Sutter - 5.7.0-1 -- New version 5.7.0 - -* Tue Jan 28 2020 Phil Sutter - 5.5.0-1 -- New version 5.5.0 - -* Tue Nov 26 2019 Phil Sutter - 5.4.0-1 -- New version 5.4.0 -- Drop iproute-doc package, upstream removed all non-manpage documentation - -* Tue Oct 08 2019 Phil Sutter - 5.3.0-2 -- ifcfg script uses killall, therefore requires psmisc package - -* Thu Sep 26 2019 Phil Sutter - 5.3.0-1 -- New version 5.3.0 -- Add upstream-suggested backports - -* Thu Jul 25 2019 Fedora Release Engineering - 5.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Tue Jul 23 2019 Phil Sutter - 5.2.0-1 -- New version 5.2.0 -- Add upstream-suggested backports -- Fix for tunnel creation when using 'dev' parameter - -* Wed May 29 2019 Phil Sutter - 5.1.0-1 -- New version 5.1.0 - -* Wed Mar 20 2019 Phil Sutter - 5.0.0-2 -- Restore Provides: hint, at least pptp depends on it - -* Wed Mar 20 2019 Phil Sutter - 5.0.0-1 -- New version 5.0.0 -- Get rid of old upgrade path hints - -* Fri Feb 01 2019 Phil Sutter - 4.20.0-1 -- New version 4.20.0 -- Add upstream-suggested backports -- Upstream dropped cbq script, remove it along with related configs -- Add libcap support - -* Fri Feb 01 2019 Fedora Release Engineering - 4.18.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Wed Sep 19 2018 Phil Sutter - 4.18.0-5 -- man: ip-route: Clarify referenced versions are Linux ones - -* Fri Aug 31 2018 Phil Sutter - 4.18.0-4 -- iprule: Fix destination prefix output - -* Thu Aug 23 2018 Phil Sutter - 4.18.0-3 -- Make colored output configurable - -* Thu Aug 16 2018 Phil Sutter - 4.18.0-2 -- Fix ss filter expressions - -* Tue Aug 14 2018 Phil Sutter - 4.18.0-1 -- New version 4.18.0 - -* Fri Jul 13 2018 Fedora Release Engineering - 4.17.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 12 2018 Phil Sutter - 4.17.0-1 -- New version 4.17.0 - -* Fri Jun 01 2018 Phil Sutter - 4.16.0-1 -- New version 4.16.0 - -* Fri Feb 09 2018 Phil Sutter - 4.15.0-1 -- New version 4.15.0 - -* Fri Feb 9 2018 Florian Weimer - 4.14.1-6 -- Use LDFLAGS defaults from redhat-rpm-config - -* Wed Feb 07 2018 Fedora Release Engineering - 4.14.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Dec 11 2017 Phil Sutter - 4.14.1-4 -- Add missing patch files. - -* Mon Dec 11 2017 Phil Sutter - 4.14.1-3 -- Add upstream suggested backports. -- Make use of %%autosetup macro. - -* Wed Nov 15 2017 Phil Sutter - 4.14.1-2 -- Drop unused build dependencies - -* Wed Nov 15 2017 Phil Sutter - 4.14.1-1 -- New version 4.14.1 - -* Tue Sep 19 2017 Phil Sutter - 4.13.0-1 -- New version 4.13.0 - -* Wed Aug 02 2017 Fedora Release Engineering - 4.12.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 4.12.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Jul 21 2017 Phil Sutter - 4.12.0-1 -- New version 4.12.0 - -* Tue May 23 2017 Phil Sutter - 4.11.0-1 -- Add virtual capability to tc subpackage so it's easier found -- New version 4.11.0 - -* Thu May 11 2017 Karsten Hopp - 4.10.0-3 -- don't build docs for module builds to limit dependencies - -* Fri Mar 17 2017 Phil Sutter - 4.10.0-2 -- Add two fixes to 4.10.0 release from upstream. - -* Tue Mar 14 2017 Phil Sutter - 4.10.0-1 -- Ship new header iproute2/bpf_elf.h -- Document content of remaining docs fixup patch in spec file -- Drop patches already applied upstream -- New version 4.10.0 - -* Fri Feb 10 2017 Fedora Release Engineering - 4.9.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Feb 2 2017 Thomas Woerner - 4.9.0-3 -- Release bump for iptables-1.6.1 (libxtables.so.12) - -* Sat Jan 28 2017 Phil Sutter - 4.9.0-2 -- Fix for failing 'make install' - -* Sat Jan 28 2017 Phil Sutter - 4.9.0-1 -- New version 4.9.0 - -* Fri Jan 13 2017 Phil Sutter - 4.8.0-2 -- Fix segfault in xt action - -* Wed Nov 30 2016 Phil Sutter - 4.8.0-1 -- New version 4.8.0 - -* Wed Aug 10 2016 Phil Sutter - 4.7.0-1 -- New version 4.7.0 - -* Wed May 04 2016 Phil Sutter - 4.6.0-1 -- New version 4.6.0 - -* Wed Apr 13 2016 Thomas Woerner - 4.5.0-4 -- Rebuild for new iptables-1.6.0 with libxtables so bump - -* Fri Apr 08 2016 Phil Sutter - 4.5.0-3 -- Fix upgrade path by adding correct Requires/Obsoletes statements to spec file -- Move README.iproute2+tc into tc subpackage - -* Fri Mar 18 2016 Phil Sutter - 4.5.0-2 -- Split tc into it's own subpackage - -* Fri Mar 18 2016 Phil Sutter - 4.5.0-1 -- New version 4.5.0 - -* Thu Feb 04 2016 Fedora Release Engineering - 4.4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jan 19 2016 Phil Sutter - 4.4.0-1 -- New version 4.4.0 - -* Sun Oct 04 2015 Phil Sutter - 4.2.0-4 -- Simplify RPM install stage by using package's install target - -* Sun Oct 04 2015 Phil Sutter - 4.2.0-3 -- Add missing build dependency to libmnl-devel -- Ship tipc utility - -* Thu Sep 24 2015 Phil Sutter - 4.2.0-2 -- Add missing build dependency to libselinux-devel - -* Wed Sep 02 2015 Pavel Šimerda - 4.2.0-1 -- new version 4.2.0 - -* Tue Jul 07 2015 Pavel Šimerda - 4.1.1-1 -- new version 4.1.1 - -* Wed Jun 17 2015 Fedora Release Engineering - 4.0.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed May 13 2015 Pavel Šimerda - 4.0.0-3 -- remove patch rejected by upstream - -* Mon May 11 2015 Pavel Šimerda - 4.0.0-2 -- Remove patch rejected by upstream - -* Tue Apr 14 2015 Pavel Šimerda - 4.0.0-1 -- new version 4.0.0 - -* Fri Mar 13 2015 Pavel Šimerda - 3.19.0-1 -- new version 3.19.0 - -* Sat Oct 04 2014 Lubomir Rintel - 3.16.0-3 -- Backport fix for ip link add name regression that broke libvirt - -* Sat Aug 16 2014 Fedora Release Engineering - 3.16.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Tue Aug 05 2014 Petr Šabata - 3.16.0-1 -- 3.16 bump - -* Sat Jul 12 2014 Tom Callaway - 3.15.0-2 -- fix license handling - -* Thu Jun 12 2014 Petr Šabata - 3.15.0-1 -- 3.15.0 bump - -* Sat Jun 07 2014 Fedora Release Engineering - 3.14.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue May 06 2014 Petr Šabata - 3.14.0-2 -- Fix incorrect references in ss(8), #1092653 - -* Tue Apr 15 2014 Petr Šabata - 3.14.0-1 -- 3.14 bump -- Drop out iplink_have_newlink() fix in favor of upstream's approach - -* Tue Nov 26 2013 Petr Šabata - 3.12.0-2 -- Drop libnl from dependencies (#1034454) - -* Mon Nov 25 2013 Petr Šabata - 3.12.0-1 -- 3.12.0 bump - -* Thu Nov 21 2013 Petr Šabata - 3.11.0-2 -- Fix the rtt time parsing again - -* Tue Oct 22 2013 Petr Šabata - 3.11.0-1 -- 3.11 bump - -* Tue Oct 01 2013 Petr Pisar - 3.10.0-8 -- Close file with bridge monitor file (bug #1011822) - -* Tue Sep 24 2013 Petr Pisar - 3.10.0-7 -- Add tc -OK option -- Document "bridge mdb" and "bridge monitor mdb" - -* Fri Aug 30 2013 Petr Šabata - 3.10.0-6 -- Fix lnstat -i properly this time - -* Thu Aug 29 2013 Petr Šabata - 3.10.0-5 -- Fix an 'ip link' hang (#996537) - -* Tue Aug 13 2013 Petr Šabata - 3.10.0-4 -- lnstat -i: Run indefinitely if the --count isn't specified (#977845) -- Switch to unversioned %%docdir - -* Sat Aug 03 2013 Fedora Release Engineering - 3.10.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 17 2013 Petr Šabata - 3.10.0-2 -- Fix the XFRM patch - -* Wed Jul 17 2013 Petr Šabata - 3.10.0-1 -- 3.10.0 bump -- Drop the SHAREDIR patch and revert to upstream ways (#966445) -- Fix an XFRM regression with FORTIFY_SOURCE - -* Tue Apr 30 2013 Petr Šabata - 3.9.0-1 -- 3.9.0 bump - -* Thu Apr 25 2013 Petr Šabata - 3.8.0-4 -- ATM is available in Fedora only - -* Tue Mar 12 2013 Petr Šabata - 3.8.0-3 -- Mention the "up" argument in documentation and help outputs (#907468) - -* Mon Mar 04 2013 Petr Šabata - 3.8.0-2 -- Bump for 1.4.18 rebuild - -* Tue Feb 26 2013 Petr Šabata - 3.8.0-1 -- 3.8.0 bump - -* Fri Feb 08 2013 Petr Šabata - 3.7.0-2 -- Don't propogate mounts out of ip (#882047) - -* Wed Dec 12 2012 Petr Šabata - 3.7.0-1 -- 3.7.0 bump - -* Mon Nov 19 2012 Petr Šabata - 3.6.0-3 -- Include section 7 manpages (#876857) -- Fix ancient bogus dates in the changelog (correction based upon commits) -- Explicitly require some TeX fonts no longer present in the base distribution - -* Thu Oct 04 2012 Petr Šabata - 3.6.0-2 -- List all interfaces by default - -* Wed Oct 03 2012 Petr Šabata - 3.6.0-1 -- 3.6.0 bump - -* Thu Aug 30 2012 Petr Šabata - 3.5.1-2 -- Remove the explicit iptables dependency (#852840) - -* Tue Aug 14 2012 Petr Šabata - 3.5.1-1 -- 3.5.1 bugfix release bump -- Rename 'br' to 'bridge' - -* Mon Aug 06 2012 Petr Šabata - 3.5.0-2 -- Install the new bridge utility - -* Thu Aug 02 2012 Petr Šabata - 3.5.0-1 -- 3.5.0 bump -- Move to db5. - -* Thu Jul 19 2012 Fedora Release Engineering - 3.4.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue May 22 2012 Petr Šabata - 3.4.0-1 -- 3.4.0 bump -- Drop the print route patch (included upstream) - -* Mon Apr 30 2012 Petr Šabata - 3.3.0-2 -- Let's install rtmon too... (#814819) - -* Thu Mar 22 2012 Petr Šabata - 3.3.0-1 -- 3.3.0 bump -- Update source URL - -* Mon Feb 27 2012 Petr Šabata - 3.2.0-3 -- Address dangerous /tmp files security issue (CVE-2012-1088, #797881, #797878) - -* Fri Jan 27 2012 Petr Šabata - 3.2.0-2 -- Simplify the spec a bit thanks to the UsrMove feature - -* Fri Jan 06 2012 Petr Šabata - 3.2.0-1 -- 3.2.0 bump -- Removing a useless, now conflicting patch (initcwnd already decumented) - -* Thu Nov 24 2011 Petr Šabata - 3.1.0-1 -- 3.1.0 bump -- Point URL and Source to the new location on kernel.org -- Remove now obsolete defattr -- Dropping various patches now included upstream -- Dropping iproute2-2.6.25-segfault.patch; I fail to understand the reason for - this hack - -* Tue Nov 15 2011 Petr Šabata - 2.6.39-6 -- ss -ul should display UDP CLOSED sockets (#691100) - -* Thu Oct 06 2011 Petr Sabata - 2.6.39-5 -- Fix ss, lnstat and arpd usage and manpages - -* Wed Sep 07 2011 Petr Sabata - 2.6.39-4 -- lnstat should dump (-d) to stdout instead of stderr (#736332) - -* Tue Jul 26 2011 Petr Sabata - 2.6.39-3 -- Rebuild for xtables7 - -* Tue Jul 12 2011 Petr Sabata - 2.6.39-2 -- Rebuild for xtables6 - -* Thu Jun 30 2011 Petr Sabata - 2.6.39-1 -- 2.6.39 bump - -* Wed Apr 27 2011 Petr Sabata - 2.6.38.1-4 -- Link [cr]tstat to lnstat - -* Wed Apr 27 2011 Petr Sabata - 2.6.38.1-3 -- Install ctstat, rtstat and routef manpage symlinks -- Install m_xt & m_ipt tc modules -- Creating devel and virtual static subpackages with libnetlink - -* Thu Apr 21 2011 Petr Sabata - 2.6.38.1-2 -- General cleanup -- Use global instead of define -- Buildroot removal -- Correcting URL and Source links -- Install genl, ifstat, routef, routel and rtpr (rhbz#697319) - -* Fri Mar 18 2011 Petr Sabata - 2.6.38.1-1 -- 2.6.38.1 bump - -* Wed Mar 16 2011 Petr Sabata - 2.6.38-1 -- 2.6.38 bump - -* Wed Feb 09 2011 Fedora Release Engineering - 2.6.37-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Jan 31 2011 Petr Sabata - 2.6.37-2 -- man-pages.patch update, ip(8) TYPE whitespace - -* Mon Jan 10 2011 Petr Sabata - 2.6.37-1 -- 2.6.37 upstream release -- ss(8) improvements patch removed (included upstream) - -* Wed Dec 08 2010 Petr Sabata - 2.6.35-10 -- fix a typo in ss(8) improvements patch, rhbz#661267 - -* Tue Nov 30 2010 Petr Sabata - 2.6.35-9 -- ss(8) improvements patch by jpopelka; should be included in 2.6.36 - -* Tue Nov 09 2010 Petr Sabata - 2.6.35-8 -- rhbz#641599, use the versioned path, man-pages.patch update, prep update - -* Tue Oct 12 2010 Petr Sabata - 2.6.35-7 -- Do not segfault if peer name is omitted when creating a peer veth link, rhbz#642322 - -* Mon Oct 11 2010 Petr Sabata - 2.6.35-6 -- Man-pages update, rhbz#641599 - -* Wed Sep 29 2010 jkeating - 2.6.35-5 -- Rebuilt for gcc bug 634757 - -* Tue Sep 21 2010 Petr Sabata - 2.6.35-4 -- Modified man-pages.patch to fix cbq manpage, rhbz#635877 - -* Tue Sep 21 2010 Petr Sabata - 2.6.35-3 -- Don't print routes with negative metric fix, rhbz#628739 - -* Wed Aug 18 2010 Petr Sabata - 2.6.35-2 -- 'ip route get' fix, iproute2-2.6.35-print-route.patch -- rhbz#622782 - -* Thu Aug 05 2010 Petr Sabata - 2.6.35-1 -- 2.6.35 version bump -- iproute2-tc-priority.patch removed (included in upstream now) - -* Thu Jul 08 2010 Petr Sabata - 2.6.34-5 -- Licensing guidelines compliance fix - -* Wed Jul 07 2010 Petr Sabata - 2.6.34-4 -- Requires: iptables >= 1.4.5, BuildRequires: iptables-devel >= 1.4.5 - -* Thu Jul 01 2010 Petr Sabata - 2.6.34-3 -- Build now runs ./configure to regenerate Makefile for ipt/xt detection - -* Mon Jun 21 2010 Petr Sabata - 2.6.34-2 -- iproute-tc-priority.patch, rhbz#586112 - -* Mon Jun 21 2010 Petr Sabata - 2.6.34-1 -- 2.6.34 version bump - -* Tue Apr 20 2010 Marcela Mašláňová - 2.6.33-2 -- 578729 6rd tunnel correctly 3979ef91de9ed17d21672aaaefd6c228485135a2 -- change BR texlive to tex according to guidelines - -* Thu Feb 25 2010 Marcela Mašláňová - 2.6.33-1 -- update - -* Tue Jan 26 2010 Marcela Mašláňová - 2.6.32-2 -- add macvlan aka VESA support d63a9b2b1e4e3eab0d0577d0a0f412d50be1e0a7 -- kernel headers 2.6.33 ab322673298bd0b8927cdd9d11f3d36af5941b93 - are needed for macvlan features and probably for other added later. -- fix number of release which contains 2.6.32 kernel headers and features - but it was released as 2.6.31 - -* Mon Jan 4 2010 Marcela Mašláňová - 2.6.31-1 -- update to 2.6.31 - -* Fri Nov 27 2009 Marcela Mašláňová - 2.6.29-5.1.20091106gita7a9ddbb -- 539232 patch cbq initscript - -* Fri Nov 27 2009 Marcela Mašláňová - 2.6.29-5.0.20091106gita7a9ddbb -- snapshot with kernel headers for 2.6.32 - -* Fri Oct 9 2009 Marcela Mašláňová - 2.6.29-5.0.20091009gitdaf49fd6 -- new official version isn't available but it's needed -> switch to git snapshots - -* Thu Sep 24 2009 Marcela Mašláňová - 2.6.29-5 -- create missing man pages - -* Fri Jul 24 2009 Fedora Release Engineering - 2.6.29-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Thu Apr 23 2009 Marcela Mašláňová - 2.6.29-3 -- new iptables (xtables) bring problems to tc, when ipt is used. - rhbz#497344 still broken. tc_modules.patch brings correct paths to - xtables, but that doesn't fix whole issue. -- 497355 ip should allow creation of an IPsec SA with 'proto any' - and specified sport and dport as selectors - -* Tue Apr 14 2009 Marcela Mašláňová - 2.6.29-2 -- c3651bf4763d7247e3edd4e20526a85de459041b ip6tunnel: Fix no default - display of ip4ip6 tunnels -- e48f73d6a5e90d2f883e15ccedf4f53d26bb6e74 missing arpd directory - -* Wed Mar 25 2009 Marcela Mašláňová - 2.6.29-1 -- update to 2.6.29 -- remove DDR patch which became part of sourc -- add patch with correct headers 1957a322c9932e1a1d2ca1fd37ce4b335ceb7113 - -* Wed Feb 25 2009 Fedora Release Engineering - 2.6.28-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Feb 4 2009 Marcela Mašláňová - 2.6.28-2 -- 483484 install distribution files into /usr/share and also fixed - install paths in spec -- add the latest change from git which add DRR support - c86f34942a0ce9f8203c0c38f9fe9604f96be706 - -* Mon Jan 19 2009 Marcela Mašláňová - 2.6.28-1 -- previous two patches were included into 2.6.28 release. -- update - -* Mon Jan 12 2009 Marcela Mašláňová - 2.6.27-2 -- 475130 - Negative preferred lifetimes of IPv6 prefixes/addresses - displayed incorrectly -- 472878 - “ip maddr show” in IB interface causes a stack corruption -- both patches will be probably in iproute v2.6.28 - -* Thu Dec 4 2008 Marcela Maslanova - 2.6.27-1 -- aead support was included into upstream version -- patch for moving libs is now deprecated -- update to 2.6.27 - -* Tue Aug 12 2008 Marcela Maslanova - 2.6.26-1 -- update to 2.6.26 -- clean patches - -* Tue Jul 22 2008 Marcela Maslanova - 2.6.25-5 -- fix iproute2-2.6.25-segfault.patch - -* Thu Jul 10 2008 Tom "spot" Callaway - 2.6.25-4 -- rebuild for new db4-4.7 - -* Thu Jul 3 2008 Marcela Maslanova - 2.6.25-3 -- 449933 instead of failing strncpy use copying byte after byte - -* Wed May 14 2008 Marcela Maslanova - 2.6.25-2 -- allow replay setting, solve also 444724 - -* Mon Apr 21 2008 Marcela Maslanova - 2.6.25-1 -- update -- remove patch for backward compatibility -- add patch for AEAD compatibility - -* Thu Feb 21 2008 Marcela Maslanova - 2.6.23-4 -- add creating ps file again. Fix was done in texlive - -* Wed Feb 6 2008 Marcela Maslanova - 2.6.23-3 -- rebuild without tetex files. It isn't working in rawhide yet. Added - new source for ps files. -- #431179 backward compatibility for previous iproute versions - -* Mon Jan 21 2008 Marcela Maslanova - 2.6.23-2 -- rebuild with fix tetex and linuxdoc-tools -> manual pdf -- clean unnecessary patches -- add into spec *.so objects, new BR linux-atm-libs-devel - -* Wed Oct 31 2007 Marcela Maslanova - 2.6.23-1 -- new version from upstrem 2.3.23 - -* Tue Oct 23 2007 Marcela Maslanova - 2.6.22-5 -- move files from /usr/lib/tc to /usr/share/tc -- remove listing files twice - -* Fri Aug 31 2007 Marcela Maslanova - 2.6.22-3 -- package review #225903 - -* Mon Aug 27 2007 Jeremy Katz - 2.6.22-2 -- rebuild for new db4 - -* Wed Jul 11 2007 Radek Vokál - 2.6.22-1 -- upgrade to 2.6.22 - -* Mon Mar 19 2007 Radek Vokál - 2.6.20-2 -- fix broken tc-pfifo man page (#232891) - -* Thu Mar 15 2007 Radek Vokál - 2.6.20-1 -- upgrade to 2.6.20 - -* Fri Dec 15 2006 Radek Vokál - 2.6.19-1 -- upgrade to 2.6.19 - -* Mon Dec 11 2006 Radek Vokál - 2.6.18-5 -- fix snapshot version - -* Fri Dec 1 2006 Radek Vokál - 2.6.18-4 -- spec file cleanup -- one more rebuilt against db4 - -* Thu Nov 16 2006 Radek Vokál - 2.6.18-3 -- fix defective manpage for tc-pfifo (#215399) - -* Mon Nov 13 2006 Radek Vokál - 2.6.18-2 -- rebuilt against new db4 - -* Tue Oct 3 2006 Radek Vokal - 2.6.18-1 -- upgrade to upstream 2.6.18 -- initcwnd patch merged -- bug fix for xfrm monitor -- alignment fixes for cris -- documentation corrections - -* Mon Oct 2 2006 Radek Vokal - 2.6.16-7 -- fix ip.8 man page, add initcwnd option - -* Sun Oct 01 2006 Jesse Keating - 2.6.16-6 -- rebuilt for unwind info generation, broken in gcc-4.1.1-21 - -* Tue Sep 19 2006 Radek Vokal - 2.6.16-5 -- fix crash when resolving ip address - -* Mon Aug 21 2006 Radek Vokál - 2.6.16-4 -- add LOWER_UP and DORMANT flags (#202199) -- use dist tag - -* Wed Jul 12 2006 Jesse Keating - 2.6.16-3.1 -- rebuild - -* Mon Jun 26 2006 Radek Vokál - 2.6.16-3 -- improve handling of initcwnd value (#179719) - -* Sun May 28 2006 Radek Vokál - 2.6.16-2 -- fix BuildRequires: flex (#193403) - -* Sun Mar 26 2006 Radek Vokál - 2.6.16-1 -- upgrade to 2.6.16-060323 -- don't hardcode /usr/lib in tc (#186607) - -* Wed Feb 22 2006 Radek Vokál - 2.6.15-2 -- own /usr/lib/tc (#181953) -- obsoletes shapecfg (#182284) - -* Fri Feb 10 2006 Jesse Keating - 2.6.15-1.2 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 2.6.15-1.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Tue Jan 17 2006 Radek Vokal 2.6.15-1 -- upgrade to 2.6.15-060110 - -* Mon Dec 12 2005 Radek Vokal 2.6.14-11 -- rebuilt - -* Fri Dec 09 2005 Radek Vokal 2.6.14-10 -- remove backup of config files (#175302) - -* Fri Nov 11 2005 Radek Vokal 2.6.14-9 -- use tc manpages and cbq.init from source tarball (#172851) - -* Thu Nov 10 2005 Radek Vokal 2.6.14-8 -- new upstream source - -* Mon Oct 31 2005 Radek Vokal 2.6.14-7 -- add warning to ip tunnel add command (#128107) - -* Fri Oct 07 2005 Bill Nottingham 2.6.14-6 -- update from upstream (appears to fix #170111) - -* Fri Oct 07 2005 Radek Vokal 2.6.14-5 -- update from upstream -- fixed host_len size for memcpy (#168903) - -* Fri Sep 23 2005 Radek Vokal 2.6.14-4 -- add RPM_OPT_FLAGS - -* Mon Sep 19 2005 Radek Vokal 2.6.14-3 -- forget to apply the patch :( - -* Mon Sep 19 2005 Radek Vokal 2.6.14-2 -- make ip help work again (#168449) - -* Wed Sep 14 2005 Radek Vokal 2.6.14-1 -- upgrade to ss050901 for 2.6.14 kernel headers - -* Fri Aug 26 2005 Radek Vokal 2.6.13-3 -- added /sbin/cbq script and sample configuration files (#166301) - -* Fri Aug 19 2005 Radek Vokal 2.6.13-2 -- upgrade to iproute2-050816 - -* Thu Aug 11 2005 Radek Vokal 2.6.13-1 -- update to snapshot for 2.6.13+ kernel - -* Tue May 24 2005 Radek Vokal 2.6.11-2 -- removed useless initvar patch (#150798) -- new upstream source - -* Tue Mar 15 2005 Radek Vokal 2.6.11-1 -- update to iproute-2.6.11 - -* Fri Mar 04 2005 Radek Vokal 2.6.10-2 -- gcc4 rebuilt - -* Wed Feb 16 2005 Radek Vokal 2.6.10-1 -- update to iproute-2.6.10 - -* Thu Dec 23 2004 Radek Vokal 2.6.9-6 -- added arpd into sbin - -* Mon Nov 29 2004 Radek Vokal 2.6.9-5 -- debug info removed from makefile and from spec (#140891) - -* Tue Nov 16 2004 Radek Vokal 2.6.9-4 -- source file updated from snapshot version -- endian patch adding - -* Sat Sep 18 2004 Joshua Blanton 2.6.9-3 -- added installation of netem module for tc - -* Mon Sep 06 2004 Radek Vokal 2.6.9-2 -- fixed possible buffer owerflow, path by Steve Grubb - -* Wed Sep 01 2004 Radek Vokal 2.6.9-1 -- updated to iproute-2.6.9, spec file change, patches cleared - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Wed May 26 2004 Phil Knirsch 2.4.7-16 -- Took tons of manpages from debian, much more complete (#123952). - -* Thu May 06 2004 Phil Knirsch 2.4.7-15 -- rebuilt - -* Thu May 06 2004 Phil Knirsch 2.4.7-13.2 -- Built security errata version for FC1. - -* Wed Apr 21 2004 Phil Knirsch 2.4.7-14 -- Fixed -f option for ss (#118355). -- Small description fix (#110997). -- Added initialization of some vars (#74961). -- Added patch to initialize "default" rule as well (#60693). - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Wed Nov 05 2003 Phil Knirsch 2.4.7-12 -- Security errata for netlink (CAN-2003-0856). - -* Thu Oct 23 2003 Phil Knirsch -- Updated to latest version. Used by other distros, so seems stable. ;-) -- Quite a few patches needed updating in that turn. -- Added ss (#107363) and several other new nifty tools. - -* Tue Jun 17 2003 Phil Knirsch -- rebuilt - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Thu Jan 16 2003 Phil Knirsch 2.4.7-7 -- Added htb3-tc patch from http://luxik.cdi.cz/~devik/qos/htb/ (#75486). - -* Fri Oct 11 2002 Bill Nottingham 2.4.7-6 -- remove flags patch at author's request - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Wed Jun 19 2002 Phil Knirsch 2.4.7-4 -- Don't forcibly strip binaries - -* Mon May 27 2002 Phil Knirsch 2.4.7-3 -- Fixed missing diffserv and atm support in config (#57278). -- Fixed inconsistent numeric base problem for command line (#65473). - -* Tue May 14 2002 Phil Knirsch 2.4.7-2 -- Added patch to fix crosscompiling by Adrian Linkins. - -* Fri Mar 15 2002 Phil Knirsch 2.4.7-1 -- Update to latest stable release 2.4.7-now-ss010824. -- Added simple man page for ip. - -* Wed Aug 8 2001 Bill Nottingham -- allow setting of allmulti & promisc flags (#48669) - -* Mon Jul 02 2001 Than Ngo -- fix build problem in beehive if kernel-sources is not installed - -* Fri May 25 2001 Helge Deller -- updated to iproute2-2.2.4-now-ss001007.tar.gz -- bzip2 source tar file -- "License" replaces "Copyright" -- added "BuildPrereq: tetex-latex tetex-dvips psutils" -- rebuilt for 7.2 - -* Tue May 1 2001 Bill Nottingham -- use the system headers - the included ones are broken -- ETH_P_ECHO went away - -* Sat Jan 6 2001 Jeff Johnson -- test for specific KERNEL_INCLUDE directories. - -* Thu Oct 12 2000 Than Ngo -- rebuild for 7.1 - -* Thu Oct 12 2000 Than Ngo -- add default configuration files for iproute (Bug #10549, #18887) - -* Tue Jul 25 2000 Jakub Jelinek -- fix include-glibc/ to cope with glibc 2.2 new resolver headers - -* Thu Jul 13 2000 Prospector -- automatic rebuild - -* Sun Jun 18 2000 Than Ngo -- rebuilt in the new build environment -- use RPM macros -- handle RPM_OPT_FLAGS - -* Sat Jun 03 2000 Than Ngo -- fix iproute to build with new glibc - -* Fri May 26 2000 Ngo Than -- update to 2.2.4-now-ss000305 -- add configuration files - -* Mon Sep 13 1999 Bill Nottingham -- strip binaries - -* Mon Aug 16 1999 Cristian Gafton -- first build +%autochangelog diff --git a/sources b/sources index 641f77b..612487f 100644 --- a/sources +++ b/sources @@ -8,3 +8,4 @@ SHA512 (iproute2-5.17.0.tar.xz) = fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6b SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068 SHA512 (iproute2-6.0.0.tar.xz) = be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a SHA512 (iproute2-6.1.0.tar.xz) = 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28 +SHA512 (iproute2-6.2.0.tar.xz) = b24e0fdd0f51b8b78bc3bb681e3829af47d3011e93f3892289eb070b336709a6883728ecc7627ca37f6449720f8ed1349af321c0d04454894a7175b82f7de151 From 7d1d584693f64c34c203b6a986ab079a12860521 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Sun, 30 Apr 2023 10:56:21 +0200 Subject: [PATCH 091/111] iproute-6.3.0-1.f39 * Sun Apr 30 2023 Andrea Claudi - 6.3.0-1.f39 - New version 6.3.0 (Andrea Claudi) [2192181] Resolves: rhbz#2192181 Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 2 +- sources | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9243517..60a3d0c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /iproute2-6.0.0.tar.xz /iproute2-6.1.0.tar.xz /iproute2-6.2.0.tar.xz +/iproute2-6.3.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 861b294..7c93030 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,6 +1,6 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.2.0 +Version: 6.3.0 Release: %autorelease %if 0%{?rhel} Group: Applications/System diff --git a/sources b/sources index 612487f..59355c7 100644 --- a/sources +++ b/sources @@ -9,3 +9,4 @@ SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de49 SHA512 (iproute2-6.0.0.tar.xz) = be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a SHA512 (iproute2-6.1.0.tar.xz) = 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28 SHA512 (iproute2-6.2.0.tar.xz) = b24e0fdd0f51b8b78bc3bb681e3829af47d3011e93f3892289eb070b336709a6883728ecc7627ca37f6449720f8ed1349af321c0d04454894a7175b82f7de151 +SHA512 (iproute2-6.3.0.tar.xz) = aec1d8ceb54c8849a075ec1ce079678638e05ccaec093e8b3cbc7243b5fafea2a8c11f10930fced3df82f52d6750aa325178e44f9058e37a556ab108d4a968bf From 05c1d08d5dd331a8a49b1089506f554f9377c87d Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Tue, 27 Jun 2023 11:24:06 +0200 Subject: [PATCH 092/111] iproute-6.4.0-1.f39 * Tue Jun 27 2023 Andrea Claudi - 6.4.0-1.f39 - New version 6.4.0 (Andrea Claudi) [2217550] Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 2 +- sources | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 60a3d0c..9cde5f7 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /iproute2-6.1.0.tar.xz /iproute2-6.2.0.tar.xz /iproute2-6.3.0.tar.xz +/iproute2-6.4.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 7c93030..02c3545 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,6 +1,6 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.3.0 +Version: 6.4.0 Release: %autorelease %if 0%{?rhel} Group: Applications/System diff --git a/sources b/sources index 59355c7..e8ae896 100644 --- a/sources +++ b/sources @@ -10,3 +10,4 @@ SHA512 (iproute2-6.0.0.tar.xz) = be30362b0df6906aa786f935d5f555b8b86c747fe053140 SHA512 (iproute2-6.1.0.tar.xz) = 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28 SHA512 (iproute2-6.2.0.tar.xz) = b24e0fdd0f51b8b78bc3bb681e3829af47d3011e93f3892289eb070b336709a6883728ecc7627ca37f6449720f8ed1349af321c0d04454894a7175b82f7de151 SHA512 (iproute2-6.3.0.tar.xz) = aec1d8ceb54c8849a075ec1ce079678638e05ccaec093e8b3cbc7243b5fafea2a8c11f10930fced3df82f52d6750aa325178e44f9058e37a556ab108d4a968bf +SHA512 (iproute2-6.4.0.tar.xz) = 42330be6e061302694ea301765ff8d3cbfaeca4b1d06e39778861e4390ed211c03cb2d41498190202b659f7f5647b1ca4857410ef8c16fd601a35e7162788d21 From b4ab73fd792594877fa458a25fa48abe00bb9ef2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 07:34:48 +0000 Subject: [PATCH 093/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering From d7b1054f529b7d634e4a3ad27d4f6eef95e58177 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 20 Sep 2023 16:21:46 +0200 Subject: [PATCH 094/111] iproute-6.5.0-1.f40 * Wed Sep 20 2023 Andrea Claudi - 6.5.0-1.f40 - New version 6.5.0 (Andrea Claudi) [2237746] Signed-off-by: Andrea Claudi --- .gitignore | 1 + ...CONF_USR_DIR-honours-the-libdir-conf.patch | 48 +++++++++++++++++++ iproute.spec | 14 +++--- sources | 1 + 4 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch diff --git a/.gitignore b/.gitignore index 9cde5f7..36c29bc 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /iproute2-6.2.0.tar.xz /iproute2-6.3.0.tar.xz /iproute2-6.4.0.tar.xz +/iproute2-6.5.0.tar.xz diff --git a/0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch b/0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch new file mode 100644 index 0000000..645a6f9 --- /dev/null +++ b/0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch @@ -0,0 +1,48 @@ +From 358ce5cf068fb9f630a699e94e5aa1498856296a Mon Sep 17 00:00:00 2001 +Message-ID: <358ce5cf068fb9f630a699e94e5aa1498856296a.1695218419.git.aclaudi@redhat.com> +From: Andrea Claudi +Date: Wed, 20 Sep 2023 15:52:51 +0200 +Subject: [PATCH] Makefile: ensure CONF_USR_DIR honours the libdir config + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2237746 +Upstream Status: iproute2.git commit 946753a4 + +commit 946753a4459bd035132a27bb2eb87529c1979b90 +Author: Andrea Claudi +Date: Fri Sep 15 21:59:06 2023 +0200 + + Makefile: ensure CONF_USR_DIR honours the libdir config + + Following commit cee0cf84bd32 ("configure: add the --libdir option"), + iproute2 lib directory is configurable using the --libdir option on the + configure script. However, CONF_USR_DIR does not honour the configured + lib path in its default value. + + This fixes the issue simply using $(LIBDIR) instead of $(PREFIX)/lib. + Please note that the default value for $(LIBDIR) is exactly + $(PREFIX)/lib, so this does not change the default value for + CONF_USR_DIR. + + Fixes: 0a0a8f12fa1b ("Read configuration files from /etc and /usr") + Signed-off-by: Andrea Claudi + Signed-off-by: Stephen Hemminger +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 7d1819ce..54539ce4 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,7 +17,7 @@ endif + PREFIX?=/usr + SBINDIR?=/sbin + CONF_ETC_DIR?=/etc/iproute2 +-CONF_USR_DIR?=$(PREFIX)/lib/iproute2 ++CONF_USR_DIR?=$(LIBDIR)/iproute2 + NETNS_RUN_DIR?=/var/run/netns + NETNS_ETC_DIR?=/etc/netns + DATADIR?=$(PREFIX)/share +-- +2.41.0 + diff --git a/iproute.spec b/iproute.spec index 02c3545..c7e1b80 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,13 +1,13 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.4.0 +Version: 6.5.0 Release: %autorelease %if 0%{?rhel} Group: Applications/System %endif URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz - +Patch0: 0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison @@ -79,8 +79,8 @@ The libnetlink static library. %autosetup -p1 -n %{name}2-%{version} %build -%configure --libdir %{_libdir} -echo -e "\nPREFIX=%{_prefix}\nCONFDIR:=%{_sysconfdir}/iproute2\nSBINDIR=%{_sbindir}" >> config.mk +%configure +echo -e "\nCONFDIR:=%{_libdir}/iproute2\nSBINDIR=%{_sbindir}" >> config.mk %make_build %install @@ -97,11 +97,11 @@ rm -rf '%{buildroot}%{_docdir}' # append deprecated values to rt_dsfield for compatibility reasons %if 0%{?rhel} && ! 0%{?eln} -cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield +cat %{SOURCE1} >>%{buildroot}%{_libdir}/iproute2/rt_dsfield %endif %files -%dir %{_sysconfdir}/iproute2 +%dir %{_libdir}/iproute2 %license COPYING %doc README README.devel %{_mandir}/man7/* @@ -109,7 +109,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* %exclude %{_mandir}/man8/cbq* -%attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/* +%attr(644,root,root) %config(noreplace) %{_libdir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc %exclude %{_sbindir}/routel diff --git a/sources b/sources index e8ae896..6fa712f 100644 --- a/sources +++ b/sources @@ -11,3 +11,4 @@ SHA512 (iproute2-6.1.0.tar.xz) = 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e3738 SHA512 (iproute2-6.2.0.tar.xz) = b24e0fdd0f51b8b78bc3bb681e3829af47d3011e93f3892289eb070b336709a6883728ecc7627ca37f6449720f8ed1349af321c0d04454894a7175b82f7de151 SHA512 (iproute2-6.3.0.tar.xz) = aec1d8ceb54c8849a075ec1ce079678638e05ccaec093e8b3cbc7243b5fafea2a8c11f10930fced3df82f52d6750aa325178e44f9058e37a556ab108d4a968bf SHA512 (iproute2-6.4.0.tar.xz) = 42330be6e061302694ea301765ff8d3cbfaeca4b1d06e39778861e4390ed211c03cb2d41498190202b659f7f5647b1ca4857410ef8c16fd601a35e7162788d21 +SHA512 (iproute2-6.5.0.tar.xz) = 615ba6924becdf08af3f491d347d84897ff0198426d65b194c87146c4527b0856fc51688b59834abe1cb6f9a70b93c66ff7ade6b7c305c1ece0fd6a29df6bc54 From 8760a89e54d403da2bcbdb870dba250ef94dd33b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 23:14:40 +0000 Subject: [PATCH 095/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ff66d681df23a52b7c6a595d37391fcefb2f19c6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 22:53:27 +0000 Subject: [PATCH 096/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f8ce70532360040d0a4cda79080899f71993f69a Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Sat, 10 Feb 2024 00:16:01 +0100 Subject: [PATCH 097/111] iproute-6.7.0-1.f40 * Fri Feb 09 2024 Andrea Claudi - 6.7.0-1.f40 - New version 6.7.0 (Andrea Claudi) [2247875] - Fix FTBFS on ppc64le (Andrea Claudi) [2261250] - Remove libdb-devel dependency from iproute [1788538] - Enable color output by default [2239120] Resolves: rhbz#2247875, rhbz#2261250, rhbz#1788538, #rhbz2239120 Signed-off-by: Andrea Claudi --- .gitignore | 1 + ...CONF_USR_DIR-honours-the-libdir-conf.patch | 48 -------------- ...proute2-fix-build-failure-on-ppc64le.patch | 66 +++++++++++++++++++ iproute.spec | 27 ++------ sources | 15 +---- 5 files changed, 75 insertions(+), 82 deletions(-) delete mode 100644 0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch create mode 100644 0001-iproute2-fix-build-failure-on-ppc64le.patch diff --git a/.gitignore b/.gitignore index 36c29bc..25f8579 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /iproute2-6.3.0.tar.xz /iproute2-6.4.0.tar.xz /iproute2-6.5.0.tar.xz +/iproute2-6.7.0.tar.xz diff --git a/0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch b/0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch deleted file mode 100644 index 645a6f9..0000000 --- a/0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 358ce5cf068fb9f630a699e94e5aa1498856296a Mon Sep 17 00:00:00 2001 -Message-ID: <358ce5cf068fb9f630a699e94e5aa1498856296a.1695218419.git.aclaudi@redhat.com> -From: Andrea Claudi -Date: Wed, 20 Sep 2023 15:52:51 +0200 -Subject: [PATCH] Makefile: ensure CONF_USR_DIR honours the libdir config - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2237746 -Upstream Status: iproute2.git commit 946753a4 - -commit 946753a4459bd035132a27bb2eb87529c1979b90 -Author: Andrea Claudi -Date: Fri Sep 15 21:59:06 2023 +0200 - - Makefile: ensure CONF_USR_DIR honours the libdir config - - Following commit cee0cf84bd32 ("configure: add the --libdir option"), - iproute2 lib directory is configurable using the --libdir option on the - configure script. However, CONF_USR_DIR does not honour the configured - lib path in its default value. - - This fixes the issue simply using $(LIBDIR) instead of $(PREFIX)/lib. - Please note that the default value for $(LIBDIR) is exactly - $(PREFIX)/lib, so this does not change the default value for - CONF_USR_DIR. - - Fixes: 0a0a8f12fa1b ("Read configuration files from /etc and /usr") - Signed-off-by: Andrea Claudi - Signed-off-by: Stephen Hemminger ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 7d1819ce..54539ce4 100644 ---- a/Makefile -+++ b/Makefile -@@ -17,7 +17,7 @@ endif - PREFIX?=/usr - SBINDIR?=/sbin - CONF_ETC_DIR?=/etc/iproute2 --CONF_USR_DIR?=$(PREFIX)/lib/iproute2 -+CONF_USR_DIR?=$(LIBDIR)/iproute2 - NETNS_RUN_DIR?=/var/run/netns - NETNS_ETC_DIR?=/etc/netns - DATADIR?=$(PREFIX)/share --- -2.41.0 - diff --git a/0001-iproute2-fix-build-failure-on-ppc64le.patch b/0001-iproute2-fix-build-failure-on-ppc64le.patch new file mode 100644 index 0000000..1d621e4 --- /dev/null +++ b/0001-iproute2-fix-build-failure-on-ppc64le.patch @@ -0,0 +1,66 @@ +From ac4e9bd66d9c8461024dfd3698e120c678eb6cfc Mon Sep 17 00:00:00 2001 +Message-ID: +From: Andrea Claudi +Date: Fri, 9 Feb 2024 23:56:20 +0100 +Subject: [PATCH] iproute2: fix build failure on ppc64le +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2261250 +Upstream Status: posted upstream + +commit d13ef7c00b60a50a5e8ddbb7ff138399689d3483 +Author: Andrea Claudi +Date: Fri Feb 9 10:44:55 2024 +0100 + + iproute2: fix build failure on ppc64le + + ppc64le build fails with error on ifstat.c when + -Wincompatible-pointer-types is enabled: + + ifstat.c: In function ‘dump_raw_db’: + ifstat.c:323:44: error: initialization of ‘long long unsigned int *’ from incompatible pointer type ‘__u64 *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types] + 323 | unsigned long long *vals = n->val; + + Several other warnings are produced when -Wformat= is set, for example: + + ss.c:3244:34: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] + 3244 | out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt); + | ~~~^ ~~~~~~~~~~~~~~~~~ + | | | + | | __u64 {aka long unsigned int} + | long long unsigned int + | %lu + + This happens because __u64 is defined as long unsigned on ppc64le. As + pointed out by Florian Weimar, we should use -D__SANE_USERSPACE_TYPES__ + if we really want to use long long unsigned in iproute2. + + This fix the build failure and all the warnings without any change on + the code itself. + + Suggested-by: Florian Weimer + Signed-off-by: Andrea Claudi + +Signed-off-by: Andrea Claudi +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 8024d45e..3b9daede 100644 +--- a/Makefile ++++ b/Makefile +@@ -60,7 +60,7 @@ CC := gcc + HOSTCC ?= $(CC) + DEFINES += -D_GNU_SOURCE + # Turn on transparent support for LFS +-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE ++DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__SANE_USERSPACE_TYPES__ + CCOPTS = -O2 -pipe + WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes + WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 +-- +2.43.0 + diff --git a/iproute.spec b/iproute.spec index c7e1b80..7d10d3c 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,13 +1,10 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.5.0 +Version: 6.7.0 Release: %autorelease -%if 0%{?rhel} -Group: Applications/System -%endif URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch0: 0001-Makefile-ensure-CONF_USR_DIR-honours-the-libdir-conf.patch +Patch0: 0001-iproute2-fix-build-failure-on-ppc64le.patch License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison @@ -17,7 +14,6 @@ BuildRequires: gcc BuildRequires: iptables-devel >= 1.4.5 BuildRequires: libbpf-devel BuildRequires: libcap-devel -BuildRequires: libdb-devel BuildRequires: libmnl-devel BuildRequires: libselinux-devel BuildRequires: make @@ -38,9 +34,6 @@ kernel. %package tc Summary: Linux Traffic Control utility -%if 0%{?rhel} -Group: Applications/System -%endif License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{version}-%{release} Provides: /sbin/tc @@ -53,9 +46,6 @@ Linux. %if ! 0%{?_module_build} %package doc Summary: Documentation for iproute2 utilities with examples -%if 0%{?rhel} -Group: Applications/System -%endif License: GPL-2.0-or-later Requires: %{name} = %{version}-%{release} @@ -65,9 +55,6 @@ The iproute documentation contains howtos and examples of settings. %package devel Summary: iproute development files -%if 0%{?rhel} -Group: Development/Libraries -%endif License: GPL-2.0-or-later Requires: %{name} = %{version}-%{release} Provides: iproute-static = %{version}-%{release} @@ -79,8 +66,8 @@ The libnetlink static library. %autosetup -p1 -n %{name}2-%{version} %build -%configure -echo -e "\nCONFDIR:=%{_libdir}/iproute2\nSBINDIR=%{_sbindir}" >> config.mk +%configure --color auto +echo -e "\nSBINDIR=%{_sbindir}" >> config.mk %make_build %install @@ -97,11 +84,11 @@ rm -rf '%{buildroot}%{_docdir}' # append deprecated values to rt_dsfield for compatibility reasons %if 0%{?rhel} && ! 0%{?eln} -cat %{SOURCE1} >>%{buildroot}%{_libdir}/iproute2/rt_dsfield +cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield %endif %files -%dir %{_libdir}/iproute2 +%dir %{_datadir}/iproute2 %license COPYING %doc README README.devel %{_mandir}/man7/* @@ -109,7 +96,7 @@ cat %{SOURCE1} >>%{buildroot}%{_libdir}/iproute2/rt_dsfield %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* %exclude %{_mandir}/man8/cbq* -%attr(644,root,root) %config(noreplace) %{_libdir}/iproute2/* +%attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc %exclude %{_sbindir}/routel diff --git a/sources b/sources index 6fa712f..9522a67 100644 --- a/sources +++ b/sources @@ -1,14 +1 @@ -SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13 -SHA512 (iproute2-5.11.0.tar.xz) = 8d0e7efc20db70af2d344962610b7fb7f464da567f63e094a2e2a9915f6e9087a2282163d2c73eb2065aaec4f0b0cf19614253798153b31e34b06f57e704f3ed -SHA512 (iproute2-5.12.0.tar.xz) = 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac -SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d -SHA512 (iproute2-5.14.0.tar.xz) = e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c -SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 -SHA512 (iproute2-5.17.0.tar.xz) = fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d -SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068 -SHA512 (iproute2-6.0.0.tar.xz) = be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a -SHA512 (iproute2-6.1.0.tar.xz) = 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28 -SHA512 (iproute2-6.2.0.tar.xz) = b24e0fdd0f51b8b78bc3bb681e3829af47d3011e93f3892289eb070b336709a6883728ecc7627ca37f6449720f8ed1349af321c0d04454894a7175b82f7de151 -SHA512 (iproute2-6.3.0.tar.xz) = aec1d8ceb54c8849a075ec1ce079678638e05ccaec093e8b3cbc7243b5fafea2a8c11f10930fced3df82f52d6750aa325178e44f9058e37a556ab108d4a968bf -SHA512 (iproute2-6.4.0.tar.xz) = 42330be6e061302694ea301765ff8d3cbfaeca4b1d06e39778861e4390ed211c03cb2d41498190202b659f7f5647b1ca4857410ef8c16fd601a35e7162788d21 -SHA512 (iproute2-6.5.0.tar.xz) = 615ba6924becdf08af3f491d347d84897ff0198426d65b194c87146c4527b0856fc51688b59834abe1cb6f9a70b93c66ff7ade6b7c305c1ece0fd6a29df6bc54 +SHA512 (iproute2-6.7.0.tar.xz) = 5d8dca139b1b980dac6c841f477b951dd199074cb078b5ea8df23b3532eeb235cca1df9f6628b0f81b7edd62aaf4e95bad15a851843bd61e5715215da97cc546 From 02154c54ad2c3c3f8916a9faad0e0408a212a052 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Tue, 12 Mar 2024 13:23:51 +0100 Subject: [PATCH 098/111] iproute-6.8.0-1.f41 * Tue Mar 12 2024 Andrea Claudi - 6.8.0-1.f41 - New version 6.8.0 (Andrea Claudi) [2269034] Signed-off-by: Andrea Claudi --- .gitignore | 1 + ...proute2-fix-build-failure-on-ppc64le.patch | 66 ------------------- iproute.spec | 4 +- sources | 2 +- 4 files changed, 4 insertions(+), 69 deletions(-) delete mode 100644 0001-iproute2-fix-build-failure-on-ppc64le.patch diff --git a/.gitignore b/.gitignore index 25f8579..3976641 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /iproute2-6.4.0.tar.xz /iproute2-6.5.0.tar.xz /iproute2-6.7.0.tar.xz +/iproute2-6.8.0.tar.xz diff --git a/0001-iproute2-fix-build-failure-on-ppc64le.patch b/0001-iproute2-fix-build-failure-on-ppc64le.patch deleted file mode 100644 index 1d621e4..0000000 --- a/0001-iproute2-fix-build-failure-on-ppc64le.patch +++ /dev/null @@ -1,66 +0,0 @@ -From ac4e9bd66d9c8461024dfd3698e120c678eb6cfc Mon Sep 17 00:00:00 2001 -Message-ID: -From: Andrea Claudi -Date: Fri, 9 Feb 2024 23:56:20 +0100 -Subject: [PATCH] iproute2: fix build failure on ppc64le -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2261250 -Upstream Status: posted upstream - -commit d13ef7c00b60a50a5e8ddbb7ff138399689d3483 -Author: Andrea Claudi -Date: Fri Feb 9 10:44:55 2024 +0100 - - iproute2: fix build failure on ppc64le - - ppc64le build fails with error on ifstat.c when - -Wincompatible-pointer-types is enabled: - - ifstat.c: In function ‘dump_raw_db’: - ifstat.c:323:44: error: initialization of ‘long long unsigned int *’ from incompatible pointer type ‘__u64 *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types] - 323 | unsigned long long *vals = n->val; - - Several other warnings are produced when -Wformat= is set, for example: - - ss.c:3244:34: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] - 3244 | out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt); - | ~~~^ ~~~~~~~~~~~~~~~~~ - | | | - | | __u64 {aka long unsigned int} - | long long unsigned int - | %lu - - This happens because __u64 is defined as long unsigned on ppc64le. As - pointed out by Florian Weimar, we should use -D__SANE_USERSPACE_TYPES__ - if we really want to use long long unsigned in iproute2. - - This fix the build failure and all the warnings without any change on - the code itself. - - Suggested-by: Florian Weimer - Signed-off-by: Andrea Claudi - -Signed-off-by: Andrea Claudi ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 8024d45e..3b9daede 100644 ---- a/Makefile -+++ b/Makefile -@@ -60,7 +60,7 @@ CC := gcc - HOSTCC ?= $(CC) - DEFINES += -D_GNU_SOURCE - # Turn on transparent support for LFS --DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__SANE_USERSPACE_TYPES__ - CCOPTS = -O2 -pipe - WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes - WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 --- -2.43.0 - diff --git a/iproute.spec b/iproute.spec index 7d10d3c..7d04056 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,10 +1,10 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.7.0 +Version: 6.8.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz -Patch0: 0001-iproute2-fix-build-failure-on-ppc64le.patch + License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison diff --git a/sources b/sources index 9522a67..92fbad4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-6.7.0.tar.xz) = 5d8dca139b1b980dac6c841f477b951dd199074cb078b5ea8df23b3532eeb235cca1df9f6628b0f81b7edd62aaf4e95bad15a851843bd61e5715215da97cc546 +SHA512 (iproute2-6.8.0.tar.xz) = 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0 From 741bac7f44dd5c478ae848d0be8e3e2a96c7d41b Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 16 Apr 2024 00:16:12 -0400 Subject: [PATCH 099/111] Fix flatpak build config.mk does not set PREFIX, therefore DATADIR does not set properly either. --- iproute.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iproute.spec b/iproute.spec index 7d04056..f6a3ee4 100644 --- a/iproute.spec +++ b/iproute.spec @@ -67,7 +67,7 @@ The libnetlink static library. %build %configure --color auto -echo -e "\nSBINDIR=%{_sbindir}" >> config.mk +echo -e "\nPREFIX=%{_prefix}\nSBINDIR=%{_sbindir}" >> config.mk %make_build %install From 1110672bf6dafa03c253cdc900ba151d4800bed9 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 23 Jun 2024 22:54:28 -0400 Subject: [PATCH 100/111] Import rt_dsfield.deprecated for ELN builds Without Source1 being present, this cannot build when bootstrapping a new RHEL version (as happened in 10) without manual intervention, which is completely avoidable here. --- iproute.spec | 3 ++- rt_dsfield.deprecated | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 rt_dsfield.deprecated diff --git a/iproute.spec b/iproute.spec index f6a3ee4..edd9380 100644 --- a/iproute.spec +++ b/iproute.spec @@ -4,6 +4,7 @@ Version: 6.8.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +Source1: rt_dsfield.deprecated License: GPL-2.0-or-later AND NIST-PD @@ -83,7 +84,7 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a rm -rf '%{buildroot}%{_docdir}' # append deprecated values to rt_dsfield for compatibility reasons -%if 0%{?rhel} && ! 0%{?eln} +%if 0%{?rhel} cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield %endif diff --git a/rt_dsfield.deprecated b/rt_dsfield.deprecated new file mode 100644 index 0000000..c8eec63 --- /dev/null +++ b/rt_dsfield.deprecated @@ -0,0 +1,17 @@ + +# Deprecated values dropped upstream +# Kept in RHEL for backwards-compatibility +0x00 default +0x10 lowdelay +0x08 throughput +0x04 reliability +# This value overlap with ECT, do not use it! +0x02 mincost +# These values seems do not want to die, Cisco likes them by a strange reason. +0x20 priority +0x40 immediate +0x60 flash +0x80 flash-override +0xa0 critical +0xc0 internet +0xe0 network From 88661651e0059d0fc215a6c8e77e2ef9a82c0b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Apr 2024 15:12:40 +0200 Subject: [PATCH 101/111] Add compat sbin Provides For https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin. A few packages require /usr/sbin/{ip,ss}. --- iproute.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iproute.spec b/iproute.spec index edd9380..7a70541 100644 --- a/iproute.spec +++ b/iproute.spec @@ -26,7 +26,15 @@ BuildRequires: linux-atm-libs-devel %endif Requires: libbpf Requires: psmisc + +# Compat symlinks for Requires in other packages. Provides: /sbin/ip +%if "%{_sbindir}" == "%{_bindir}" +# We rely on filesystem to create the symlink for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/ip +Provides: /usr/sbin/ss +%endif %description The iproute package contains networking utilities (ip and rtmon, for example) From 4a0051fa001c43c4472df8a1682555774750bae6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 10:32:53 +0000 Subject: [PATCH 102/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From d10e375a529986e7519fb6815840461dea7ad3cb Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Tue, 23 Jul 2024 17:01:06 +0200 Subject: [PATCH 103/111] iproute-6.10.0-1.f41 * Tue Jul 23 2024 Andrea Claudi - 6.10.0-1.f41 - New version 6.10.0 (Andrea Claudi) [2298392] Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 3 +-- sources | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3976641..d0de316 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /iproute2-6.5.0.tar.xz /iproute2-6.7.0.tar.xz /iproute2-6.8.0.tar.xz +/iproute2-6.10.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 7a70541..1c7768a 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,12 +1,11 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.8.0 +Version: 6.10.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: rt_dsfield.deprecated - License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison BuildRequires: elfutils-libelf-devel diff --git a/sources b/sources index 92fbad4..73b0974 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (iproute2-6.8.0.tar.xz) = 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0 +SHA512 (iproute2-6.10.0.tar.xz) = 706479aa37a25fcf30c525c6abd85e0861e484d046e0636a28dbc52b958d45c9dba70b912f530dedd4b0b496e4b98969e23501bbbb41d3de50810bae014fcb41 From 052577f9e92734d44adf2a4d7b6fc44de100a1ae Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 27 Nov 2024 16:48:48 +0100 Subject: [PATCH 104/111] iproute-6.12.0-1.f42 * Wed Nov 27 2024 Andrea Claudi - 6.12.0-1.f42 - New version 6.12.0 (Andrea Claudi) [2298392] Signed-off-by: Andrea Claudi --- .gitignore | 27 +-------------------------- iproute.spec | 2 +- sources | 1 + 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index d0de316..a09786c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,3 @@ -/iproute2-4.18.0.tar.xz -/iproute2-4.20.0.tar.xz -/iproute2-5.0.0.tar.xz -/iproute2-5.1.0.tar.xz -/iproute2-5.2.0.tar.xz -/iproute2-5.3.0.tar.xz -/iproute2-5.4.0.tar.xz -/iproute2-5.5.0.tar.xz -/iproute2-5.7.0.tar.xz -/iproute2-5.8.0.tar.xz -/iproute2-5.9.0.tar.xz -/iproute2-5.10.0.tar.xz -/iproute2-5.11.0.tar.xz -/iproute2-5.12.0.tar.xz -/iproute2-5.13.0.tar.xz -/iproute2-5.14.0.tar.xz -/iproute2-5.15.0.tar.xz -/iproute2-5.17.0.tar.xz -/iproute2-5.18.0.tar.xz -/iproute2-6.0.0.tar.xz -/iproute2-6.1.0.tar.xz -/iproute2-6.2.0.tar.xz -/iproute2-6.3.0.tar.xz -/iproute2-6.4.0.tar.xz -/iproute2-6.5.0.tar.xz -/iproute2-6.7.0.tar.xz /iproute2-6.8.0.tar.xz /iproute2-6.10.0.tar.xz +/iproute2-6.12.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 1c7768a..7f7570b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,6 +1,6 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.10.0 +Version: 6.12.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz diff --git a/sources b/sources index 73b0974..7074a5d 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (iproute2-6.8.0.tar.xz) = 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0 SHA512 (iproute2-6.10.0.tar.xz) = 706479aa37a25fcf30c525c6abd85e0861e484d046e0636a28dbc52b958d45c9dba70b912f530dedd4b0b496e4b98969e23501bbbb41d3de50810bae014fcb41 +SHA512 (iproute2-6.12.0.tar.xz) = dbd6afb8162a6086e4be9045b8dc53aa563bd4b7abaf43ee13cd7d493730ff0b90e6985f68c6f42d64f4af6a692d0589e0cefd2f24045ec1c10418cfb73940b2 From 7e1077b3ac5c7c4751fa4b8eaa8bf48ad8bc2d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:31:21 +0100 Subject: [PATCH 105/111] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin From 9fefd19efee268a3b566b554c7cc3cd97509690a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 07:21:19 +0000 Subject: [PATCH 106/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From b5c2466bc330aaeaa9234e8f31349abfbfcc0589 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Mon, 5 May 2025 16:14:12 +0200 Subject: [PATCH 107/111] iproute-6.14.0-1.f43 * Mon May 05 2025 Andrea Claudi - 6.14.0-1.f43 - New version 6.14.0 (Andrea Claudi) [2339037] Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 3 ++- sources | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a09786c..d4a29ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /iproute2-6.8.0.tar.xz /iproute2-6.10.0.tar.xz /iproute2-6.12.0.tar.xz +/iproute2-6.14.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 7f7570b..0e4018a 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,6 +1,6 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.12.0 +Version: 6.14.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz @@ -104,6 +104,7 @@ cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* %exclude %{_mandir}/man8/cbq* +%exclude %{_mandir}/man8/arpd* %attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc diff --git a/sources b/sources index 7074a5d..3e3658e 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ SHA512 (iproute2-6.8.0.tar.xz) = 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0 SHA512 (iproute2-6.10.0.tar.xz) = 706479aa37a25fcf30c525c6abd85e0861e484d046e0636a28dbc52b958d45c9dba70b912f530dedd4b0b496e4b98969e23501bbbb41d3de50810bae014fcb41 SHA512 (iproute2-6.12.0.tar.xz) = dbd6afb8162a6086e4be9045b8dc53aa563bd4b7abaf43ee13cd7d493730ff0b90e6985f68c6f42d64f4af6a692d0589e0cefd2f24045ec1c10418cfb73940b2 +SHA512 (iproute2-6.14.0.tar.xz) = e79049bdca0e0381f0a93a40e4d597ce59fb509dabc6e8b04a510ff9953f091c67577d6faa62967bd197bf62ab6e56d928558270a1390621431acb237b77fa46 From 50f9619fb02bb0e399a594a36f2bebfbe915ba51 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:45:38 +0000 Subject: [PATCH 108/111] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 5659df63b3a54876efaecaa4c59603af43b230db Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 3 Sep 2025 17:31:48 +0200 Subject: [PATCH 109/111] iproute-6.16.0-1.f44 * Wed Sep 03 2025 Andrea Claudi - 6.16.0-1.f44 - New version 6.16.0 (Andrea Claudi) [2368627] Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 26 ++++++++++++++++++++++++-- sources | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d4a29ef..f05cf9e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /iproute2-6.10.0.tar.xz /iproute2-6.12.0.tar.xz /iproute2-6.14.0.tar.xz +/iproute2-6.16.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 0e4018a..58b72f2 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,10 +1,13 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.14.0 +Version: 6.16.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +%if 0%{?rhel} Source1: rt_dsfield.deprecated +Source2: README.etc +%endif License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison @@ -93,9 +96,25 @@ rm -rf '%{buildroot}%{_docdir}' # append deprecated values to rt_dsfield for compatibility reasons %if 0%{?rhel} cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield +mkdir -p %{buildroot}%{_sysconfdir}/iproute2 +cp %{SOURCE2} %{buildroot}%{_sysconfdir}/iproute2/README +cp %{SOURCE2} %{buildroot}%{_datadir}/iproute2/README + +# RHEL-94662: restore /etc/iproute2 conf files, if modified +# this is safe because we don't have conf files in /etc/iproute2 anymore, so +# every *.rpmsave file over there is a leftover from a failed conf upgrade +%posttrans +if [ -f /etc/iproute2/*rpmsave ]; then + for conffile in /etc/iproute2/*rpmsave; do + mv $conffile ${conffile%.rpmsave} + done +fi %endif %files +%if 0%{?rhel} +%dir %{_sysconfdir}/iproute2 +%endif %dir %{_datadir}/iproute2 %license COPYING %doc README README.devel @@ -105,8 +124,11 @@ cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield %exclude %{_mandir}/man8/tc* %exclude %{_mandir}/man8/cbq* %exclude %{_mandir}/man8/arpd* -%attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/* +%attr(644,root,root) %config %{_datadir}/iproute2/* %{_sbindir}/* +%if 0%{?rhel} +%attr(644,root,root) %{_sysconfdir}/iproute2/* +%endif %exclude %{_sbindir}/tc %exclude %{_sbindir}/routel %{_datadir}/bash-completion/completions/devlink diff --git a/sources b/sources index 3e3658e..f39b2df 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ SHA512 (iproute2-6.8.0.tar.xz) = 54e50340a73c8810d69bfd54704b469149731634a97d94d SHA512 (iproute2-6.10.0.tar.xz) = 706479aa37a25fcf30c525c6abd85e0861e484d046e0636a28dbc52b958d45c9dba70b912f530dedd4b0b496e4b98969e23501bbbb41d3de50810bae014fcb41 SHA512 (iproute2-6.12.0.tar.xz) = dbd6afb8162a6086e4be9045b8dc53aa563bd4b7abaf43ee13cd7d493730ff0b90e6985f68c6f42d64f4af6a692d0589e0cefd2f24045ec1c10418cfb73940b2 SHA512 (iproute2-6.14.0.tar.xz) = e79049bdca0e0381f0a93a40e4d597ce59fb509dabc6e8b04a510ff9953f091c67577d6faa62967bd197bf62ab6e56d928558270a1390621431acb237b77fa46 +SHA512 (iproute2-6.16.0.tar.xz) = 88930ea1a3a901594a69dc04e533bfd1de0f5b79f176dedb45f11f01035bd680edccc8e04e56d0922ee430580581c646473a3baa941254739878f7ab946f17df From 6deb8d6715636314fe01afde0c796369c9343d22 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 19 Sep 2025 04:00:55 -0400 Subject: [PATCH 110/111] Import README.etc --- README.etc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 README.etc diff --git a/README.etc b/README.etc new file mode 100644 index 0000000..6fc09c3 --- /dev/null +++ b/README.etc @@ -0,0 +1,16 @@ +You are looking for your iproute2 config in /etc/iproute2 and it's gone? + +Here's an explanation on what's going on: + +From v6.5.0, iproute2 supports stateless configuration pattern. This +means that iproute2 now read its config from /etc/iproute2/FOO, and, +if it does not exist, fall back to /usr/share/iproute2/FOO. + +You can find iproute2 default configuration in /usr/share/iproute2, +while you can store your user-modified config files in /etc/iproute2. + +/usr/share/iproute2 files are not supposed to be manually modified. + +If a previous update broke your user config for iproute2, you may +have one or more ".rpmsave" files in /etc/iproute2. You can restore +your config simply dropping the ".rpmsave" suffix from the file name. From e2fb4f806782daf154762a8e4b63ebaae16349f8 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Wed, 8 Oct 2025 00:31:40 +0200 Subject: [PATCH 111/111] iproute-6.17.0-1.f44 * Wed Oct 08 2025 Andrea Claudi - 6.17.0-1.f44 - New version 6.17.0 (Andrea Claudi) [2400133] - Create /etc/iproute2 for user configuration files (Andrea Claudi) [2343990] Signed-off-by: Andrea Claudi --- .gitignore | 1 + iproute.spec | 14 ++++++-------- sources | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f05cf9e..fd6d31a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /iproute2-6.12.0.tar.xz /iproute2-6.14.0.tar.xz /iproute2-6.16.0.tar.xz +/iproute2-6.17.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 58b72f2..77088b9 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,13 +1,13 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.16.0 +Version: 6.17.0 Release: %autorelease URL: https://kernel.org/pub/linux/utils/net/%{name}2/ Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz %if 0%{?rhel} Source1: rt_dsfield.deprecated -Source2: README.etc %endif +Source2: README.etc License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison @@ -93,16 +93,18 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a # drop these files, iproute-doc package extracts files directly from _builddir rm -rf '%{buildroot}%{_docdir}' +mkdir -p %{buildroot}%{_sysconfdir}/iproute2 +cp %{SOURCE2} %{buildroot}%{_sysconfdir}/iproute2/README + # append deprecated values to rt_dsfield for compatibility reasons %if 0%{?rhel} cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield -mkdir -p %{buildroot}%{_sysconfdir}/iproute2 -cp %{SOURCE2} %{buildroot}%{_sysconfdir}/iproute2/README cp %{SOURCE2} %{buildroot}%{_datadir}/iproute2/README # RHEL-94662: restore /etc/iproute2 conf files, if modified # this is safe because we don't have conf files in /etc/iproute2 anymore, so # every *.rpmsave file over there is a leftover from a failed conf upgrade + %posttrans if [ -f /etc/iproute2/*rpmsave ]; then for conffile in /etc/iproute2/*rpmsave; do @@ -112,9 +114,7 @@ fi %endif %files -%if 0%{?rhel} %dir %{_sysconfdir}/iproute2 -%endif %dir %{_datadir}/iproute2 %license COPYING %doc README README.devel @@ -126,9 +126,7 @@ fi %exclude %{_mandir}/man8/arpd* %attr(644,root,root) %config %{_datadir}/iproute2/* %{_sbindir}/* -%if 0%{?rhel} %attr(644,root,root) %{_sysconfdir}/iproute2/* -%endif %exclude %{_sbindir}/tc %exclude %{_sbindir}/routel %{_datadir}/bash-completion/completions/devlink diff --git a/sources b/sources index f39b2df..9ad54ed 100644 --- a/sources +++ b/sources @@ -3,3 +3,4 @@ SHA512 (iproute2-6.10.0.tar.xz) = 706479aa37a25fcf30c525c6abd85e0861e484d046e063 SHA512 (iproute2-6.12.0.tar.xz) = dbd6afb8162a6086e4be9045b8dc53aa563bd4b7abaf43ee13cd7d493730ff0b90e6985f68c6f42d64f4af6a692d0589e0cefd2f24045ec1c10418cfb73940b2 SHA512 (iproute2-6.14.0.tar.xz) = e79049bdca0e0381f0a93a40e4d597ce59fb509dabc6e8b04a510ff9953f091c67577d6faa62967bd197bf62ab6e56d928558270a1390621431acb237b77fa46 SHA512 (iproute2-6.16.0.tar.xz) = 88930ea1a3a901594a69dc04e533bfd1de0f5b79f176dedb45f11f01035bd680edccc8e04e56d0922ee430580581c646473a3baa941254739878f7ab946f17df +SHA512 (iproute2-6.17.0.tar.xz) = 3d83d49233c1d984f15d285a46e2ec0eeb820c7cb84cfc84866921f37e8a57d31bc3953be07e8c79ed6079f326a25c3a85f591b0d67f9f689c0c70ccdb0fef77