clean up the patches

This commit is contained in:
Pavel Šimerda 2015-04-09 15:41:57 +02:00
parent 4c8bebf141
commit cfb7669cf6
20 changed files with 2619 additions and 334 deletions

View File

@ -8,17 +8,66 @@ 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
Patch0: man-pages.patch
Patch1: iproute2-3.4.0-kernel.patch
Patch2: iproute2-3.15.0-optflags.patch
Patch3: iproute2-3.9.0-IPPROTO_IP_for_SA.patch
Patch4: iproute2-example-cbq-service.patch
Patch5: iproute2-2.6.35-print-route.patch
Patch6: iproute2-3.12.0-lnstat-dump-to-stdout.patch
# Rejected by upstream <http://thread.gmane.org/gmane.linux.network/284101>
Patch7: iproute2-3.11.0-tc-ok.patch
Patch8: iproute2-3.11.0-rtt.patch
Patch9: iproute2-3.12.0-lnstat-interval.patch
# Selective git diff between release and master. Updating this pachage
# using current may require updating one or more of the subsequent
# patches.
#
# git diff v3.19.0..master man
Patch0: iproute2-3.19.0-diff.patch
# manpage/help improvements
#
# https://bugzilla.redhat.com/show_bug.cgi?id=1072441
# https://bugzilla.redhat.com/show_bug.cgi?id=1075692
# https://bugzilla.redhat.com/show_bug.cgi?id=1077191
# https://bugzilla.redhat.com/show_bug.cgi?id=1105438
# https://bugzilla.redhat.com/show_bug.cgi?id=1121261
#
# TODO submit upstream
Patch1: iproute2-3.19.0-docs.patch
# build system improvements
#
# (no bugzilla tickets)
#
# TODO submit upstream
Patch2: iproute2-3.19.0-build.patch
# ip-xfrm: support 'proto any' with 'sport' and 'dport'
#
# https://bugzilla.redhat.com/show_bug.cgi?id=497355
#
# TODO: submit upstream
Patch3: iproute2-3.19.0-proto-any.patch
# cbq: fix find syntax in example
#
# https://bugzilla.redhat.com/show_bug.cgi?id=539232
#
# TODO: submit upstream
Patch4: iproute2-3.19.0-cbq-example.patch
# ip-route: don't hide routes with RTM_F_CLONED by default
#
# (no bugzilla ticket)
#
# TODO: submit upstream
Patch5: iproute2-3.19.0-route-cloned.patch
# lnstat: dump to stdout, not stderr
#
# TODO: submit upstream
Patch6: iproute2-3.19.0-lnstat-stdout.patch
# lnstat: run indefinitely by default
#
# https://bugzilla.redhat.com/show_bug.cgi?id=977845
#
# TODO: submit upstream
Patch7: iproute2-3.19.0-lnstat-interval.patch
# tc: add -OK option
#
# http://thread.gmane.org/gmane.linux.network/284101
#
# Rejected by upstream.
#
# TODO: Retry upstreaming and decide whether it's needed in Fedora.
Patch8: iproute2-3.11.0-tc-ok.patch
License: GPLv2+ and Public Domain
BuildRequires: bison
BuildRequires: flex
@ -63,18 +112,17 @@ The libnetlink static library.
%prep
%setup -q -n %{name}2-%{version}
%patch0 -p1
%patch1 -p1 -b .kernel
%patch2 -p1 -b .opt_flags
%patch3 -p1 -b .ipproto
%patch4 -p1 -b .fix_cbq
%patch5 -p1 -b .print-route
%patch6 -p1 -b .lnstat-dump-to-stdout
%patch7 -p1 -b .tc_ok
%patch8 -p1 -b .rtt
%patch9 -p1 -b .lnstat-interval
sed -i 's/^LIBDIR=/LIBDIR?=/' Makefile
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
export CFLAGS="%{optflags}"
export LIBDIR=/%{_libdir}
export IPT_LIB_DIR=/%{_lib}/xtables
./configure
@ -82,6 +130,8 @@ make %{?_smp_mflags}
make -C doc
%install
# TODO: Update upstream build system so that we don't need to handle
# installation manually.
mkdir -p \
%{buildroot}%{_includedir} \
%{buildroot}%{_sbindir} \

View File

@ -1,13 +0,0 @@
diff --git a/ip/iproute.c b/ip/iproute.c
index 711576e..86c7ab7 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
ip6_multiple_tables = 1;
- if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
+ if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
return 0;
if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {

View File

@ -1,13 +0,0 @@
diff --git a/lib/utils.c b/lib/utils.c
index dae1b51..8a1a65d 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -165,8 +165,6 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw)
t = (double)res;
}
- if (p == arg)
- return -1;
*raw = 1;
if (*p) {

View File

@ -1,13 +0,0 @@
diff --git a/misc/lnstat.c b/misc/lnstat.c
index d6415ef..8608cfa 100644
--- a/misc/lnstat.c
+++ b/misc/lnstat.c
@@ -351,7 +351,7 @@ int main(int argc, char **argv)
switch (mode) {
case MODE_DUMP:
- lnstat_dump(stderr, lnstat_files);
+ lnstat_dump(stdout, lnstat_files);
break;
case MODE_NORMAL:

View File

@ -1,34 +0,0 @@
diff --git a/misc/lnstat.c b/misc/lnstat.c
index 8608cfa..8e8b1ba 100644
--- a/misc/lnstat.c
+++ b/misc/lnstat.c
@@ -253,7 +253,7 @@ int main(int argc, char **argv)
MODE_JSON,
MODE_NORMAL,
} mode = MODE_NORMAL;
- unsigned long count = 1;
+ unsigned long count = 0;
struct table_hdr *header;
static struct field_params fp;
int num_req_files = 0;
@@ -366,7 +366,7 @@ int main(int argc, char **argv)
if (interval < 1 )
interval = 1;
- for (i = 0; i < count; i++) {
+ for (i = 0; i < count || !count; ) {
lnstat_update(lnstat_files);
if (mode == MODE_JSON)
print_json(stdout, lnstat_files, &fp);
@@ -377,8 +377,10 @@ int main(int argc, char **argv)
print_line(stdout, lnstat_files, &fp);
}
fflush(stdout);
- if (i < count - 1)
+ if (i < count - 1 || !count)
sleep(interval);
+ if (count)
+ ++i;
}
break;
}

