]> git.ipfire.org Git - thirdparty/iproute2.git/log
thirdparty/iproute2.git
12 years agoip/ip6tunnel: fix help for TCLASS
Nicolas Dichtel [Wed, 14 Nov 2012 15:29:24 +0000 (16:29 +0100)] 
ip/ip6tunnel: fix help for TCLASS

Help is "[tclass TCLASS]", but only TOS was described.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
12 years agoconfigure: respect $CC environment var override
Wookey [Fri, 16 Nov 2012 16:06:19 +0000 (08:06 -0800)] 
configure: respect $CC environment var override

Enables e.g. cross-compiling by setting $CC env var.  This patch
extracted from the Ubuntu package (thanks, Wookey and Colin Watson).

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670660
BugLink: https://bugs.launchpad.net/bugs/870197
Signed-off-by: Kamal Mostafa <kamal@debian.org>
12 years agoiproute2: drop libresolv
Andreas Henriksson [Sat, 10 Nov 2012 12:22:10 +0000 (13:22 +0100)] 
iproute2: drop libresolv

Hello!

While building the iproute package in Debian I get warnings from
package helpers like this:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/iproute/sbin/tc debian/iproute/usr/bin/lnstat debian/iproute/bin/ip debian/iproute/bin/ss debian/iproute/sbin/bridge debian/iproute/sbin/rtmon were not linked against libresolv.so.2 (they use none of the library's symbols)

The -lresolv in ./Makefile seems to come from pre-historic times (before
iproute2 git history, possibly from libc5/pre-glibc days).
I couldn't find out if/why there was any reason for linking to libresolv.
Does anyone know if there are any valid reasons for keeping it still?

If not, I'd be happy to see it go.... while at it I also removed includes
of <resolv.h> which I also couldn't find any reason for, but this is
just an added bonus of the patch (and there are probably more unneeded
includes that could be dropped in the same sources).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
12 years agoman: fix incorrect use of "it's"
Stephen Hemminger [Mon, 12 Nov 2012 16:05:45 +0000 (08:05 -0800)] 
man: fix incorrect use of "it's"

A couple of places were using "it's" where possive form "its"
should be used instead.

12 years agoiproute2: avoid errors from double-installing manpages
Andreas Henriksson [Fri, 9 Nov 2012 15:42:41 +0000 (16:42 +0100)] 
iproute2: avoid errors from double-installing manpages

Three manpages in man8 are listed twice in MAN8PAGES (both directly and
in TARGETS) which causes the install command to spit our a couple of
warnings as below and exiting with non-zero exit code....

make[3]: Entering directory `/tmp/buildd/iproute-20121001/man/man8'
install -m 0755 -d /tmp/buildd/iproute-20121001/debian/tmp/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 ss.8 tc.8 tc-bfifo.8 tc-cbq.8 tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-drr.8 tc-ematch.8 tc-fq_codel.8 tc-hfsc.8 tc-htb.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-address.8 ip-addrlabel.8 ip-l2tp.8 ip-link.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 ip-netns.8 ip-ntable.8 ip-route.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 /tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-address.8' with `ip-address.8'
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-link.8' with `ip-link.8'
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-route.8' with `ip-route.8'
make[3]: *** [install] Error 1
make[3]: Leaving directory `/tmp/buildd/iproute-20121001/man/man8'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/tmp/buildd/iproute-20121001/man'

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
12 years agoallow pkg-config to be customized
Mike Frysinger [Thu, 8 Nov 2012 16:41:17 +0000 (11:41 -0500)] 
allow pkg-config to be customized

Rather than hard coding `pkg-config`, use ${PKG_CONFIG} so people can
override it to their specific version (like when cross-compiling).

This is the same way the upstream pkg-config code works.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agobridge: use rta_getattr_xxx wrappers
Stephen Hemminger [Tue, 30 Oct 2012 00:52:45 +0000 (17:52 -0700)] 
bridge: use rta_getattr_xxx wrappers

Don't peek at RTA_DATA() directly.

12 years agobridge: remove trailing whitespace
Stephen Hemminger [Tue, 30 Oct 2012 00:48:55 +0000 (17:48 -0700)] 
bridge: remove trailing whitespace

12 years agoss: Get udp sockets info via sock-diag
Pavel Emelyanov [Thu, 25 Oct 2012 03:24:58 +0000 (03:24 +0000)] 
ss: Get udp sockets info via sock-diag

Now everything is prepared for it, so the patch is straightforward.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoss: Support sock-diag
Pavel Emelyanov [Thu, 25 Oct 2012 03:23:36 +0000 (03:23 +0000)] 
ss: Support sock-diag

That is -- write the code, that sends diag request in new format. It's
mostly copied from tcp-diag code. Plus, sock-diag differentiates sockets
by families, thus we have to send two requests sequentially.

If we fail to submit new sock-diag request, try to fall-back and submit
the legacy tcp-diag one.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoss: Split inet_show_netlink into parts
Pavel Emelyanov [Thu, 25 Oct 2012 03:21:39 +0000 (03:21 +0000)] 
ss: Split inet_show_netlink into parts

The existing function inet_show_netlink sends tcp-diag request and
then receives back the response and prints it on the screen.

The sock-diag and legacy tcp-diag have different request types, but
report sockets in the same format. In order to support both it's
convenient to split the code into sending and receiving parts.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoss: Rename some tcp- names into inet-
Pavel Emelyanov [Thu, 25 Oct 2012 03:18:31 +0000 (03:18 +0000)] 
ss: Rename some tcp- names into inet-

The sock-diag is capable to diag udp sockets as well. Prepare the
ss code for this by first renaming soon-to-be-generic tcp-s names
into inet-s.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoip: fix "ip -6 route add ... nexthop"
Vincent Bernat [Tue, 23 Oct 2012 12:42:55 +0000 (14:42 +0200)] 
ip: fix "ip -6 route add ... nexthop"

IPv6 multipath routes were not accepted by "ip route" because an IPv4
address was expected for each gateway. Use `get_addr()` instead of
`get_addr32()`.

Signed-off-by: Vincent Bernat <bernat@luffy.cx>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
12 years agoiplink: add vxlan to man page
Stephen Hemminger [Thu, 25 Oct 2012 16:01:29 +0000 (09:01 -0700)] 
iplink: add vxlan to man page

Also sort link types for clarity

12 years agoiplink: Added support for the kernel IPoIB RTNL ops
Or Gerlitz [Thu, 25 Oct 2012 14:57:59 +0000 (16:57 +0200)] 
iplink: Added support for the kernel IPoIB RTNL ops

Added support to ipoib rtnl ops through which one can create, configure,
query and delete IPoIB devices, for example

 $ ip link add link ib0.8001 name ib0.8001 type ipoib pkey 0x8001
 $ ip link add link ib0.1 name ib0.1 type ipoib mode connected
 $ ip --details link show dev ib0.1

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
12 years agoUpdate kernel headers to 3.7-rc1
Stephen Hemminger [Fri, 19 Oct 2012 20:31:05 +0000 (13:31 -0700)] 
Update kernel headers to 3.7-rc1

Get new sanitized headers

12 years agovxlan: only send group address if defined
Stephen Hemminger [Fri, 19 Oct 2012 20:25:17 +0000 (13:25 -0700)] 
vxlan: only send group address if defined

Don't send 0 as group address.

12 years agovxlan: add support for port range
Stephen Hemminger [Wed, 10 Oct 2012 06:39:17 +0000 (23:39 -0700)] 
vxlan: add support for port range

12 years agoiproute2: add support for tcp_metrics
Julian Anastasov [Wed, 3 Oct 2012 12:07:39 +0000 (12:07 +0000)] 
iproute2: add support for tcp_metrics

ip tcp_metrics/tcpmetrics

We support get/del for single entry and dump for
show/flush.

v3:
 - fix rtt/rttvar shifts as suggested by Eric Dumazet
 - show rtt/rttvar usecs as suggested by David Laight

Signed-off-by: Julian Anastasov <ja@ssi.bg>
12 years agoiproute2: inform user when a neighbor is removed
Nicolas Dichtel [Mon, 8 Oct 2012 16:48:23 +0000 (09:48 -0700)] 
iproute2: inform user when a neighbor is removed

When running 'ip monitor neigh', there is no hint to tell if a neighbor is
updated or deleted.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
12 years agoMerge branch 'vxlan'
Stephen Hemminger [Wed, 3 Oct 2012 15:52:59 +0000 (08:52 -0700)] 
Merge branch 'vxlan'

Conflicts:
include/linux/if_link.h

12 years agoiproute2-3.6.0 assumes presence of iptables
Matt Burgess [Tue, 2 Oct 2012 18:01:32 +0000 (19:01 +0100)] 
iproute2-3.6.0 assumes presence of iptables

Hi,

When compiling iproute2-3.6.0 on a host that doesn't have iptables available, I get the following error:

gcc -Wall -Wstrict-prototypes -O2 -I../include -DRESOLVE_HOSTNAMES
-DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE
-DCONFIG_GACT -DCONFIG_GACT_PROB -DYY_NO_INPUT   -c -o em_ipset.o
em_ipset.c
em_ipset.c:26:21: fatal error: xtables.h: No such file or directory

Fixed by the following patch, which guards the building of em_ipset.o on
the presence of suitable headers.

Thanks,

Matt.

12 years agoUpdate headers to 3.7-pre-rc
Stephen Hemminger [Wed, 3 Oct 2012 15:48:37 +0000 (08:48 -0700)] 
Update headers to 3.7-pre-rc

Get latest headers from merge

12 years agoiproute2: List interfaces without net address by default
Petr Písař [Wed, 3 Oct 2012 14:42:41 +0000 (16:42 +0200)] 
iproute2: List interfaces without net address by default

This fixes regression in iproute2-3.5.1 when `ip addr show' skipped
interfaces without network layer address.

Wrong output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:54:00:0f:03 brd ff:ff:ff:ff:ff:ff
    inet 10.34.25.198/23 brd 10.34.25.255 scope global eth0
    inet6 2620:52:0:2219:250:54ff:fe00:f03/64 scope global dynamic
       valid_lft 2591919sec preferred_lft 604719sec
    inet6 fe80::250:54ff:fe00:f03/64 scope link
       valid_lft forever preferred_lft forever

Expected output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:54:00:0f:03 brd ff:ff:ff:ff:ff:ff
    inet 10.34.25.198/23 brd 10.34.25.255 scope global eth0
    inet6 2620:52:0:2219:250:54ff:fe00:f03/64 scope global dynamic
       valid_lft 2591896sec preferred_lft 604696sec
    inet6 fe80::250:54ff:fe00:f03/64 scope link
       valid_lft forever preferred_lft forever
5: veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 8a:ec:35:34:1f:a8 brd ff:ff:ff:ff:ff:ff
6: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 2e:97:ef:77:40:82 brd ff:ff:ff:ff:ff:ff

Signed-off-by: Petr Písař <ppisar@redhat.com>
12 years agol2tp: remove references to old bridge utils
Stephen Hemminger [Wed, 3 Oct 2012 15:45:32 +0000 (08:45 -0700)] 
l2tp: remove references to old bridge utils

Can no manage interfaces with ip no need to invoke old brctl

12 years agobridge: manage VXLAN based forwarding tables
Stephen Hemminger [Mon, 1 Oct 2012 20:58:01 +0000 (13:58 -0700)] 
bridge: manage VXLAN based forwarding tables

Allow extending bridge forwarding table to handle VXLAN as well.
Change format of output to be close to 'ip neighbour'

12 years agoMerge branch 'master' into vxlan
Stephen Hemminger [Mon, 1 Oct 2012 16:05:29 +0000 (09:05 -0700)] 
Merge branch 'master' into vxlan

12 years agov3.6.0 v3.6.0
Stephen Hemminger [Mon, 1 Oct 2012 15:39:21 +0000 (08:39 -0700)] 
v3.6.0

12 years agoupdate header files to 3.6
Stephen Hemminger [Mon, 1 Oct 2012 15:38:03 +0000 (08:38 -0700)] 
update header files to 3.6

12 years agovxlan support
Stephen Hemminger [Mon, 24 Sep 2012 19:48:29 +0000 (12:48 -0700)] 
vxlan support

12 years agoChange how pdf doc's are created
Werner Fink [Mon, 24 Sep 2012 19:50:37 +0000 (12:50 -0700)] 
Change how pdf doc's are created

 Currently the pdf docs are done with
    sgml -> sgmltool -> tex -> latex -> dvi -> dvips -> ps -> ps2pdf -> pdf
 or
    tex -> latex -> dvi -> dvips -> ps -> ps2pdf -> pdf
 with this patch we do
    sgml -> sgmltool -> tex -> pdflatex -> pdf
 or
    tex -> pdflatex -> pdf

12 years agoAdd support for AF_BRIDGE
Stephen Hemminger [Mon, 17 Sep 2012 22:50:27 +0000 (15:50 -0700)] 
Add support for AF_BRIDGE

This can be useful when displaying neighbour table

12 years agoiproute2: GENL: merge GENL_REQUEST and GENL_INITIALIZER
Julian Anastasov [Wed, 12 Sep 2012 06:15:19 +0000 (09:15 +0300)] 
iproute2: GENL: merge GENL_REQUEST and GENL_INITIALIZER

Both macros are used together, so better to have
single define. Update all requests in ipl2tp.c to use the
new macro.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
12 years agoman: make sure tc man page gets installed
Stephen Hemminger [Mon, 17 Sep 2012 22:46:00 +0000 (15:46 -0700)] 
man: make sure tc man page gets installed

12 years agoiproute2: bridge: finish removing replace option in man pages
John Fastabend [Fri, 14 Sep 2012 06:50:36 +0000 (23:50 -0700)] 
iproute2: bridge: finish removing replace option in man pages

This patch finishes removing the replace option from the bridge
man page which I missed in this commit

commit 57b9785de32404da3d2ac5483469b7fcc5a9c9e7
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Mon Aug 27 10:52:31 2012 -0700

    iproute2: bridge: remove replace and change options

Also add documentation for "{ self | embedded }" already shown on
the cmd line help msg.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
12 years agoiproute: Add ability to save, restore and show the interfaces' addresses (resend)
Pavel Emelyanov [Tue, 11 Sep 2012 15:47:00 +0000 (19:47 +0400)] 
iproute: Add ability to save, restore and show the interfaces' addresses (resend)

This functionality is required by checkpoint-restore project. Since the
dump and restore for routes is already done in ip tool it's naturally to
dump and restore addresses in the ip tool as well.

The implementation logic is the same as for the respective one for routes.
The magic number digits are taken from the Seattle coordinates.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoiproute2: use libgenl in ipl2tp
Julian Anastasov [Tue, 11 Sep 2012 09:04:34 +0000 (12:04 +0300)] 
iproute2: use libgenl in ipl2tp

Use the common code from libgenl.c to parse family, and initialize
structures.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
12 years agoiproute2: add libgenl files
Julian Anastasov [Tue, 11 Sep 2012 09:04:33 +0000 (12:04 +0300)] 
iproute2: add libgenl files

Create libgenl.h and libgenl.c. They will contain
common code for GENL users such as ipl2tp, tcp_metrics, etc.

Somewhat simplified by Stephen Hemminger

Signed-off-by: Julian Anastasov <ja@ssi.bg>
12 years agoiproute2: tc.8: update UNITS section.
Li Wei [Tue, 28 Aug 2012 20:41:56 +0000 (20:41 +0000)] 
iproute2: tc.8: update UNITS section.

- rename section UNITS to PARAMETERS.
- break section PARAMETERS down to four subsections to cover the
  common used parameter types(RATES, TIMES, SIZES, VALUES).
- add some explaination for IEC units in RATES.
- point out the max value we can set for RATES, TIMES and SIZES.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
12 years agoiproute: Add route showdump command (v2)
Pavel Emelyanov [Fri, 27 Jul 2012 04:57:20 +0000 (08:57 +0400)] 
iproute: Add route showdump command (v2)

Some time ago the save+restore commands were added to ip route (git
id f4ff11e3, Add ip route save/restore). These two save the raw rtnl
stream into a file and restore one (reading it from stdin).

The problem is that there's no way to get the contents of the dump
file in a human readable form. The proposal is to add a command that
reads the rtnl stream from stdin and prints the data in a way the
usual "ip route list" does?

changes since v1:

* Take the magic at the beginning of the dump file into account
* Check for stdin (the dump is taken from) is not a tty

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoiproute: Add magic cookie to route dump file
Pavel Emelyanov [Thu, 26 Jul 2012 18:55:41 +0000 (18:55 +0000)] 
iproute: Add magic cookie to route dump file

In order to somehow verify that a blob contains route dump a
4-bytes magic is put at the head of the data and is checked
on restore.

Magic digits are taken from Portland (OR) coordinates :) Is
there any more reliable way of generating such?

