6 Commits

Author SHA256 Message Date
Petr Vorel
8ce3f968d9 iproute2 6.16
Signed-off-by: Petr Vorel <pvorel@suse.cz>
2025-08-11 07:19:11 +02:00
03129c9707 iproute2 6.15 2025-06-02 22:21:21 +02:00
ebba5448a6 iproute2 6.14 2025-04-10 14:44:24 +02:00
524ffd7314 Sensible changelog for end-user 2025-01-22 10:45:23 +01:00
Petr Vorel
ce11e27159 iproute2 6.13
Signed-off-by: Petr Vorel <pvorel@suse.cz>
2025-01-22 07:31:59 +01:00
bd01c10dd4 iproute2 6.10 2024-08-16 11:09:07 +02:00
14 changed files with 287 additions and 384 deletions

View File

@@ -0,0 +1,24 @@
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:31:30 +0100
Subject: add explicit typecast to avoid gcc warning
Patch-mainline: No
---
lib/utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: iproute2-6.3.0/lib/utils.c
===================================================================
--- iproute2-6.3.0.orig/lib/utils.c
+++ iproute2-6.3.0/lib/utils.c
@@ -881,8 +881,8 @@ bool matches(const char *prefix, const c
int inet_addr_match(const inet_prefix *a, const inet_prefix *b, int bits)
{
- const __u32 *a1 = a->data;
- const __u32 *a2 = b->data;
+ const __u32 *a1 = (__u32*)a->data;
+ const __u32 *a2 = (__u32*)b->data;
int words = bits >> 0x05;
bits &= 0x1f;

View File

@@ -0,0 +1,73 @@
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:29:44 +0100
Subject: adjust installation directories for openSUSE/SLE
Patch-mainline: Never, SUSE specific
Match the directory layout of openSUSE and SLE.
---
Makefile | 6 +++---
netem/Makefile | 5 +++--
tc/q_netem.c | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
Index: iproute2-6.7.0/Makefile
===================================================================
--- iproute2-6.7.0.orig/Makefile
+++ iproute2-6.7.0/Makefile
@@ -15,8 +15,8 @@ MAKEFLAGS += --no-print-directory
endif
PREFIX?=/usr
-SBINDIR?=/sbin
-NETNS_RUN_DIR?=/var/run/netns
+SBINDIR?=/usr/sbin
+NETNS_RUN_DIR?=/run/netns
NETNS_ETC_DIR?=/etc/netns
DATADIR?=$(PREFIX)/share
HDRDIR?=$(PREFIX)/include/iproute2
@@ -33,7 +33,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
SHARED_LIBS = y
-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
+DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DPKGDATADIR=\"$(DATADIR)/tc\"
ifneq ($(SHARED_LIBS),y)
DEFINES+= -DNO_SHARED_LIBS
endif
Index: iproute2-6.7.0/netem/Makefile
===================================================================
--- iproute2-6.7.0.orig/netem/Makefile
+++ iproute2-6.7.0/netem/Makefile
@@ -7,6 +7,7 @@ DISTDATA = normal.dist pareto.dist paret
HOSTCC ?= $(CC)
CCOPTS = $(CBUILD_CFLAGS)
LDLIBS += -lm
+LIBDIR = /usr/lib
all: $(DISTGEN) $(DISTDATA)
@@ -23,9 +24,9 @@ stats: stats.c
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
install: all
- mkdir -p $(DESTDIR)$(LIBDIR)/tc
+ mkdir -p $(DESTDIR)/usr/share/tc
for i in $(DISTDATA); \
- do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
+ do install -m 644 $$i $(DESTDIR)/usr/share/tc; \
done
clean:
Index: iproute2-6.7.0/tc/q_netem.c
===================================================================
--- iproute2-6.7.0.orig/tc/q_netem.c
+++ iproute2-6.7.0/tc/q_netem.c
@@ -131,7 +131,7 @@ static int get_distribution(const char *
char *line = NULL;
char name[128];
- snprintf(name, sizeof(name), "%s/%s.dist", get_tc_lib(), type);
+ snprintf(name, sizeof(name), "%s/%s.dist", PKGDATADIR, type);
f = fopen(name, "r");
if (f == NULL) {
fprintf(stderr, "No distribution data for %s (%s: %s)\n",

View File

@@ -1,12 +0,0 @@
#!/bin/bash
echo "Applying patches:"
while read p; do
if patch -p1 -s --no-backup-if-mismatch --fuzz=0 <patches/"$p"; then
echo -e "\t$p"
else
echo "*** Patch $p failed" >&2
exit 1
fi
done

313
guards
View File

@@ -1,313 +0,0 @@
#!/usr/bin/perl -w
#############################################################################
# Copyright (c) 2003-2007,2009 Novell, Inc.
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# 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, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
#############################################################################
#
# Guards:
#
# +xxx include if xxx is defined
# -xxx exclude if xxx is defined
# +!xxx include if xxx is not defined
# -!xxx exclude if xxx is not defined
#
use FileHandle;
use Getopt::Long;
use strict;
# Prototypes
sub files_in($$);
sub parse($$);
sub help();
sub slashme($) {
my ($dir) = @_;
$dir =~ s#([^/])$#$&/#; # append a slash if necessary
if ($dir eq './') {
return '';
} else {
return $dir;
}
}
# Generate a list of files in a directory
#
sub files_in($$) {
my ($dir, $path) = @_;
my $dh = new FileHandle;
my (@files, $file);
# @<file> syntax
if ($path =~ s/^@//) {
my $fh;
open($fh, '<', $path) or die "$path: $!\n";
@files = <$fh>;
close($fh);
chomp(@files);
s:^$dir:: for @files;
return @files;
}
$path = slashme($path);
opendir $dh, length("$dir$path") ? "$dir$path" : '.'
or die "$dir$path: $!\n";
while ($file = readdir($dh)) {
next if $file =~ /^(\.|\.\.|\.#.*|CVS|.*~)$/;
if (-d "$dir$path$file") {
@files = (@files, files_in($dir, "$path$file/"));
} else {
#print "[$path$file]\n";
push @files, "$path$file";
}
}
closedir $dh;
return @files;
}
# Parse a configuration file
# Callback called with ($patch, @guards) arguments
#
sub parse($$) {
my ($fh, $callback) = @_;
my $line = "";
while (<$fh>) {
chomp;
s/(^|\s+)#.*//;
if (s/\\$/ /) {
$line .= $_;
next;
}
$line .= $_;
my @guards = ();
foreach my $token (split /[\s\t\n]+/, $line) {
next if $token eq "";
if ($token =~ /^[-+]/) {
push @guards, $token;
} else {
#print "[" . join(",", @guards) . "] $token\n";
&$callback($token, @guards);
}
}
$line = "";
}
}
# Command line options
#
my ($dir, $config, $default, $check, $list, $invert_match, $with_guards) =
( '', '-', 1, 0, 0, 0, 0);
my @path;
# Help text
#
sub help() {
print "$0 - select from a list of files guarded by conditions\n";
print "SYNOPSIS: $0 [--prefix=dir] [--path=dir1:dir2:...]\n" .
" [--default=0|1] [--check|--list] [--invert-match]\n" .
" [--with-guards] [--config=file] symbol ...\n\n" .
" Defaults: --default=$default\n" .
" Use --path=\@<file> to read the list of entries from <file>\n";
exit 0;
}
# Parse command line options
#
Getopt::Long::Configure ("bundling");
eval {
unless (GetOptions (
'd|prefix=s' => \$dir,
'c|config=s' => \$config,
'C|check' => \$check,
'l|list' => \$list,
'w|with-guards' => \$with_guards,
'p|path=s' => \@path,
'D|default=i' => \$default,
'v|invert-match' => \$invert_match,
'h|help' => sub { help(); exit 0; })) {
help();
exit 1;
}
};
if ($@) {
print "$@";
help();
exit 1;
}
@path = ('.')
unless (@path);
@path = split(/:/, join(':', @path));
my $fh = ($config eq '-') ? \*STDIN : new FileHandle($config)
or die "$config: $!\n";
$dir = slashme($dir);
if ($check) {
# Check for duplicate files, or for files that are not referenced by
# the specification.
my $problems = 0;
my @files;
foreach (@path) {
@files = (@files, files_in($dir, $_));
}
my %files = map { $_ => 0 } @files;
parse($fh, sub {
my ($patch, @guards) = @_;
if (exists $files{$patch}) {
$files{$patch}++;
} else {
if ($config eq '-') {
print "Not found: $dir$patch\n";
} else {
print "In $config but not found: $dir$patch\n";
}
$problems++;
}});
$fh->close();
my ($file, $ref);
while (($file, $ref) = each %files) {
next if $ref == 1;
if ($ref == 0) {
if ($config eq '-') {
print "Unused: $file\n";
} else {
print "Not in $config: $file\n";
}
$problems++;
}
if ($ref > 1) {
print "Warning: multiple uses";
print " in $config" if $config ne '-';
print ": $file\n";
# This is not an error if the entries are mutually exclusive...
}
}
exit $problems ? 1 : 0;
} elsif ($list) {
parse($fh, sub {
my ($patch, @guards) = @_;
print join(' ', @guards), ' '
if (@guards && $with_guards);
print "$dir$patch\n";
});
} else {
# Generate a list of patches to apply.
my %symbols = map { $_ => 1 } @ARGV;
parse($fh, sub {
my ($patch, @guards) = @_;
my $selected;
if (@guards) {
# If the first guard is -xxx, the patch is included by default;
# if it is +xxx, the patch is excluded by default.
$selected = ($guards[0] =~ /^-/);
foreach (@guards) {
/^([-+])(!?)(.*)?/
or die "Bad guard '$_'\n";
# Check if the guard matches
if (($2 eq '!' && !exists $symbols{$3}) ||
($2 eq '' && ( $3 eq '' || exists $symbols{$3}))) {
# Include or exclude
$selected = ($1 eq '+');
}
}
} else {
# If there are no guards, use the specified default result.
$selected = $default;
}
print "$dir$patch\n"
if $selected ^ $invert_match;
});
$fh->close();
exit 0;
}
__END__
=head1 NAME
guards - select from a list of files guarded by conditions
=head1 SYNOPSIS
F<guards> [--prefix=F<dir>] [--path=F<dir1:dir2:...>] [--default=<0|1>]
[--check|--list] [--invert-match] [--with-guards] [--config=<file>]
I<symbol> ...
=head1 DESCRIPTION
The script reads a configuration file that may contain so-called guards, file
names, and comments, and writes those file names that satisfy all guards to
standard output. The script takes a list of symbols as its arguments. Each line
in the configuration file is processed separately. Lines may start with a
number of guards. The following guards are defined:
=over
+I<xxx> Include the file(s) on this line if the symbol I<xxx> is defined.
-I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is defined.
+!I<xxx> Include the file(s) on this line if the symbol I<xxx> is not defined.
-!I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is not defined.
- Exclude this file. Used to avoid spurious I<--check> messages.
=back
The guards are processed left to right. The last guard that matches determines
if the file is included. If no guard is specified, the I<--default>
setting determines if the file is included.
If no configuration file is specified, the script reads from standard input.
The I<--check> option is used to compare the specification file against the
file system. If files are referenced in the specification that do not exist, or
if files are not enlisted in the specification file warnings are printed. The
I<--path> option can be used to specify which directory or directories to scan.
Multiple directories are separated by a colon (C<:>) character. The
I<--prefix> option specifies the location of the files. Alternatively, the
I<--path=@E<lt>fileE<gt>> syntax can be used to specify a file from which the
file names will be read.
Use I<--list> to list all files independent of any rules. Use I<--invert-match>
to list only the excluded patches. Use I<--with-guards> to also include all
inclusion and exclusion rules.
=head1 AUTHOR
Andreas Gruenbacher <agruen@suse.de>, SUSE Labs

Binary file not shown.

BIN
iproute2-6.12.0.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
iproute2-6.16.0.tar.sign Normal file

Binary file not shown.

BIN
iproute2-6.16.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,29 +1,110 @@
-------------------------------------------------------------------
Wed Apr 16 21:19:44 UTC 2025 - Michal Kubecek <mkubecek@suse.cz>
Mon Aug 11 05:11:09 UTC 2025 - Petr Vorel <pvorel@suse.cz>
- add post-6.12 upstream fixes (bsc#1241316)
* ip-fix-memory-leak-in-do_show.patch
* devlink-do-dry-parse-for-extended-handle-with-select.patch
* devlink-use-the-correct-handle-flag-for-port-param-s.patch
- Update to release 6.16
https://lore.kernel.org/netdev/20250803143154.2d700ad4@hermes.local/
* bond: fix stack smash in xstats
* tc: Parse FQ band weights correctly
-------------------------------------------------------------------
Wed Apr 16 20:48:41 UTC 2025 - Michal Kubecek <mkubecek@suse.cz>
Mon Jun 2 19:43:40 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- update to upstream version 6.12 (jsc#PED-11361)
* for detailed list of changes between 6.3 and 6.12 see Factory
package changelog
* replace upstream tarball and signature
* update specfile with changes from Factory package
* refresh non-upstream patches
- adjust-installation-directories-for-openSUSE-SLE.patch
- use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch
- add-explicit-typecast-to-avoid-gcc-warning.patch
- split-link-and-compile-steps-for-binaries.patch
- adapt the package for git based patch tracking
* move patches into patches.tar.xz
* add helper scripts apply-patches and guards
* add series.conf file listing patches
* update iproute2.spec to apply patches from patches.tar.xz
- Update to release 6.15
* tc_util: Add support for 64-bit hardware packets counter
* iprule: Allow specifying ports in hexadecimal notation
* iprule: Add port mask support
* iprule: Add DSCP mask support
-------------------------------------------------------------------
Thu Apr 10 12:40:43 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.14
* Add IPv6 flow label support to `ip route` and `ip rule`
* Add `ip monitor maddress` support
* ss: Display seq counters as decimal for mptcp subflows
-------------------------------------------------------------------
Wed Jan 22 06:24:17 UTC 2025 - Petr Vorel <pvorel@suse.cz>
- Update to release 6.13
* ip rule: added DSCP support
* ip: added "down" filter for ``ip addr/link show``
* rdma: added support for ``monitor`` subcommand
* tc: added support for Hold/Release mechanism in TSN as per
IEEE 802.1Q-2018
* vdpa: added support for setting the MAC address in vDPA tool
-------------------------------------------------------------------
Fri Aug 16 09:06:40 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.10
* ip: ipnexthop: Support dumping next hop group stats
* ip: Support filter links with no VF info
* ip: PFCP device support
* ip link: hsr: Add support for passing information about
INTERLINK device
-------------------------------------------------------------------
Thu May 16 07:42:58 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.9
* ss: add option to suppress queue columns
* m_mirred: allow mirred to block
* tc: add NLM_F_ECHO support for actions and filters
* ip/bond: add coupled_control support
* ss: add support for BPF socket-local storage
* ip: ioam6: add monitor command
-------------------------------------------------------------------
Wed Mar 13 14:41:18 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.8
* ip, link: Add support for netkit (a veth-like netdev with
BPF-programmable transmit queue)
* ip route: add support for TCP microsecond timestamp
* bridge: mdb: add flush support
-------------------------------------------------------------------
Wed Jan 31 18:09:41 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.7
* devlink: Support setting port function ipsec_crypto cap and
ipsec_packet cap
* iplink: bridge: Add support for bridge FDB learning limits
* bridge: fdb: support match on source VNI, nexthop ID,
destination VNI, destination port, destination IP address and
[no]router flag in the flush command
* bridge: mdb: Add get support
-------------------------------------------------------------------
Thu Nov 30 22:40:27 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.6
* bridge: Add backup nexthop ID support
* tc: Classifier support for SPI field
* tc: support the netem seed parameter for loss and corruption
events
* tc: remove support for CBQ
* tc: remove support for RSVP classifier
* tc: remove tcindex classifier
* tc: remove dsmark qdisc
* tc: drop support for ATM qdisc
-------------------------------------------------------------------
Tue Sep 12 14:22:29 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.5
* rdma: Report device protocol
* ip: error out if iplink does not consume all options
-------------------------------------------------------------------
Fri Jul 14 11:44:38 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Update to release 6.4
* bridge: mdb: added underlay destination IP support, UDP
destination port support, destination VNI support, source VNI
support, outgoing interface support
* macvlan: added the "bclim" parameter
-------------------------------------------------------------------
Thu May 4 07:20:24 UTC 2023 - Paolo Stivanin <info@paolostivanin.com>

View File

@@ -15,22 +15,16 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# ---------------------------------------------------------------------------
# Contents of this package is exported from git repository; please submit
# your changes via https://gitlab.suse.de/mkubecek/iproute2-source or
# gitlab@gitlab.suse.de:mkubecek/iproute2-source.git rather than to IBS.
# ---------------------------------------------------------------------------
%define _buildshell /bin/bash
Name: iproute2
Version: 6.12
Version: 6.16
Release: 0
Summary: Linux network configuration utilities
License: GPL-2.0-only
Group: Productivity/Networking/Routing
URL: https://wiki.linuxfoundation.org/networking/iproute2
# Using GPL-2.0 instead of GPL-2.0+ because of tc_skbedit.h and tc/q_multiq.c
#DL-URL: https://kernel.org/pub/linux/utils/net/iproute2/
#Git-Clone: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/
#Git-Mirror: https://github.com/shemminger/iproute2 ## not regularly updated
@@ -38,10 +32,10 @@ Source: https://kernel.org/pub/linux/utils/net/iproute2/%name-%version.0
Source2: https://kernel.org/pub/linux/utils/net/iproute2/%name-%version.0.tar.sign
Source3: %name.tmpfiles
Source9: %name.keyring
Source11: patches.tar.xz
Source12: series.conf
Source13: guards
Source14: apply-patches
Patch1: adjust-installation-directories-for-openSUSE-SLE.patch
Patch2: use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch
Patch3: add-explicit-typecast-to-avoid-gcc-warning.patch
Patch6: split-link-and-compile-steps-for-binaries.patch
BuildRequires: bison
BuildRequires: db-devel
BuildRequires: fdupes
@@ -79,9 +73,9 @@ New programs should use libmnl-devel instead.
Summary: Bash completion for iproute
License: GPL-2.0-or-later
Group: System/Shells
Requires: %{name}
Requires: %name
Requires: bash-completion
Supplements: (%{name} and bash-completion)
Supplements: (%name and bash-completion)
%description bash-completion
bash command line completion support for iproute.
@@ -90,7 +84,7 @@ bash command line completion support for iproute.
Summary: Userspace ARP daemon
License: GPL-2.0-only
Group: Productivity/Networking/Routing
Provides: iproute2:%{_sbindir}/arpd
Provides: iproute2:%_sbindir/arpd
%description arpd
The arpd daemon collects gratuitous ARP information, saving it on
@@ -99,9 +93,7 @@ broadcasting due to limited standard size (512..1024 entries,
depending on type) of the kernel ARP cache.
%prep
%setup -n %{name}-%{version}.0 -a 11
chmod a+rx %{SOURCE13} %{SOURCE14}
%{SOURCE13} <%{SOURCE12} | %{SOURCE14} && rm -rf patches
%autosetup -p1 -n %name-%version.0
find . -name *.orig -delete
@@ -129,7 +121,7 @@ chmod -x "$b/%_libdir/libnetlink.a"
install -pm0644 "include/libnetlink.h" "$b/%_includedir/"
chmod -x "$b/%_includedir/libnetlink.h"
install -Dm0644 "%SOURCE3" "$b/%_tmpfilesdir/%name.conf"
%if 0%{?usrmerged} || (0%{?suse_version} >= 1550)
%if 0%{?suse_version} >= 1550
ln -sf "%_sbindir/ip" "$b/%_bindir/ip"
%else
ln -s "%_sbindir/ip" "$b/sbin/"
@@ -164,7 +156,7 @@ EOF
%_tmpfilesdir/%name.conf
%ghost %dir %_rundir/netns
%exclude %_sbindir/arpd
%if 0%{?usrmerged} || (0%{?suse_version} >= 1550)
%if 0%{?suse_version} >= 1550
%_bindir/ip
%else
/sbin/*
@@ -173,7 +165,7 @@ EOF
%_mandir/man7/*
%_mandir/man8/*
%exclude %_mandir/man8/arpd.8*
%{_datadir}/iproute2/
%_datadir/iproute2/
%_libdir/tc/
%_datadir/tc/
%_docdir/%name/

BIN
patches.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,12 +0,0 @@
# generated by scripts/import-patches
# upstream 6.13
ip-fix-memory-leak-in-do_show.patch
devlink-do-dry-parse-for-extended-handle-with-select.patch
devlink-use-the-correct-handle-flag-for-port-param-s.patch
# out of tree patches
adjust-installation-directories-for-openSUSE-SLE.patch
use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch
add-explicit-typecast-to-avoid-gcc-warning.patch
split-link-and-compile-steps-for-binaries.patch

View File

@@ -0,0 +1,49 @@
From: Marcus Meissner <meissner@suse.com>
Date: Sat, 10 Jun 2017 14:29:22 +0000
Subject: split link and compile steps for binaries
Patch-mainline: Submitted - 20170804
Do not compile and link in one step so that CFLAGS and LDFLAGS are only
applied to the phase they are intended for. This is needed for PIE default
to work.
---
misc/Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Index: iproute2-6.3.0/misc/Makefile
===================================================================
--- iproute2-6.3.0.orig/misc/Makefile
+++ iproute2-6.3.0/misc/Makefile
@@ -9,23 +9,24 @@ include ../config.mk
ifeq ($(HAVE_BERKELEY_DB),y)
TARGETS += arpd
endif
+CFLAGS += -I$(DBM_INCLUDE)
all: $(TARGETS)
ss: $(SSOBJ)
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
-nstat: nstat.c
- $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o nstat nstat.c $(LDLIBS) -lm
+nstat: nstat.o
+ $(QUIET_CC)$(CC) $(LDFLAGS) -o nstat nstat.o $(LDLIBS) -lm
-ifstat: ifstat.c
- $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LDLIBS) -lm
+ifstat: ifstat.o
+ $(QUIET_CC)$(CC) $(LDFLAGS) -o ifstat ifstat.o $(LDLIBS) -lm
-rtacct: rtacct.c
- $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LDLIBS) -lm
+rtacct: rtacct.o
+ $(QUIET_CC)$(CC) $(LDFLAGS) -o rtacct rtacct.o $(LDLIBS) -lm
-arpd: arpd.c
- $(QUIET_CC)$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(CPPFLAGS) $(LDFLAGS) -o arpd arpd.c $(LDLIBS) -ldb
+arpd: arpd.o
+ $(QUIET_CC)$(CC) $(LDFLAGS) -o arpd arpd.o $(LDLIBS) -ldb
ssfilter.tab.c: ssfilter.y
$(QUIET_YACC)$(YACC) -b ssfilter ssfilter.y

View File

@@ -0,0 +1,24 @@
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:30:15 +0100
Subject: use sysconf(_SC_CLK_TCK) if HZ undefined
Patch-mainline: No
---
lib/utils.c | 4 ++++
1 file changed, 4 insertions(+)
Index: iproute2-6.6.0/lib/utils.c
===================================================================
--- iproute2-6.6.0.orig/lib/utils.c
+++ iproute2-6.6.0/lib/utils.c
@@ -138,6 +138,10 @@ int get_long(long *val, const char *arg,
return 0;
}
+#ifndef HZ
+#define HZ sysconf(_SC_CLK_TCK)
+#endif
+
int get_integer(int *val, const char *arg, int base)
{
long res;