View File

@ -1,13 +0,0 @@
diff --git a/Makefile b/Makefile
index c881200..e8eeeb7 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ CCOPTS = -O2
WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
+CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(RPM_OPT_FLAGS)
YACCFLAGS = -d -t -v
SUBDIRS=lib ip tc bridge misc netem genl man

View File

@ -1,35 +0,0 @@
From f1b66ff83a0babbe99fef81b3a960d7a4ce8dbc6 Mon Sep 17 00:00:00 2001
From: vadimk <vadim4j@gmail.com>
Date: Sat, 30 Aug 2014 15:06:00 +0300
Subject: [PATCH] ip link: Remove unnecessary device checking
The real checking is performed later in iplink_modify(..) func which
checks device existence if NLM_F_CREATE flag is set.
Also it fixes the case when impossible to add veth link which was
caused by 9a02651a87 (ip: check for missing dev arg when doing VF rate)
because these devices are not exist yet.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
ip/iplink.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index 1a907d9..ea06871 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -593,8 +593,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
duparg2("dev", *argv);
*dev = *argv;
dev_index = ll_name_to_index(*dev);
- if (dev_index == 0)
- invarg("Unknown device", *argv);
}
argc--; argv++;
}
--
2.1.0

View File

@ -0,0 +1,66 @@
From af8fba0402dda8e459399542d19d5a9afebe71b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Fri, 13 Mar 2015 13:17:02 +0100
Subject: [PATCH 2/7] turn Makefile more distribution friendly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Changes:
* Accept directory settings from environment.
* Remove redundant ROOTDIR variable.
* Set KERNEL_INCLUDE default to '/usr/include'.
* Use CFLAGS from environemnt.
Note: In the long term it might be better to improve the configure
script to generate those parts of the Makefile in a manner similar
to autoconf. It might be even practical to autotoolize the package.
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
---
Makefile | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 9dbb29f..18faee4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
-ROOTDIR=$(DESTDIR)
-PREFIX=/usr
-LIBDIR=$(PREFIX)/lib
-SBINDIR=/sbin
-CONFDIR=/etc/iproute2
-DATADIR=$(PREFIX)/share
-DOCDIR=$(DATADIR)/doc/iproute2
-MANDIR=$(DATADIR)/man
-ARPDDIR=/var/lib/arpd
+PREFIX?=/usr
+LIBDIR?=$(PREFIX)/lib
+SBINDIR?=/sbin
+CONFDIR?=/etc/iproute2
+DATADIR?=$(PREFIX)/share
+DOCDIR?=$(DATADIR)/doc/iproute2
+MANDIR?=$(DATADIR)/man
+ARPDDIR?=/var/lib/arpd
+KERNEL_INCLUDE?=/usr/include
# Path to db_185.h include
-DBM_INCLUDE:=$(ROOTDIR)/usr/include
+DBM_INCLUDE:=$(DESTDIR)/usr/include
SHARED_LIBS = y
@@ -33,7 +33,7 @@ CCOPTS = -O2
WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
+CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS)
YACCFLAGS = -d -t -v
SUBDIRS=lib ip tc bridge misc netem genl man
--
2.0.5

View File