Signed-of-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoiproute2: Fix various manpage formatting nits
Andreas Schwab [Thu, 6 Sep 2012 03:09:58 +0000 (03:09 +0000)] 
iproute2: Fix various manpage formatting nits

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
12 years agoconfigure: remove TMPDIR on exit
Mathias Krause [Sat, 1 Sep 2012 18:55:29 +0000 (20:55 +0200)] 
configure: remove TMPDIR on exit

Commit e557d1a ("Don't put configure files in /tmp") introduced a typo
that prevented automated cleanup of the temporary directory created for
feature testing. Fix this typo.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
12 years agoiproute2: bridge: remove replace and change options
John Fastabend [Mon, 27 Aug 2012 17:52:31 +0000 (10:52 -0700)] 
iproute2: bridge: remove replace and change options

Replace and change are not supported by bridge netlink so remove it
from bridge tool options.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
12 years agoiproute2: build failure due to missing '\' in Makefile
John Fastabend [Mon, 27 Aug 2012 17:50:31 +0000 (10:50 -0700)] 
iproute2: build failure due to missing '\' in Makefile

After latest commit 'Install all tc and ip sub pages' this error
occurs on make.

make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/git/kernel.org/iproute2/man/man3'
make[2]: Entering directory `/home/git/kernel.org/iproute2/man/man8'
Makefile:8: *** commands commence before first target.  Stop.
make[2]: Leaving directory `/home/git/kernel.org/iproute2/man/man8'

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
12 years agoInstall all tc and ip sub pages
Stephen Hemminger [Sat, 25 Aug 2012 15:39:30 +0000 (08:39 -0700)] 
Install all tc and ip sub pages

Add missing entries in Makefile

12 years agoiproute2: Add FDB print and update cmds for self and master
John Fastabend [Thu, 23 Aug 2012 20:37:19 +0000 (13:37 -0700)] 
iproute2: Add FDB print and update cmds for self and master

Add command to update and print FDB entries with NTF_SELF and
NTF_MASTER set.

Example usages illustrating use of 'self' to program embedded
forwarding table and 'master' to configure the forwarding table
of the bridge. Also shows 'master self' used to update both in
the same command.

#./br/br fdb add 00:1b:21:55:23:60 dev eth3 self
#./br/br fdb add 00:1b:21:55:23:60 dev eth3 master
#./br/br fdb add 00:1b:21:55:23:61 dev eth3 self master
#./br/br fdb add 00:1b:21:55:23:62 dev eth3
#./br/br fdb show
eth3    00:1b:21:55:23:60       local self
eth3    00:1b:21:55:23:61       local self
eth3    33:33:00:00:00:01       local self
eth3    01:00:5e:00:00:01       local self
eth3    33:33:ff:55:23:59       local self
eth3    01:00:5e:00:00:fb       local self
eth33   33:33:00:00:00:01       local self
eth34   33:33:00:00:00:01       local self
eth3    00:1b:21:55:23:59       local master
eth3    00:1b:21:55:23:60       static master
eth3    00:1b:21:55:23:62       static master
eth3    00:1b:21:55:23:61       static master

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
12 years agoiproute2: Add missing tc-ematch.8 for man page installation
Oliver Hartkopp [Tue, 21 Aug 2012 05:16:29 +0000 (07:16 +0200)] 
iproute2: Add missing tc-ematch.8 for man page installation

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
12 years agoEmatch used to classify CAN frames according to their identifiers
Rostislav Lisovy [Mon, 20 Aug 2012 20:11:55 +0000 (13:11 -0700)] 
Ematch used to classify CAN frames according to their identifiers