@ -0,0 +1,59 @@
From ee92ed5c996f95e1f14da3945cb8f92becbfdf2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Fri, 13 Mar 2015 13:17:03 +0100
Subject: [PATCH 4/7] cbq: fix find syntax in example
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Without modification, using the example resulted in the following error:
[root@localhost sbin]# cbq restart
find: warning: you have specified the -maxdepth option after a
non-option argument (, but options are not positional (-maxdepth affects
tests specified before it as well as those specified after it). Please
specify options before other arguments.
find: warning: you have specified the -maxdepth option after a
non-option argument (, but options are not positional (-maxdepth affects
tests specified before it as well as those specified after it). Please
specify options before other arguments.
**CBQ: failed to compile CBQ configuration!
See also:
* https://bugzilla.redhat.com/show_bug.cgi?id=539232
Reported-By: Mads Kiilerich <mads@kiilerich.com>
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
---
examples/cbq.init-v0.7.3 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/cbq.init-v0.7.3 b/examples/cbq.init-v0.7.3
index 35a0a05..1bc0d44 100644
--- a/examples/cbq.init-v0.7.3
+++ b/examples/cbq.init-v0.7.3
@@ -578,14 +578,14 @@ cbq_show () {
### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1
cbq_init () {
### Get a list of configured classes
- CLASSLIST=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
- -not -name '*~' -maxdepth 1 -printf "%f\n"| sort`
+ CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
+ -not -name '*~' -printf "%f\n"| sort`
[ -z "$CLASSLIST" ] &&
cbq_failure "no configuration files found in $1!"
### Gather all DEVICE fields from $1/cbq-*
- DEVFIELDS=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
- -not -name '*~' -maxdepth 1| xargs sed -n 's/#.*//; \
+ DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
+ -not -name '*~' | xargs sed -n 's/#.*//; \
s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \
{ s/.*=//; p; }'| sort -u`
[ -z "$DEVFIELDS" ] &&
--
2.0.5

1621
iproute2-3.19.0-diff.patch Normal file

File diff suppressed because it is too large Load Diff

643
iproute2-3.19.0-docs.patch Normal file
View File

@ -0,0 +1,643 @@
From 040b1593cf1fe8ff51d55e1e7a1ace8631fbbad9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Thu, 2 Apr 2015 15:53:11 +0200
Subject: [PATCH 1/7] docs: improve manual pages and help
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 43d29f7 substantially improves generated ip-address.8 instead of
ip-address.8.in and commit e419f2d removes the generated one losing the
improvements entirely. This commit recovers the lost changes, adapts
them to the current manual page and adds more man page and help
improvements.
Based on previous work by:
* Kenyon Ralph <kenyon@kenyonralph.com>
ip link:
* Add VLAN documentation.
* Fix srcport/dstport in VXLAN documentation.
ip address:
* Improve manual page synopsis and built-it help.
* Use full subcommand names (e.g. 'address' and 'maddress').
* Specify when IPv4, IPv6 or both are affected.
* Add lifetimes, home and nodad.
* Reduce left over double spaces.
ip route:
* Prefer 'show' over 'list' for consistency.
ip rule:
* Remove false statement about Rule 0.
ip tunnel:
* Improve manual page synopsis and built-it help.
ifcfg:
* Add manual page.
bridge fdb:
* Fix fdb synopsis.
tc qdisc:
* Add cbq manual page alias.
Changes (ss):
* Turn Debian specific statement into a general one.
* Refer to .ps docs instead of .html.
See also:
* https://bugzilla.redhat.com/show_bug.cgi?id=1072441
* https://bugzilla.redhat.com/show_bug.cgi?id=1075692
* https://bugzilla.redhat.com/show_bug.cgi?id=1077191
* https://bugzilla.redhat.com/show_bug.cgi?id=1105438
* https://bugzilla.redhat.com/show_bug.cgi?id=1121261
Signed-Off-By: Pavel Å imerda <psimerda@redhat.com>
---
bridge/fdb.c | 8 ++--
doc/ip-cref.tex | 3 --
ip/ip.c | 4 +-
ip/ipaddress.c | 16 +++----
man/man8/bridge.8 | 6 +--
man/man8/cbq.8 | 1 +
man/man8/ifcfg.8 | 57 ++++++++++++++++++++++
man/man8/ip-address.8.in | 120 ++++++++++++++++++++++++++++++++++++-----------
man/man8/ip-link.8.in | 25 +++++++++-
man/man8/ip-route.8.in | 2 +-
man/man8/ip-rule.8 | 2 -
man/man8/ip-tunnel.8 | 6 +--
man/man8/ip.8 | 6 +--
man/man8/ss.8 | 4 +-
14 files changed, 200 insertions(+), 60 deletions(-)
create mode 100644 man/man8/cbq.8
create mode 100644 man/man8/ifcfg.8
diff --git a/bridge/fdb.c b/bridge/fdb.c
index 3c33e22..1fec09a 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -31,10 +31,10 @@ static unsigned int filter_index;
static void usage(void)
{
- fprintf(stderr, "Usage: bridge fdb { add | append | del | replace } ADDR dev DEV {self|master} [ temp ]\n"
- " [router] [ dst IPADDR] [ vlan VID ]\n"
- " [ port PORT] [ vni VNI ] [via DEV]\n");
- fprintf(stderr, " bridge fdb {show} [ br BRDEV ] [ brport DEV ]\n");
+ fprintf(stderr, "Usage: bridge fdb { add | append | del } LLADDR dev DEV { local | temp }\n"
+ " [ self ] [ embedded ] [ router ] [ dst IPADDR ]\n"
+ " [ vni VNI ] [ port PORT ] [ via DEVICE ]\n");
+ fprintf(stderr, " bridge fdb show [ br BRDEV ] [ brport DEV ]\n");
exit(-1);
}
diff --git a/doc/ip-cref.tex b/doc/ip-cref.tex
index e7a79a5..c938a2f 100644
--- a/doc/ip-cref.tex
+++ b/doc/ip-cref.tex
@@ -2038,9 +2038,6 @@ table \verb|local| (ID 255).
The \verb|local| table is a special routing table containing
high priority control routes for local and broadcast addresses.
-Rule 0 is special. It cannot be deleted or overridden.
-
-
\item Priority: 32766, Selector: match anything, Action: lookup routing
table \verb|main| (ID 254).
The \verb|main| table is the normal routing table containing all non-policy
diff --git a/ip/ip.c b/ip/ip.c
index da16b15..cba43ca 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -47,8 +47,8 @@ static void usage(void)
fprintf(stderr,
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
" ip [ -force ] -batch filename\n"
-"where OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |\n"
-" tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |\n"
+"where OBJECT := { link | address | addrlabel | route | rule | neighbor | ntable |\n"
+" tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n"
" netns | l2tp | fou | tcp_metrics | token | netconf }\n"
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
" -h[uman-readable] | -iec |\n"
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 99a6ab5..dc31515 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -70,15 +70,15 @@ static void usage(void)
if (do_link) {
iplink_usage();
}
- fprintf(stderr, "Usage: ip addr {add|change|replace} IFADDR dev STRING [ LIFETIME ]\n");
+ fprintf(stderr, "Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n");
fprintf(stderr, " [ CONFFLAG-LIST ]\n");
- fprintf(stderr, " ip addr del IFADDR dev STRING [mngtmpaddr]\n");
- fprintf(stderr, " ip addr {show|save|flush} [ dev STRING ] [ scope SCOPE-ID ]\n");
- fprintf(stderr, " [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ] [up]\n");
- fprintf(stderr, " ip addr {showdump|restore}\n");
+ fprintf(stderr, " ip address del IFADDR dev IFNAME [mngtmpaddr]\n");
+ fprintf(stderr, " ip address {show|save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n");
+ fprintf(stderr, " [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n");
+ fprintf(stderr, " ip address {showdump|restore}\n");
fprintf(stderr, "IFADDR := PREFIX | ADDR peer PREFIX\n");
fprintf(stderr, " [ broadcast ADDR ] [ anycast ADDR ]\n");
- fprintf(stderr, " [ label STRING ] [ scope SCOPE-ID ]\n");
+ fprintf(stderr, " [ label IFNAME ] [ scope SCOPE-ID ]\n");
fprintf(stderr, "SCOPE-ID := [ host | link | global | NUMBER ]\n");
fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
fprintf(stderr, "FLAG := [ permanent | dynamic | secondary | primary |\n");
@@ -1059,7 +1059,7 @@ static int ipadd_dump_check_magic(void)
__u32 magic = 0;
if (isatty(STDIN_FILENO)) {
- fprintf(stderr, "Can't restore addr dump from a terminal\n");
+ fprintf(stderr, "Can't restore address dump from a terminal\n");
return -1;
}
@@ -1787,6 +1787,6 @@ int do_ipaddr(int argc, char **argv)
return ipaddr_restore();
if (matches(*argv, "help") == 0)
usage();
- fprintf(stderr, "Command \"%s\" is unknown, try \"ip addr help\".\n", *argv);
+ fprintf(stderr, "Command \"%s\" is unknown, try \"ip address help\".\n", *argv);
exit(-1);
}
diff --git a/man/man8/bridge.8 b/man/man8/bridge.8
index 4135d01..fd7e1d8 100644
--- a/man/man8/bridge.8
+++ b/man/man8/bridge.8
@@ -53,8 +53,8 @@ bridge \- show / manipulate bridge addresses and devices
.I LLADDR
.B dev
.IR DEV " { "
-.BR local " | " temp " } { "
-.BR self " } { " router " } [ "
+.BR local " | " temp " } [ "
+.BR self " ] [ " router " ] [ "
.B dst
.IR IPADDR " ] [ "
.B vni
@@ -65,7 +65,7 @@ bridge \- show / manipulate bridge addresses and devices
.IR DEVICE " ]"
.ti -8
-.BR "bridge fdb" " [ " show " ] [ "
+.BR "bridge fdb show" " [ "
.B dev
.IR DEV " ]"
diff --git a/man/man8/cbq.8 b/man/man8/cbq.8
new file mode 100644
index 0000000..78940b6
--- /dev/null
+++ b/man/man8/cbq.8
@@ -0,0 +1 @@
+.so man8/tc-cbq.8
\ No newline at end of file
diff --git a/man/man8/ifcfg.8 b/man/man8/ifcfg.8
new file mode 100644
index 0000000..a6b585e
--- /dev/null
+++ b/man/man8/ifcfg.8
@@ -0,0 +1,57 @@
+.TH IFCFG 8 "September 24 2009" "iproute2" "Linux"
+.SH NAME
+ifcfg \- simplistic script which replaces ifconfig IP managment
+.SH SYNOPSIS
+.ad l
+.in +8
+.ti -8
+.B ifcfg
+.RI "[ " DEVICE " [ " :ALIAS: " ] ] [ " command " ] " ADDRESS " [ " LENGTH " ] [ " PEER " ] "
+.sp
+
+.SH DESCRIPTION
+This manual page documents briefly the
+.B ifcfg
+command.
+.PP
+This is a simplistic script replacing one option of
+.B ifconfig
+, namely, IP address management. It not only adds
+addresses, but also carries out Duplicate Address Detection RFC-DHCP,
+sends unsolicited ARP to update the caches of other hosts sharing
+the interface, adds some control routes and restarts Router Discovery
+when it is necessary.
+
+I strongly recommend using it
+.RI instead
+of
+.RI ifconfig
+both on hosts and on routers.
+
+.SH IFCONFIG - COMMAND SYNTAX
+
+.SS
+.TP
+.B DEVICE
+- it may have alias, suffix, separated by colon.
+
+.TP
+.B command
+- add, delete or stop.
+
+.TP
+.B address
+- optionally followed by prefix length.
+
+.TP
+.B peer
+- optional peer address for pointpoint interfaces.
+
+.SH EXAMPLE
+.nf ifcfg eth0 193.233.7.90/24
+.fi
+This function determines, whether this is router or host.
+It returns 0, if the host is apparently not router.
+
+.SH SEE ALSO
+.BR ip-cref.dvi
diff --git a/man/man8/ip-address.8.in b/man/man8/ip-address.8.in
index 6e46af8..4da3095 100644
--- a/man/man8/ip-address.8.in
+++ b/man/man8/ip-address.8.in
@@ -14,18 +14,26 @@ ip-address \- protocol address management
.sp
.ti -8
-.BR "ip address" " { " add " | " del " } "
-.IB IFADDR " dev " STRING
+.BR "ip address" " { " add " | " change " | " replace " } "
+.IB IFADDR " dev " IFNAME
+.RI "[ " LIFETIME " ] [ " CONFFLAG-LIST " ]"
.ti -8
-.BR "ip address" " { " show " | " flush " } [ " dev
-.IR STRING " ] [ "
+.BR "ip address del"
+.IB IFADDR " dev " IFNAME " [ " mngtmpaddr " ]"
+
+.ti -8
+.BR "ip address" " { " show " | " save " | " flush " } [ " dev
+.IR IFNAME " ] [ "
.B scope
.IR SCOPE-ID " ] [ "
.B to
.IR PREFIX " ] [ " FLAG-LIST " ] [ "
.B label
-.IR PATTERN " ]"
+.IR PATTERN " ] [ " up " ]"
+
+.ti -8
+.BR "ip address" " { " showdump " | " restore " }"
.ti -8
.IR IFADDR " := " PREFIX " | " ADDR
@@ -36,7 +44,7 @@ ip-address \- protocol address management
.B anycast
.IR ADDR " ] [ "
.B label
-.IR STRING " ] [ "
+.IR LABEL " ] [ "
.B scope
.IR SCOPE-ID " ]"
@@ -50,17 +58,34 @@ ip-address \- protocol address management
.ti -8
.IR FLAG " := "
-.RB "[ " permanent " | " dynamic " | " secondary " | " primary " | \
-[ - ] " tentative " | [ - ] " deprecated " | [ - ] " dadfailed " | "\
-temporary " ]"
+.RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
+tentative " | " deprecated " | " dadfailed " | " temporary " | " CONFFLAG-LIST " ]"
+
+.ti -8
+.IR CONFFLAG-LIST " := [ " CONFFLAG-LIST " ] " CONFFLAG
+
+.ti -8
+.IR CONFFLAG " := "
+.RB "[ " home " | " nodad " ]"
+
+.ti -8
+.IR LIFETIME " := [ "
+.BI valid_lft " LFT"
+.RB "| " preferred_lft
+.IR LFT " ]"
+
+.ti -8
+.IR LFT " := [ "
+.BR forever " |"
+.IR SECONDS " ]"
.SH "DESCRIPTION"
The
.B address
-is a protocol (IP or IPv6) address attached
-to a network device. Each device must have at least one address
-to use the corresponding protocol. It is possible to have several
-different addresses attached to one device. These addresses are not
+is a protocol (IPv4 or IPv6) address attached
+to a network device. Each device must have at least one address
+to use the corresponding protocol. It is possible to have several
+different addresses attached to one device. These addresses are not
discriminated, so that the term
.B alias
is not quite appropriate for them and we do not use it in this document.
@@ -73,7 +98,7 @@ and deletes old ones.
.SS ip address add - add new protocol address.
.TP
-.BI dev " NAME"
+.BI dev " IFNAME "
the name of the device to add the address to.
.TP
@@ -107,7 +132,7 @@ instead of the broadcast address. In this case, the broadcast address
is derived by setting/resetting the host bits of the interface prefix.
.TP
-.BI label " NAME"
+.BI label " LABEL"
Each address may be tagged with a label string.
In order to preserve compatibility with Linux-2.0 net aliases,
this string must coincide with the name of the device or must be prefixed
@@ -125,7 +150,7 @@ Predefined scope values are:
- the address is globally valid.
.sp
.B site
-- (IPv6 only) the address is site local, i.e. it is
+- (IPv6 only, deprecated) the address is site local, i.e. it is
valid inside this site.
.sp
.B link
@@ -135,6 +160,30 @@ valid inside this site.
- the address is valid only inside this host.
.in -8
+.TP
+.BI valid_lft " LFT"
+the valid lifetime of this address; see section 5.5.4 of
+RFC 4862. When it expires, the address is removed by the kernel.
+Defaults to
+.BR "forever" .
+
+.TP
+.BI preferred_lft " LFT"
+the preferred lifetime of this address; see section 5.5.4
+of RFC 4862. When it expires, the address is no longer used for new
+outgoing connections. Defaults to
+.BR "forever" .
+
+.TP
+.B home
+(IPv6 only) designates this address the "home address" as defined in
+RFC 6275.
+
+.TP
+.B nodad
+(IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when
+adding this address.
+
.SS ip address delete - delete protocol address
.B Arguments:
coincide with the arguments of
@@ -145,7 +194,7 @@ If no arguments are given, the first address is deleted.
.SS ip address show - look at protocol addresses
.TP
-.BI dev " NAME " (default)
+.BI dev " IFNAME " (default)
name of device.
.TP
@@ -219,36 +268,53 @@ The difference is that it does not run when no arguments are given.
.PP
.B Warning:
-This command (and other
+This command and other
.B flush
-commands described below) is pretty dangerous. If you make a mistake,
-it will not forgive it, but will cruelly purge all the addresses.
+commands are unforgiving. They will cruelly purge all the addresses.
.PP
With the
.B -statistics
option, the command becomes verbose. It prints out the number of deleted
-addresses and the number of rounds made to flush the address list. If
-this option is given twice,
+addresses and the number of rounds made to flush the address list.
+If this option is given twice,
.B ip address flush
also dumps all the deleted addresses in the format described in the
previous subsection.
.SH "EXAMPLES"
.PP
+ip address show
+.RS 4
+Shows IPv4 and IPv6 addresses assigned to all network interfaces. The 'show'
+subcommand can be omitted.
+.RE
+.PP
+ip address show up
+.RS 4
+Same as above except that only addresses assigned to active network interfaces
+are shown.
+.RE
+.PP
ip address show dev eth0
.RS 4
-Shows the addresses assigned to network interface eth0
+Shows IPv4 and IPv6 addresses assigned to network interface eth0.
+.RE
+.PP
+ip address add 2001:0db8:85a3::0370:7334/64 dev eth1
+.RS 4
+Adds an IPv6 address to network interface eth1.
.RE
.PP
-ip addr add 2001:0db8:85a3::0370:7334/64 dev eth1
+ip address delete 2001:0db8:85a3::0370:7334/64 dev eth1
.RS 4
-Adds an IPv6 address to network interface eth1
+Delete the IPv6 address added above.
.RE
.PP
-ip addr flush dev eth4
+ip address flush dev eth4 scope global
.RS 4
-Removes all addresses from device eth4
+Removes all global IPv4 and IPv6 addresses from device eth4. Without 'scope
+global' it would remove all addresses including IPv6 link-local ones.
.RE
.SH SEE ALSO
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 5ad372c..8ab50c1 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -255,6 +255,21 @@ specifies the number of receive queues for new device.
specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
.TP
+VLAN Type Support
+For a link of type
+.I VLAN
+the following additional arguments are supported:
+
+.BI "ip link add " DEVICE
+.BI type " vlan " id " ID
+.BI link " DEVICE
+
+.in +8
+.sp
+.BI id " VNI "
+- specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
+
+.TP
VXLAN Type Support
For a link of type
.I VXLAN
@@ -273,7 +288,9 @@ the following additional arguments are supported:
.R " ] [ "
.BI tos " TOS "
.R " ] [ "
-.BI port " MIN MAX "
+.BI dstport " PORT "
+.R " ] [ "
+.BI srcport " MIN MAX "
.R " ] [ "
.I "[no]learning "
.R " ] [ "
@@ -329,7 +346,11 @@ parameter.
- specifies the TOS value to use in outgoing packets.
.sp
-.BI port " MIN MAX"
+.BI dstport " PORT"
+- specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
+
+.sp
+.BI srcport " MIN MAX"
- specifies the range of port numbers to use as UDP
source ports to communicate to the remote VXLAN tunnel endpoint.
diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in
index d53cc76..7e68c52 100644
--- a/man/man8/ip-route.8.in
+++ b/man/man8/ip-route.8.in
@@ -16,7 +16,7 @@ ip-route \- routing table management
.ti -8
.BR "ip route" " { "
-.BR list " | " flush " } "
+.BR show " | " flush " } "
.I SELECTOR
.ti -8
diff --git a/man/man8/ip-rule.8 b/man/man8/ip-rule.8
index dd925be..0c45a6f 100644
--- a/man/man8/ip-rule.8
+++ b/man/man8/ip-rule.8
@@ -108,8 +108,6 @@ The
.B local
table is a special routing table containing
high priority control routes for local and broadcast addresses.
-.sp
-Rule 0 is special. It cannot be deleted or overridden.
.TP
2.
diff --git a/man/man8/ip-tunnel.8 b/man/man8/ip-tunnel.8
index c97c28c..1cc1105 100644
--- a/man/man8/ip-tunnel.8
+++ b/man/man8/ip-tunnel.8
@@ -50,7 +50,7 @@ ip-tunnel - tunnel configuration
.ti -8
.IR MODE " := "
-.RB " { " ipip " | " gre " | " sit " | " isatap " | " ip6ip6 " | " ipip6 " | " ip6gre " | " any " }"
+.RB " { " ipip " | " gre " | " sit " | " isatap " | " vti " | " ip6ip6 " | " ipip6 " | " ip6gre " | " vti6 " | " any " }"
.ti -8
.IR ADDR " := { " IP_ADDRESS " |"
@@ -107,10 +107,10 @@ select the tunnel device name.
set the tunnel mode. Available modes depend on the encapsulating address family.
.br
Modes for IPv4 encapsulation available:
-.BR ipip ", " sit ", " isatap " and " gre "."
+.BR ipip ", " gre ", " sit ", " isatap " and " vti "."
.br
Modes for IPv6 encapsulation available:
-.BR ip6ip6 ", " ipip6 ", " ip6gre ", and " any "."
+.BR ip6ip6 ", " ipip6 ", " ip6gre " and " vti6 "
.TP
.BI remote " ADDRESS"
diff --git a/man/man8/ip.8 b/man/man8/ip.8
index 4cd71de..24e257b 100644
--- a/man/man8/ip.8
+++ b/man/man8/ip.8
@@ -19,8 +19,8 @@ ip \- show / manipulate routing, devices, policy routing and tunnels
.ti -8
.IR OBJECT " := { "
-.BR link " | " addr " | " addrlabel " | " route " | " rule " | " neigh " | "\
- ntable " | " tunnel " | " tuntap " | " maddr " | " mroute " | " mrule " | "\
+.BR link " | " address " | " addrlabel " | " route " | " rule " | " neigh " | "\
+ ntable " | " tunnel " | " tuntap " | " maddress " | " mroute " | " mrule " | "\
monitor " | " xfrm " | " netns " | " l2tp " | " tcp_metrics " }"
.sp
@@ -66,7 +66,7 @@ Output more detailed information.
.TP
.BR "\-l" , " \-loops " <COUNT>
-Specify maximum number of loops the 'ip addr flush' logic
+Specify maximum number of loops the 'ip address flush' logic
will attempt before giving up. The default is 10.
Zero (0) means loop until all addresses are removed.
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index b7fbaef..736d734 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -131,7 +131,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
@@ -186,7 +186,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 iproute­doc)",
+.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.0.5

View File

@ -0,0 +1,54 @@
From f016b9a352182df5856412c4e046d2a23424297f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Fri, 13 Mar 2015 13:17:02 +0100
Subject: [PATCH 7/7] lnstat: run indefinitely by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
See also:
* https://bugzilla.redhat.com/show_bug.cgi?id=977845
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
---
misc/lnstat.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/misc/lnstat.c b/misc/lnstat.c
index e105b70..0385cbb 100644
--- a/misc/lnstat.c
+++ b/misc/lnstat.c
@@ -249,7 +249,7 @@ int main(int argc, char **argv)
MODE_JSON,
MODE_NORMAL,
} mode = MODE_NORMAL;
- unsigned long count = 1;
+ unsigned long count = 0;
struct table_hdr *header;
static struct field_params fp;
int num_req_files = 0;
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
if (interval < 1 )
interval = 1;
- for (i = 0; i < count; i++) {
+ for (i = 0; i < count || !count; ) {
lnstat_update(lnstat_files);
if (mode == MODE_JSON)
print_json(stdout, lnstat_files, &fp);
@@ -373,8 +373,10 @@ int main(int argc, char **argv)
print_line(stdout, lnstat_files, &fp);
}
fflush(stdout);
- if (i < count - 1)
+ if (i < count - 1 || !count)
sleep(interval);
+ if (count)
+ ++i;
}
break;
}
--
2.0.5

View File

@ -0,0 +1,33 @@
From 740b484db02f2398499e7953e08a50c4b708613b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Fri, 13 Mar 2015 13:17:02 +0100
Subject: [PATCH 6/7] lnstat: dump to stdout, not stderr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
See also:
* https://bugzilla.redhat.com/show_bug.cgi?id=736332
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
---
misc/lnstat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/lnstat.c b/misc/lnstat.c
index 32b5cbe..e105b70 100644
--- a/misc/lnstat.c
+++ b/misc/lnstat.c
@@ -347,7 +347,7 @@ int main(int argc, char **argv)
switch (mode) {
case MODE_DUMP:
- lnstat_dump(stderr, lnstat_files);
+ lnstat_dump(stdout, lnstat_files);
break;
case MODE_NORMAL:
--
2.0.5

View File

@ -0,0 +1,43 @@
From ee80f98063d8265e754efcf11f43a7c0b25a1899 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Fri, 13 Mar 2015 13:17:02 +0100
Subject: [PATCH 3/7] ip-xfrm: support 'proto any' with 'sport' and 'dport'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When creating an IPsec SA that sets 'proto any' (IPPROTO_IP) and
specifies 'sport' and 'dport' at the same time in selector, the
following error is issued:
"sport" and "dport" are invalid with proto=ip
However using IPPROTO_IP with ports is completely legal and necessary
when one wants to share the SA on both TCP and UDP. One of the
applications requiring sharing SAs is 3GPP IMS AKA authentication.
See also:
* https://bugzilla.redhat.com/show_bug.cgi?id=497355
Reported-By: Jiří Klimeš <jklimes@redhat.com>
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
---
ip/ipxfrm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 95f91a5..e685571 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -1339,6 +1339,7 @@ static int xfrm_selector_upspec_parse(struct xfrm_selector *sel,
case IPPROTO_UDP:
case IPPROTO_SCTP:
case IPPROTO_DCCP:
+ case IPPROTO_IP: /* to allow shared SA for different protocols */
break;
default:
fprintf(stderr, "\"sport\" and \"dport\" are invalid with PROTO value \"%s\"\n", strxf_proto(sel->proto));
--
2.0.5

View File

@ -0,0 +1,29 @@
From db5da576c98906bf39cd914cec0c9226139db89f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
Date: Fri, 13 Mar 2015 13:17:02 +0100
Subject: [PATCH 5/7] ip-route: don't hide routes with RTM_F_CLONED by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
---
ip/iproute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iproute.c b/ip/iproute.c
index 024d401..46c24bb 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -144,7 +144,7 @@ static int filter_nlmsg(struct nlmsghdr *n, struct rtattr **tb, int host_len)
if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
ip6_multiple_tables = 1;
- if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
+ if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
return 0;
if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {
--
2.0.5

View File

@ -1,12 +0,0 @@
diff --git a/Makefile b/Makefile
index c107955..1e15c72 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ DATADIR=$(PREFIX)/share
DOCDIR=$(DATADIR)/doc/iproute2
MANDIR=$(DATADIR)/man
ARPDDIR=/var/lib/arpd
+KERNEL_INCLUDE=/usr/include
# Path to db_185.h include
DBM_INCLUDE:=$(ROOTDIR)/usr/include

View File

@ -1,12 +0,0 @@
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 0495ff4..b1d4c6e 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -1275,6 +1275,7 @@ static int xfrm_selector_upspec_parse(struct xfrm_selector *sel,
case IPPROTO_UDP:
case IPPROTO_SCTP:
case IPPROTO_DCCP:
+ case IPPROTO_IP: /* to allow shared SA for different protocols */
break;
default:
fprintf(stderr, "\"sport\" and \"dport\" are invalid with PROTO value \"%s\"\n", strxf_proto(sel->proto));

View File

@ -1,22 +0,0 @@
diff -up iproute2-20091106/examples/cbq.init-v0.7.3.fix iproute2-20091106/examples/cbq.init-v0.7.3
--- iproute2-20091106/examples/cbq.init-v0.7.3.fix 2009-11-10 19:41:44.000000000 +0100
+++ iproute2-20091106/examples/cbq.init-v0.7.3 2009-11-27 13:36:07.957310549 +0100
@@ -579,14 +579,14 @@ cbq_show () {
### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1
cbq_init () {
### Get a list of configured classes
- CLASSLIST=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
- -not -name '*~' -maxdepth 1 -printf "%f\n"| sort`
+ CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
+ -not -name '*~' -printf "%f\n"| sort`
[ -z "$CLASSLIST" ] &&
cbq_failure "no configuration files found in $1!"
### Gather all DEVICE fields from $1/cbq-*
- DEVFIELDS=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
- -not -name '*~' -maxdepth 1| xargs sed -n 's/#.*//; \
+ DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
+ -not -name '*~' | xargs sed -n 's/#.*//; \
s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \
{ s/.*=//; p; }'| sort -u`
[ -z "$DEVFIELDS" ] &&

View File

@ -1,57 +0,0 @@
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 4f5f74e..290595c 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -403,6 +403,43 @@ static int parse_ip6_addr(int *argc_p, char ***argv_p,
return res;
}
+static int parse_ip6_class(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
+{
+ int res = -1;
+ int argc = *argc_p;
+ char **argv = *argv_p;
+ __u32 key;
+ __u32 mask;
+ int offmask = 0;
+
+ if (argc < 2)
+ return -1;
+
+ if (get_u32(&key, *argv, 0))
+ return -1;
+ argc--; argv++;
+
+ if (get_u32(&mask, *argv, 16))
+ return -1;
+ argc--; argv++;
+
+ if (key > 0xFF || mask > 0xFF)
+ return -1;
+
+ key <<= 20;
+ mask <<= 20;
+ key = htonl(key);
+ mask = htonl(mask);
+
+ if (res = pack_key(sel, key, mask, 0, offmask) < 0)
+ return -1;
+ res = 0;
+
+ *argc_p = argc;
+ *argv_p = argv;
+ return res;
+}
+
static int parse_ether_addr(int *argc_p, char ***argv_p,
struct tc_u32_sel *sel, int off)
{
@@ -522,7 +559,7 @@ static int parse_ip6(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
res = parse_ip6_addr(&argc, &argv, sel, 24);
} else if (strcmp(*argv, "priority") == 0) {
NEXT_ARG();
- res = parse_u8(&argc, &argv, sel, 4, 0);
+ res = parse_ip6_class(&argc, &argv, sel);
} else if (strcmp(*argv, "protocol") == 0) {
NEXT_ARG();
res = parse_u8(&argc, &argv, sel, 6, 0);

View File

@ -1,89 +0,0 @@
diff -up iproute2-2.6.29/man/man8/cbq.8.man iproute2-2.6.29/man/man8/cbq.8
--- iproute2-2.6.29/man/man8/cbq.8.man 2009-09-24 14:05:44.868922557 +0200
+++ iproute2-2.6.29/man/man8/cbq.8 2009-09-24 14:05:24.760143753 +0200
@@ -0,0 +1 @@
+.so man8/tc-cbq.8
\ No newline at end of file
diff -up /dev/null iproute2-2.6.29/man/man8/ifcfg.8
--- /dev/null 2009-09-22 09:26:40.270218984 +0200
+++ iproute2-2.6.29/man/man8/ifcfg.8 2009-09-24 14:03:05.415151874 +0200
@@ -0,0 +1,57 @@
+.TH IFCFG 8 "September 24 2009" "iproute2" "Linux"
+.SH NAME
+ifcfg \- simplistic script which replaces ifconfig IP managment
+.SH SYNOPSIS
+.ad l
+.in +8
+.ti -8
+.B ifcfg
+.RI "[ " DEVICE " [ " :ALIAS: " ] ] [ " command " ] " ADDRESS " [ " LENGTH " ] [ " PEER " ] "
+.sp
+
+.SH DESCRIPTION
+This manual page documents briefly the
+.B ifcfg
+command.
+.PP
+This is a simplistic script replacing one option of
+.B ifconfig
+, namely, IP address management. It not only adds
+addresses, but also carries out Duplicate Address Detection RFC-DHCP,
+sends unsolicited ARP to update the caches of other hosts sharing
+the interface, adds some control routes and restarts Router Discovery
+when it is necessary.
+
+I strongly recommend using it
+.RI instead
+of
+.RI ifconfig
+both on hosts and on routers.
+
+.SH IFCONFIG - COMMAND SYNTAX
+
+.SS
+.TP
+.B DEVICE
+- it may have alias, suffix, separated by colon.
+
+.TP
+.B command
+- add, delete or stop.
+
+.TP
+.B address
+- optionally followed by prefix length.
+
+.TP
+.B peer
+- optional peer address for pointpoint interfaces.
+
+.SH EXAMPLE
+.nf ifcfg eth0 193.233.7.90/24
+.fi
+This function determines, whether this is router or host.
+It returns 0, if the host is apparently not router.
+
+.SH SEE ALSO
+.BR ip-cref.dvi
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index 2a4bbc5..f4b9282 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -128,7 +128,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
@@ -150,7 +150,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 iproute­doc)",
+.BR /usr/share/doc/iproute-doc/ss.ps " (package iproute\-doc)",
.br
.BR RFC " 793 "
- https://tools.ietf.org/rfc/rfc793.txt (TCP states)