This ematch enables effective filtering of CAN frames (AF_CAN) based
on CAN identifiers with masking of compared bits. Implementation
utilizes bitmap based classification for standard frame format (SFF)
which is optimized for minimal overhead.

Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
12 years agoUpdate can.h to 3.6-rc2
Stephen Hemminger [Mon, 20 Aug 2012 20:02:42 +0000 (13:02 -0700)] 
Update can.h to 3.6-rc2

12 years agoiproute: Fix errno propagation from rtnl_talk
Pavel Emelyanov [Mon, 20 Aug 2012 08:08:40 +0000 (12:08 +0400)] 
iproute: Fix errno propagation from rtnl_talk

Callers of rtnl_talk check errno value for their needs. In particular, the addrs
and routes restoring code validly reports success if the EEXISTS is in there.

However, the errno value can be sometimes screwed up by the perror call. Thus
we should only set it _after_ the message was emitted.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoExplain TC class id limits
Stephen Hemminger [Mon, 20 Aug 2012 17:58:58 +0000 (10:58 -0700)] 
Explain TC class id limits

12 years agoiproute2: configure: Add search path for 64bit library.
Li Wei [Mon, 20 Aug 2012 01:41:47 +0000 (09:41 +0800)] 
iproute2: configure: Add search path for 64bit library.

Use pkg-config to tell us the library path and fallback to search
old paths if xtables.pc not exists.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
12 years agoiproute2: fix typo in help message.
Li Wei [Mon, 20 Aug 2012 06:28:47 +0000 (14:28 +0800)] 
iproute2: fix typo in help message.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
12 years agoFix formatting of ip.8 family man page
Stephen Hemminger [Fri, 17 Aug 2012 22:28:59 +0000 (15:28 -0700)] 
Fix formatting of ip.8 family man page

fix bad formatting in description of -f option

12 years agoutils: invarg: msg precedes the faulty arg
Dan Kenigsberg [Thu, 16 Aug 2012 02:25:56 +0000 (02:25 +0000)] 
utils: invarg: msg precedes the faulty arg

fix all call which reversed the arg order.

Signed-off-by: Dan Kenigsberg <danken@redhat.com>
12 years agoCorrect the bridge command name in help messages
Chris Webb [Thu, 16 Aug 2012 20:42:37 +0000 (21:42 +0100)] 
Correct the bridge command name in help messages

The bridge command used to be called br but was renamed bridge. Correct
the outdated references to the br name in the help messages, together with a
typo of '-help' for 'help'.

Signed-off-by: Chris Webb <chris@arachsys.com>
12 years agoadd ematch man page
Florian Westphal [Thu, 9 Aug 2012 09:18:51 +0000 (09:18 +0000)] 
add ematch man page

12 years agotc: add ipset ematch
Florian Westphal [Thu, 9 Aug 2012 09:18:50 +0000 (09:18 +0000)] 
tc: add ipset ematch

example usage:
tc filter add dev $dev parent $id: basic match not ipset'(foobar src)' ..

also updates iproute2/ematch_map, else tc complains:
Error: Unable to find ematch "ipset" in /etc/iproute2/ematch_map
Please assign a unique ID to the ematch kind the suggested entry is:
        8       ipset

when trying to use this ematch.

(text ematch (5) only exists in kernel, a vlan ematch (6) exists neither in
 kernel nor userspace, but kernel headers define TCF_EM_VLAN == 6).

12 years agoFix regression with 'ip address show'
Mike Frysinger [Mon, 13 Aug 2012 15:09:52 +0000 (08:09 -0700)] 
Fix regression with 'ip address show'

`ip a s` no longer shows addresses since 3.4.0 works, but 3.5.0,

the simple test case:
make clean && make -j -s && ./ip/ip a s lo

before that change, i would get:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever

but after, i now get:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

seems like the bug was introduced in the middle of that patch:

- if (filter.family != AF_PACKET) {
+ if (filter.family && filter.family != AF_PACKET) {
+ if (filter.oneline)
+ no_link = 1;
+
  if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) {
  perror("Cannot send dump request");
  exit(1);

if i revert the change to the if statement there, `ip a s` works for me again.

12 years agoFix Makefile's
Xose Vazquez Perez [Mon, 13 Aug 2012 15:06:21 +0000 (08:06 -0700)] 
Fix Makefile's

Missing space in man8 Makefile and install bridge command with
correct name

13 years agoiplink: add support for num[tr]xqueues
Jiri Pirko [Wed, 1 Aug 2012 23:19:55 +0000 (16:19 -0700)] 
iplink: add support for num[tr]xqueues

13 years agoss: report SK_MEMINFO_BACKLOG
Eric Dumazet [Wed, 1 Aug 2012 23:16:43 +0000 (16:16 -0700)] 
ss: report SK_MEMINFO_BACKLOG

linux-3.6-rc1 supports SK_MEMINFO_BACKLOG with commit d594e987c6f54
(sock_diag: add SK_MEMINFO_BACKLOG)

ss command can display it if provided by the kernel.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agoadd can.h
Rostislav Lisovy [Wed, 1 Aug 2012 23:14:55 +0000 (16:14 -0700)] 
add can.h

13 years agoiproute2: VTI support for ip link command.
Saurabh [Wed, 27 Jun 2012 15:01:57 +0000 (15:01 +0000)] 
iproute2: VTI support for ip link command.

Support for VTI via rt netlink.

Signed-off-by: Saurabh Mohan <saurabh.mohan@vyatta.com>
13 years agoVTI support for ip tunnel
Saurabh Mohan [Wed, 1 Aug 2012 23:11:25 +0000 (16:11 -0700)] 
VTI support for ip tunnel

Configure VTI using 'ip tunnel'

13 years agoUpdate to 3.6.0-pre headers
Stephen Hemminger [Wed, 1 Aug 2012 23:08:53 +0000 (16:08 -0700)] 
Update to 3.6.0-pre headers

These are pre -rc1 version of santised kernel headers

13 years agov3.5.0 v3.5.0
Stephen Hemminger [Wed, 1 Aug 2012 22:25:51 +0000 (15:25 -0700)] 
v3.5.0

13 years agoAdd bridge command
Stephen Hemminger [Wed, 1 Aug 2012 22:23:49 +0000 (15:23 -0700)] 
Add bridge command

New tool to allow manipulating forwarding entries and monitoring
bridge events.

13 years agoman8: build cleanup
Stephen Hemminger [Wed, 1 Aug 2012 21:58:15 +0000 (14:58 -0700)] 
man8: build cleanup

Rearrange Makefile, and ignore derived files

13 years agoss: Report MSS from internal TCP information
Ben Hutchings [Mon, 30 Jul 2012 19:51:07 +0000 (20:51 +0100)] 
ss: Report MSS from internal TCP information

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoRemove reference to multipath algorithms in usage
Stephen Hemminger [Thu, 26 Jul 2012 23:12:20 +0000 (16:12 -0700)] 
Remove reference to multipath algorithms in usage

IP multipath algorithms support was removed several revisions ago.
Remove from usage as well

13 years agoRefactor ipaddr_list_or_flush
Stephen Hemminger [Fri, 13 Jul 2012 20:36:07 +0000 (13:36 -0700)] 
Refactor ipaddr_list_or_flush

Alternative solution to problem reported by Pravin B Shelar <pshelar@nicira.com>
Split large function ipaddr_list_or_flush into components.
Fix memory leak of address and link nlmsg info.
Avoid fetching address info if only flushing.

13 years agotc-bfifo: man: Add parameter value range.
Li Wei [Fri, 13 Jul 2012 07:08:00 +0000 (15:08 +0800)] 
tc-bfifo: man: Add parameter value range.

Add value range for 'limit' parameter.

13 years agotc: man: change man page and comment to confirm to code's behavior.
Li Wei [Wed, 11 Jul 2012 15:56:57 +0000 (15:56 +0000)] 
tc: man: change man page and comment to confirm to code's behavior.

Since the get_rate() code incorrectly interpreted bare number, the
behavior is not the same as man page and comment described.

We need to change the man page and comment for compatible with the
existing usage by scripts.

13 years agotc: man: add 'delete' command.
Li Wei [Wed, 11 Jul 2012 08:31:21 +0000 (16:31 +0800)] 
tc: man: add 'delete' command.

Add the missing 'delete' command for qdisc, class and filter, and
correct 'remove' to 'delete'.

13 years agotc: filter: validate filter priority in userspace.
Li Wei [Tue, 10 Jul 2012 08:45:28 +0000 (16:45 +0800)] 
tc: filter: validate filter priority in userspace.

Because we use the high 16 bits of tcm_info to pass prio value to
kernel, thus it's range would be [0, 0xffff], without validation
in tc when user pass a lager(>65535) priority, the actual priority
set in kernel would confuse the user.

So, add a validation to ensure prio in the range.

13 years agotc: u32: Fix firstfrag filter.
Hiroaki SHIMODA [Tue, 10 Jul 2012 10:44:16 +0000 (19:44 +0900)] 
tc: u32: Fix firstfrag filter.

On current firstfrag filter, all non fragmented packets are matched.
firstfrag should check MF bit.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
13 years agotc: u32: Fix icmp_code off.
Hiroaki SHIMODA [Tue, 10 Jul 2012 09:53:18 +0000 (18:53 +0900)] 
tc: u32: Fix icmp_code off.

The off of icmp_code is not 20 but 21. Also offmask should be 0 unless
nexthdr+ is specified.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
13 years agotc: prio: Perform more strict check on priomap.
Li Wei [Mon, 18 Jun 2012 06:33:38 +0000 (14:33 +0800)] 
tc: prio: Perform more strict check on priomap.

Since band number counts from zero thus band must be little than
opt.bands.

13 years agotc: man: Fix incorrect parameter format in prio.
Li Wei [Mon, 18 Jun 2012 06:23:05 +0000 (14:23 +0800)] 
tc: man: Fix incorrect parameter format in prio.

Parameter priomap use blank instead of comma to separate bands,
update manpage to confirms to this.

13 years agotc: Update manpage
Vijay Subramanian [Tue, 5 Jun 2012 08:41:26 +0000 (08:41 +0000)] 
tc: Update manpage

This makes 2 changes:
1: Add fq_codel to SEE ALSO section in tc manpage.
2: Reorder the SEE ALSO section to make the order alphabetical
(suggested by Jan Ceuleers ).

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agotc-fq_codel: Add manpage
Vijay Subramanian [Mon, 4 Jun 2012 12:55:57 +0000 (12:55 +0000)] 
tc-fq_codel: Add manpage

This patch adds the manpage for the FQ_CoDel (Fair Queuing Controlled-Delay)
AQM.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agoip: speedup ip link
Eric Dumazet [Sat, 9 Jun 2012 11:55:55 +0000 (13:55 +0200)] 
ip: speedup ip link

ip link has quadratic behavior because store_nlmsg()
has a head list pointer and search the end of list.

Provides a head/tail to cut time.

Time with 128000 net devices, to do "ip link show dev xxx"

Before: 2m3.594s
After: 0m2.830s

Signed-off-by: Eric Dumazet <edumazet@google.com>
13 years agoAdd reference to tc-codel(8) to the SEE ALSO section
Jan Ceuleers [Sat, 2 Jun 2012 19:27:46 +0000 (21:27 +0200)] 
Add reference to tc-codel(8) to the SEE ALSO section

Reported-by: Andy Furniss <andyqos@ukfsn.org>
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
13 years agotc-drr(8): tab unquoted in a argument to a macro
Bjarni Ingi Gislason [Mon, 28 May 2012 11:46:05 +0000 (13:46 +0200)] 
tc-drr(8): tab unquoted in a argument to a macro

<groff: tc-drr.8>:67: warning: tab character in unquoted macro argument
<groff: tc-drr.8>:69: warning: tab character in unquoted macro argument

*********************

Originally filed at: http://bugs.debian.org/674706

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
13 years agotc(8): Negative indent and missing "-" after an escape
Bjarni Ingi Gislason [Mon, 28 May 2012 11:46:04 +0000 (13:46 +0200)] 
tc(8): Negative indent and missing "-" after an escape

<groff: tc.8>:51: warning: total indent cannot be negative
<groff: tc.8>:57: warning: escape character ignored before `i'

*********************

Space at end of line removed

  General considerations

a) Manuals should usually only be left justified.  Use ".ad l"
as the first regular command.

b) Each sentence should begin on a new line.  The conventions
about the amount of space between sentences are different.  This
also makes a check on the number of space characters between
words easier.

c) Separate numbers from units with a (no-break) space.  A
no-break space can be code 0xA0, "\ " (\<space>), or "\~"
(groff).

d) Use macros "TS/TE" for tables with more than two columns.
Then use

'\" t

as the first line in the source to tell "man" to use the "tbl"
preprocessor.

e) Protect last period (full stop) in abbreviations with "\&",
if it is or might be (through new formatting of source) at the
end of line, if it is also not an end of sentence.

*********************

Originally filed at: http://bugs.debian.org/674704

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
13 years agotc-codel: Fix typos in manpage
Jan Ceuleers [Fri, 25 May 2012 07:43:04 +0000 (09:43 +0200)] 
tc-codel: Fix typos in manpage

Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
13 years agotc-codel: Update usage text
Vijay Subramanian [Thu, 24 May 2012 18:48:07 +0000 (11:48 -0700)] 
tc-codel: Update usage text

codel can take 'noecn' as an option. This also makes it consistent with the
manpage.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agotc-codel: Add manpage
Vijay Subramanian [Thu, 24 May 2012 04:33:54 +0000 (21:33 -0700)] 
tc-codel: Add manpage

This patch adds the manpage for the CoDel (Controlled-Delay) AQM.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agoiproute2: allow IPv6 addresses for l2tp local and remote parameters
Chris Elston [Tue, 1 May 2012 04:25:22 +0000 (04:25 +0000)] 
iproute2: allow IPv6 addresses for l2tp local and remote parameters

Adds support for parsing IPv6 addresses to the parameters local and
remote in the l2tp commands. Requires netlink attributes L2TP_ATTR_IP6_SADDR
and L2TP_ATTR_IP6_DADDR, added in a required kernel patch already submitted
to netdev.

Also enables printing of IPv6 addresses returned by the L2TP_CMD_TUNNEL_GET
request.

Signed-off-by: Chris Elston <celston@katalix.com>
Signed-off-by: James Chapman <jchapman@katalix.com>
13 years agofq_codel: Fair Queue Codel AQM
Eric Dumazet [Fri, 11 May 2012 09:49:50 +0000 (09:49 +0000)] 
fq_codel: Fair Queue Codel AQM

Fair Queue Codel packet scheduler

Principles :

- Packets are classified (internal classifier or external) on flows.
- This is a Stochastic model (as we use a hash, several flows might
                              be hashed on same slot)
- Each flow has a CoDel managed queue.
- Flows are linked onto two (Round Robin) lists,
  so that new flows have priority on old ones.

- For a given flow, packets are not reordered (CoDel uses a FIFO)
- head drops only.
- ECN capability is on by default.
- Very low memory footprint (64 bytes per flow)

tc qdisc ... fq_codel [ limit PACKETS ] [ flows number ]
                      [ target TIME ] [ interval TIME ] [ noecn ]
                      [ quantum BYTES ]

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Dave Taht <dave.taht@bufferbloat.net>
Cc: Kathleen Nichols <nichols@pollere.com>
Cc: Van Jacobson <van@pollere.net>
Cc: Tom Herbert <therbert@google.com>
Cc: Matt Mathis <mattmathis@google.com>
Cc: Nandita Dukkipati <nanditad@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Changli Gao <xiaosuo@gmail.com>
13 years agotc_codel: Controlled Delay AQM
Eric Dumazet [Thu, 10 May 2012 20:22:35 +0000 (20:22 +0000)] 
tc_codel: Controlled Delay AQM

An implementation of CoDel AQM, from Kathleen Nichols and Van Jacobson.

http://queue.acm.org/detail.cfm?id=2209336

This AQM main input is no longer queue size in bytes or packets, but the
delay packets stay in (FIFO) queue.

As we don't have infinite memory, we still can drop packets in enqueue()
in case of massive load, but mean of CoDel is to drop packets in
dequeue(), using a control law based on two simple parameters :

target : target sojourn time (default 5ms)
interval : width of moving time window (default 100ms)

Selected packets are dropped, unless ECN is enabled and packets can get
ECN mark instead.

Usage: tc qdisc ... codel [ limit PACKETS ] [ target TIME ]
                          [ interval TIME ] [ ecn ]

qdisc codel 10: parent 1:1 limit 2000p target 3.0ms interval 60.0ms ecn
 Sent 13347099587 bytes 8815805 pkt (dropped 0, overlimits 0 requeues 0)
 rate 202365Kbit 16708pps backlog 113550b 75p requeues 0
  count 116 lastcount 98 ldelay 4.3ms dropping drop_next 816us
  maxpacket 1514 ecn_mark 84399 drop_overlimit 0

CoDel must be seen as a base module, and should be used keeping in mind
there is still a FIFO queue. So a typical setup will probably need a
hierarchy of several qdiscs and packet classifiers to be able to meet
whatever constraints a user might have.

One possible example would be to use fq_codel, which combines Fair
Queueing and CoDel, in replacement of sfq / sfq_red.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Dave Taht <dave.taht@bufferbloat.net>
13 years agotc-netem: Add support for ECN packet marking
Vijay Subramanian [Wed, 16 May 2012 13:51:58 +0000 (13:51 +0000)] 
tc-netem: Add support for ECN packet marking

This patch provides support for marking packets with ECN instead of
dropping them with netem. This makes it possible to make use of the
netem ECN marking feature that was added recently to the kernel.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agoUpdate tc-netem manpage to add ecn capability
Vijay Subramanian [Wed, 16 May 2012 13:51:57 +0000 (13:51 +0000)] 
Update tc-netem manpage to add ecn capability

This patch updates the netem manpage to describe how to use
netem to mark packets with ecn instead of dropping them.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
13 years agoRemove derived man pages
Stephen Hemminger [Tue, 22 May 2012 21:03:37 +0000 (14:03 -0700)] 
Remove derived man pages

These man pages are now built from templates

13 years agoUpdate headers to 3.5 merge window
Stephen Hemminger [Tue, 22 May 2012 21:02:49 +0000 (14:02 -0700)] 
Update headers to 3.5 merge window

Use sanitized version of kernel headers from 3.5 pre-rc1 merge

13 years agoiproute2: man page and /bin/ip disagree on del vs delete
Andreas Henriksson [Sat, 19 May 2012 14:08:21 +0000 (16:08 +0200)] 
iproute2: man page and /bin/ip disagree on del vs delete

Reported by Robert Henney:
> the 'ip' man page does not mention the command "del" at all but does
> claim, "As a rule, it is possible to add, delete and show (or list ) objects".
> however, 'ip' does not always recognize "delete" as a commend.
>
> robh@debian:~$ ip tunnel delete
> Command "delete" is unknown, try "ip tunnel help".

Lets use "delete" in all calls to matches() for consistency. This will
make both "del" and "delete" work everywhere.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
13 years agov3.4.0 v3.4.0
Stephen Hemminger [Mon, 21 May 2012 21:12:19 +0000 (14:12 -0700)] 
v3.4.0

13 years agoiproute2: trivial fix of ip link syntax in manpage
Andreas Henriksson [Mon, 21 May 2012 13:48:06 +0000 (15:48 +0200)] 
iproute2: trivial fix of ip link syntax in manpage

Reported by Ivan Vilata i Balaguer <ivan@selidor.net>
found that the description of the `ip link add` command in the manpage
is outdated regarding the compulsory `link DEVICE` option.
For instance, `ip  link help` says:
    Usage: ip link add [link DEV] [ name ] NAME
     ...
But the manpage still says:
     ip link add link DEVICE [ name ] NAME

(Trying to provide a `link` option e.g. under an LXC container can frustrate
 the creation of dummy devices which don't need an actual device.)

The syntax of the "ip link help" output was fixed in commit
"iproute2: Fix usage and man page for 'ip link'" (a22e92951d).
This updates the manpage to mark "link DEVICE" as an optional
argument there as well.

  http://bugs.debian.org/673171

Signed-off-by: Andreas Henriksson <andreas@fatal.se>