]> git.proxmox.com Git - mirror_iproute2.git/log
mirror_iproute2.git
10 years agoadd support for IFA_F_NOPREFIXROUTE
Thomas Haller [Tue, 7 Jan 2014 20:46:28 +0000 (21:46 +0100)]
add support for IFA_F_NOPREFIXROUTE

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoadd support for IFA_F_MANAGETEMPADDR
Jiri Pirko [Mon, 6 Jan 2014 09:17:10 +0000 (10:17 +0100)]
add support for IFA_F_MANAGETEMPADDR

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoUpdate headers files from net-next
Stephen Hemminger [Mon, 20 Jan 2014 20:28:42 +0000 (12:28 -0800)]
Update headers files from net-next

10 years agoiproute2: finish support for bonding attributes
sfeldma@cumulusnetworks.com [Sat, 4 Jan 2014 02:45:38 +0000 (18:45 -0800)]
iproute2: finish support for bonding attributes

Add support for bonding attributes just added to net-next.
On set, allow string or number value for enumerated attributes.
On show, use always use string value for attribute.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
10 years agoMerge branch 'master' into net-next-for-3.13
Stephen Hemminger [Fri, 10 Jan 2014 07:08:50 +0000 (23:08 -0800)]
Merge branch 'master' into net-next-for-3.13

10 years agoss: add unix_seqpacket to the help message and the man page
Masatake YAMATO [Wed, 8 Jan 2014 11:13:48 +0000 (20:13 +0900)]
ss: add unix_seqpacket to the help message and the man page

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoss: enable query by type in unix domain related socket
Masatake YAMATO [Wed, 8 Jan 2014 11:13:47 +0000 (20:13 +0900)]
ss: enable query by type in unix domain related socket

This patch enables -A unix_stream, -A unix_dgram and
-A unix_seqpacket option even if ss gets socket information
via netlink.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoss: handle seqpacket type of unix domain socket
Masatake YAMATO [Wed, 8 Jan 2014 11:13:46 +0000 (20:13 +0900)]
ss: handle seqpacket type of unix domain socket

ss didn't distignish seqpacket type from dgram type.
With this patch ss can distignish it.

 $ misc/ss -x -a | grep seq
 u_seq  LISTEN     0      128    /run/udev/control 10966                 * 0
 u_seq  ESTAB      0      0                    * 115103                * 115104
 u_seq  ESTAB      0      0                    * 115104                * 115103

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoPIE: Proportional Integral controller Enhanced
Vijay Subramanian [Wed, 8 Jan 2014 06:00:39 +0000 (22:00 -0800)]
PIE: Proportional Integral controller Enhanced

Proportional Integral controller Enhanced (PIE) is a scheduler to address the
bufferbloat problem.

We present here a lightweight design, PIE(Proportional Integral controller
Enhanced) that can effectively control the average queueing latency to a target
value. Simulation results, theoretical analysis and Linux testbed results have
shown that PIE can ensure low latency and achieve high link utilization under
various congestion situations. The design does not require per-packet
timestamp, so it incurs very small overhead and is simple enough to implement
in both hardware and software.  "

For more information, please see technical paper about PIE in the IEEE
Conference on High Performance Switching and Routing 2013. A copy of the paper
can be found at ftp://ftpeng.cisco.com/pie/.

Please also refer to the IETF draft submission at
http://tools.ietf.org/html/draft-pan-tsvwg-pie-00

All relevant code, documents and test scripts and results can be found at
ftp://ftpeng.cisco.com/pie/.

For problems with the iproute2/tc or Linux kernel code, please contact Vijay
Subramanian (vijaynsu@cisco.com or subramanian.vijay@gmail.com) Mythili Prabhu
(mysuryan@cisco.com)

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: Mythili Prabhu <mysuryan@cisco.com>
CC: Dave Taht <dave.taht@bufferbloat.net>
10 years agoadd support for extended ifa_flags
Jiri Pirko [Mon, 6 Jan 2014 09:17:09 +0000 (10:17 +0100)]
add support for extended ifa_flags

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoUpdate to 3.13-rc6 + net-next headers
Stephen Hemminger [Fri, 10 Jan 2014 06:45:49 +0000 (22:45 -0800)]
Update to 3.13-rc6 + net-next headers

10 years agoMerge branch 'master' into net-next-for-3.13
Stephen Hemminger [Fri, 10 Jan 2014 06:44:17 +0000 (22:44 -0800)]
Merge branch 'master' into net-next-for-3.13

10 years agoiproute: Document the "ip link add index IDX" possibility
Pavel Emelyanov [Mon, 30 Dec 2013 09:55:17 +0000 (13:55 +0400)]
iproute: Document the "ip link add index IDX" possibility

Signed-off-by: Pavel Emelyanov <xemul@paralles.com>
10 years agoiptunnel: Allow GRE_KEY for vti interface
Hangbin Liu [Thu, 5 Dec 2013 16:19:01 +0000 (00:19 +0800)]
iptunnel: Allow GRE_KEY for vti interface

The vti interface will use GRE_KEY to match the right policy in kernel. So we
can not return fail when the tunnel is vti.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
10 years agoiproute: Make it possible to specify index on link creation
Pavel Emelyanov [Thu, 26 Dec 2013 19:15:20 +0000 (23:15 +0400)]
iproute: Make it possible to specify index on link creation

The RTM_NEWLINK message accepts ifi_index non-zero value and lets
creation of links with given index (if it's free, or course). This
functionality is available since linux-v3.5.

This patch makes this API available via ip tool.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
10 years agoupdate to latest net-next headers
Stephen Hemminger [Sat, 28 Dec 2013 19:15:10 +0000 (11:15 -0800)]
update to latest net-next headers

10 years agodont skip action order
Jamal Hadi Salim [Sun, 22 Dec 2013 15:37:44 +0000 (10:37 -0500)]
dont skip action order

attached.

cheers,
jamal
commit 58d78f9f6447df324cdeb99262442c5e3f1f924b
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sun Dec 22 10:34:18 2013 -0500

    dont skip displaying of action chains or lists by TCA_ACT_MAX_PRIO

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoallow batch gets of actions
Jamal Hadi Salim [Sun, 22 Dec 2013 15:33:13 +0000 (10:33 -0500)]
allow batch gets of actions

Attached.

cheers,
jamal
commit c5f30cabef14c951596210b96bc9b423b0d39592
Author: Jamal Hadi Salim <hadi@mojatatu.com>
Date:   Sun Dec 22 10:24:17 2013 -0500

    Allow batching of action gets
    Example:
    ----
    tc actions get \
    action gact index 100 \
    action gact index 4
    ----

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agosimple print newline
Jamal Hadi Salim [Sun, 22 Dec 2013 12:50:09 +0000 (07:50 -0500)]
simple print newline

attached.

cheers,
jamal
commit d7869e6167c3553e93e254940b0647032b40fed8
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sun Dec 22 07:46:28 2013 -0500

    print new line at the end for aesthetics

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agopolicer - retire old syntax
Jamal Hadi Salim [Sat, 21 Dec 2013 22:16:53 +0000 (17:16 -0500)]
policer - retire old syntax

attached.

cheers,
jamal
commit b82057d9ec851a8aba8a295b959190ef5098f330
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sat Dec 21 17:00:11 2013 -0500

    After a decade of trying to deprecate the old policer syntax,
    I believe it is time to kill it. The kernel build option for old
    policer is gone for at least 5 years now (although backward
    compatibility is still there). Being backward compatible meant
    hijacking the keyword "action" and was obstructing policies like:

    tc filter add dev eth0 parent ffff: protocol ip pref 10 \
    u32 match ip protocol 1 0xff flowid 1:10 \
    action skbedit mark 1 \
    action police rate 10kbit burst 10k pipe \
    action skbedit mark 2 \
    action police rate 20kbit burst 20k pipe \
    action action mirred egress mirror dev dummy0

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoskbedit print missing metadata
Jamal Hadi Salim [Sat, 21 Dec 2013 21:38:37 +0000 (16:38 -0500)]
skbedit print missing metadata

skbedit should print the index and other generic metadata info

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoskbedit to default to pipe
Jamal Hadi Salim [Sat, 21 Dec 2013 21:38:36 +0000 (16:38 -0500)]
skbedit to default to pipe

Allow skbedit to be used as is in an action chain by default
without need to specify pipe

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoip: Add HSR support
Arvid Brodin [Tue, 17 Dec 2013 01:22:46 +0000 (02:22 +0100)]
ip: Add HSR support

Add basic support for High-Availability Seamless Redundancy (HSR) network
devices.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
10 years agoHandle netdev group for veth peer too
Sergey Popovich [Wed, 11 Dec 2013 12:25:07 +0000 (14:25 +0200)]
Handle netdev group for veth peer too

Currently ip-link(8) parses, but ignores "group" argument to
peer interface on veth creation.

Insert IFLA_GROUP attribute for peer interface when present.

Signed-off-by: Sergey Popovich <popovich_sergei@mail.ru>
10 years agoveth: fix uninitialized arguments
Stephen Hemminger [Fri, 20 Dec 2013 16:25:13 +0000 (08:25 -0800)]
veth: fix uninitialized arguments

Based on patch by Sergey Popovich <popovich_sergei@mail.ru>
This fixes crash when ip-link(8) invoced with command:

  ip link add dev veth1a type veth peer

10 years agocheck return value of rtnl_send and related functions
Stephen Hemminger [Fri, 20 Dec 2013 16:15:02 +0000 (08:15 -0800)]
check return value of rtnl_send and related functions

Use warn_unused_result to enforce checking return value of rtnl_send,
and fix where the errors are.

Suggested by initial patch from Petr Písař <ppisar@redhat.com>

10 years agonetconf: add support for neighbor proxy attribute
Stephen Hemminger [Wed, 18 Dec 2013 06:26:56 +0000 (22:26 -0800)]
netconf: add support for neighbor proxy attribute

Report changes to proxy_arp/proxy_ndp attribute.

10 years agoUpdate header files to 3.13-rc2 net-next
Stephen Hemminger [Wed, 18 Dec 2013 06:22:01 +0000 (22:22 -0800)]
Update header files to 3.13-rc2 net-next

10 years agoFix FSF address in file headers
Stephen Hemminger [Fri, 6 Dec 2013 23:05:07 +0000 (15:05 -0800)]
Fix FSF address in file headers

10 years agotc: more user friendly rates
Eric Dumazet [Fri, 22 Nov 2013 06:37:17 +0000 (22:37 -0800)]
tc: more user friendly rates

Display more user friendly rates.

10Mbit is more readable than 10000Kbit

Before :
class htb 1:2 root prio 0 rate 10000Kbit ceil 10000Kbit ...

After:
class htb 1:2 root prio 0 rate 10Mbit ceil 10Mbit ...

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agotbf: add 64bit rates support
Yang Yingliang [Tue, 26 Nov 2013 01:55:35 +0000 (09:55 +0800)]
tbf: add 64bit rates support

tbf support 64bit rates start from linux-3.13.
Add 64bit rates support in tc tools.

tc qdisc show dev eth0
qdisc tbf 1: root refcnt 2 rate 40000Mbit burst 230000b peakrate 50000Mbit minburst 87500b lat 50.0ms

This is a followup to ("htb: support 64bit rates").

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: Eric Dumazet <edumazet@google.com>
10 years agoUpdate headers to 3.13-rc2
Stephen Hemminger [Tue, 3 Dec 2013 07:42:58 +0000 (23:42 -0800)]
Update headers to 3.13-rc2

10 years agohtb: support 64bit rates
Eric Dumazet [Tue, 12 Nov 2013 22:34:07 +0000 (14:34 -0800)]
htb: support 64bit rates

Starting from linux-3.13, we can break the 32bit limitation of
rates on HTB qdisc/classes.

Prior limit was 34.359.738.360 bits per second.

lpq83:~# tc -s qdisc show dev lo ; tc -s class show dev lo
qdisc htb 1: root refcnt 2 r2q 2000 default 1 direct_packets_stat 0 direct_qlen 6000
 Sent 6591936144493 bytes 149549182 pkt (dropped 0, overlimits 213757419 requeues 0)
 rate 39464Mbit 114938pps backlog 0b 15p requeues 0
class htb 1:1 root prio 0 rate 50000Mbit ceil 50000Mbit burst 200000b cburst 0b
 Sent 6591942184547 bytes 149549310 pkt (dropped 0, overlimits 0 requeues 0)
 rate 39464Mbit 114938pps backlog 0b 15p requeues 0
 lended: 149549310 borrowed: 0 giants: 0
 tokens: 336 ctokens: -164

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agoupdate to net-next headers
Stephen Hemminger [Sat, 23 Nov 2013 01:29:02 +0000 (17:29 -0800)]
update to net-next headers

10 years agoupdate kernel headers to 3.13-rc1
Stephen Hemminger [Sat, 23 Nov 2013 01:22:35 +0000 (17:22 -0800)]
update kernel headers to 3.13-rc1

10 years agoMerge branch 'net-next-3.11'
Stephen Hemminger [Sat, 23 Nov 2013 01:20:57 +0000 (17:20 -0800)]
Merge branch 'net-next-3.11'

10 years agov3.12.0
Stephen Hemminger [Sat, 23 Nov 2013 01:10:33 +0000 (17:10 -0800)]
v3.12.0

10 years agoip: make -resolve addr to print names rather than addresses
Sami Kerola [Mon, 30 Sep 2013 21:01:48 +0000 (22:01 +0100)]
ip: make -resolve addr to print names rather than addresses

As a system admin I occasionally want to be able to check that all
interfaces has a name in DNS or /etc/hosts file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agoss: avoid passing negative numbers to malloc
Andreas Henriksson [Wed, 13 Nov 2013 08:46:42 +0000 (09:46 +0100)]
ss: avoid passing negative numbers to malloc

Example:

$ ss state established \( sport = :4060  or sport = :4061 or sport = :4062  or sport = :4063 or sport = :4064  or sport = :4065 or sport = :4066  or sport = :4067 \)  > /dev/null
Aborted

In the example above ssfilter_bytecompile(...) will return (int)136.
char l1 = 136; means -120 which will result in a negative number
being passed to malloc at misc/ss.c:913.

Simply declare l1 and l2 as integers to avoid the char overflow.

This is one of the issues originally reported in http://bugs.debian.org/511720

Fix the same problem in other code paths as well (thanks to Eric Dumazet).

Reported-by: Andreas Schuldei <andreas@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Reviewed-by: Eric Dumazet <edumazet@google.com>
10 years agoipaddrlabel: use uint32_t instead of int32_t
Hangbin Liu [Tue, 19 Nov 2013 15:46:20 +0000 (23:46 +0800)]
ipaddrlabel: use uint32_t instead of int32_t

As both linux kernel and function ipaddrlabel_modify use unsigned int for
label. We should also use unsigned int value when print addrlabel in case of
misunderstanding.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
10 years agoip: make -resolve addr to print names rather than addresses
Sami Kerola [Mon, 30 Sep 2013 21:01:48 +0000 (22:01 +0100)]
ip: make -resolve addr to print names rather than addresses

As a system admin I occasionally want to be able to check that all
interfaces has a name in DNS or /etc/hosts file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agoss: avoid passing negative numbers to malloc
Andreas Henriksson [Wed, 13 Nov 2013 08:46:42 +0000 (09:46 +0100)]
ss: avoid passing negative numbers to malloc

Example:

$ ss state established \( sport = :4060  or sport = :4061 or sport = :4062  or sport = :4063 or sport = :4064  or sport = :4065 or sport = :4066  or sport = :4067 \)  > /dev/null
Aborted

In the example above ssfilter_bytecompile(...) will return (int)136.
char l1 = 136; means -120 which will result in a negative number
being passed to malloc at misc/ss.c:913.

Simply declare l1 and l2 as integers to avoid the char overflow.

This is one of the issues originally reported in http://bugs.debian.org/511720

Fix the same problem in other code paths as well (thanks to Eric Dumazet).

Reported-by: Andreas Schuldei <andreas@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Reviewed-by: Eric Dumazet <edumazet@google.com>
10 years agoipaddrlabel: use uint32_t instead of int32_t
Hangbin Liu [Tue, 19 Nov 2013 15:46:20 +0000 (23:46 +0800)]
ipaddrlabel: use uint32_t instead of int32_t

As both linux kernel and function ipaddrlabel_modify use unsigned int for
label. We should also use unsigned int value when print addrlabel in case of
misunderstanding.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
10 years agotc: add cls_bpf frontend
Daniel Borkmann [Mon, 28 Oct 2013 11:35:33 +0000 (12:35 +0100)]
tc: add cls_bpf frontend

This is the iproute2 part of the kernel patch "net: sched:
add BPF-based traffic classifier".

[Will re-submit later again for iproute2 when window for
 -next submissions opens.]

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Thomas Graf <tgraf@suug.ch>
10 years agoiplink: add support for bonding netlink
Jiri Pirko [Fri, 18 Oct 2013 15:50:01 +0000 (17:50 +0200)]
iplink: add support for bonding netlink

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoUpdate kernel headers
Stephen Hemminger [Wed, 30 Oct 2013 23:42:03 +0000 (16:42 -0700)]
Update kernel headers

Lastest from net-next

10 years agoMerge branch 'master' into net-next-3.11
Stephen Hemminger [Wed, 30 Oct 2013 23:41:07 +0000 (16:41 -0700)]
Merge branch 'master' into net-next-3.11

Conflicts:
tc/q_fq.c

10 years agoFix tc stats when using -batch mode
Nigel Kukard [Wed, 30 Oct 2013 18:44:58 +0000 (18:44 +0000)]
Fix tc stats when using -batch mode

There are two global variables in tc/tc_class.c:
__u32 filter_qdisc;
__u32 filter_classid;

These are not re-initialized for each line received in -batch mode:
class show dev eth0 parent 1: classid 1:1
class show dev eth0 parent 1: classid 1:1
Error: duplicate "classid": "1:1" is the second value.

This patch fixes the issue by initializing the two globals when we
enter print_class().

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
10 years agovxlan: add ipv6 support
WANG Cong [Thu, 17 Oct 2013 05:03:48 +0000 (22:03 -0700)]
vxlan: add ipv6 support

The kernel already supports it, so add the support
to iproute2 as well.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
10 years agoupdate kernel headers
Stephen Hemminger [Wed, 30 Oct 2013 23:36:47 +0000 (16:36 -0700)]
update kernel headers

10 years agohtb: remove old unused duplicate qdisc name
Stephen Hemminger [Sun, 27 Oct 2013 19:28:38 +0000 (12:28 -0700)]
htb: remove old unused duplicate qdisc name

Alexey had htb2 as name for version in ancient code.

10 years agoFix handling of qdis without options
Stephen Hemminger [Sun, 27 Oct 2013 19:26:47 +0000 (12:26 -0700)]
Fix handling of qdis without options

Some qdisc like htb want the parse_qopt to be called even if no options
present. Fixes regression caused by:

e9e78b0db0e023035e346ba67de838be851eb665 is the first bad commit
commit e9e78b0db0e023035e346ba67de838be851eb665
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Mon Aug 26 08:41:19 2013 -0700

    tc: allow qdisc without options

10 years agoiplink: update available type list
Nicolas Dichtel [Tue, 8 Oct 2013 14:59:45 +0000 (07:59 -0700)]
iplink: update available type list

macvtap and vti were missing.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
10 years agoxfrm: enable to set non-wildcard mark 0 on SAs and SPs
Christophe Gouault [Tue, 8 Oct 2013 12:56:54 +0000 (05:56 -0700)]
xfrm: enable to set non-wildcard mark 0 on SAs and SPs

ip xfrm considers that the user-defined mark is "any" as soon as
(mark.v & mark.m == 0), which prevents from specifying non-wildcard
marks that include the value 0 (typically 0/0xffffffff).

Yet, matching exactly mark 0 is useful for instance to separate
vti policies from global policies.

Always configure the user mark if mark.m != 0.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
10 years agoiproute2: ip6gre: update man pages
xeb@mail.ru [Tue, 1 Oct 2013 07:18:34 +0000 (11:18 +0400)]
iproute2: ip6gre: update man pages

Update man pages with ip6gre info.

Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
10 years agoipv6 gre: add entry to ether types
Stephen Hemminger [Tue, 1 Oct 2013 04:40:05 +0000 (21:40 -0700)]
ipv6 gre: add entry to ether types

10 years agoiproute2: GRE over IPv6 tunnel support.
xeb@mail.ru [Sat, 28 Sep 2013 07:32:51 +0000 (11:32 +0400)]
iproute2: GRE over IPv6 tunnel support.

GRE over IPv6 tunnel support.

Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
10 years agoaction: typo nat fix
Jamal Hadi Salim [Sun, 29 Sep 2013 11:39:23 +0000 (07:39 -0400)]
action: typo nat fix

If you taketh you giveth.
I Went the LinuxWay and copied this for m_simple.c and noticed
this one typo (I wonder where it came from?;->).

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agotc: introduce simple action
Jamal Hadi Salim [Sun, 29 Sep 2013 11:33:42 +0000 (07:33 -0400)]
tc: introduce simple action

Simple action is already in the kernel for years now as an
example. This complements it with user space control.

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agotc: add default action to kernel headers
Stephen Hemminger [Tue, 1 Oct 2013 04:28:09 +0000 (21:28 -0700)]
tc: add default action to kernel headers

10 years agoxfrm: use memcpy to suppress gcc phony buffer overflow warning.
Fan Du [Tue, 1 Oct 2013 04:09:05 +0000 (21:09 -0700)]
xfrm: use memcpy to suppress gcc phony buffer overflow warning.

This bug is reported from below link:
https://bugzilla.redhat.com/show_bug.cgi?id=982761

An simplified command from its original reproducing method in bugzilla:
ip xfrm state add src 10.0.0.2 dst 10.0.0.1 proto ah spi 0x12345678 auth md5 12
will cause below spew from gcc.

Reported-by: Sohny Thomas <sthomas@linux.vnet.ibm.com>
10 years agoiproute2: bridge: Close file with bridge monitor file
Petr Písař [Wed, 25 Sep 2013 07:45:45 +0000 (09:45 +0200)]
iproute2: bridge: Close file with bridge monitor file

The `bridge monitor file FILENAME' reads dumped netlink messages from
a file. But it forgot to close the file after using it. This patch
fixes it.

Signed-off-by: Petr Písař <ppisar@redhat.com>
10 years agolnstat, nstat, ifstat: update man pages
Stephen Hemminger [Tue, 24 Sep 2013 19:00:41 +0000 (12:00 -0700)]
lnstat, nstat, ifstat: update man pages

New json option

10 years agolnstat: add json output format
Stephen Hemminger [Tue, 24 Sep 2013 18:55:27 +0000 (11:55 -0700)]
lnstat: add json output format

10 years agoifstat: add json output format
Stephen Hemminger [Tue, 24 Sep 2013 18:55:13 +0000 (11:55 -0700)]
ifstat: add json output format

10 years agonstat: revise json output
Stephen Hemminger [Tue, 24 Sep 2013 18:54:45 +0000 (11:54 -0700)]
nstat: revise json output

Also add long options

10 years agoMerge /tmp/iproute2
Stephen Hemminger [Tue, 24 Sep 2013 17:17:18 +0000 (10:17 -0700)]
Merge /tmp/iproute2

10 years agoMerge branch 'net-next-3.11'
Stephen Hemminger [Mon, 23 Sep 2013 20:16:48 +0000 (13:16 -0700)]
Merge branch 'net-next-3.11'

10 years agoUpdate to 3.12-rc1 headers
Stephen Hemminger [Mon, 23 Sep 2013 20:15:49 +0000 (13:15 -0700)]
Update to 3.12-rc1 headers

10 years agohtb: add support for direct_qlen attribute
Eric Dumazet [Fri, 13 Sep 2013 16:10:01 +0000 (09:10 -0700)]
htb: add support for direct_qlen attribute

TCA_HTB_DIRECT_QLEN attribute is supported since linux-3.10

HTB classes use an internal pfifo queue, which limit was not reported
by tc, and value inherited from device tx_queue_len at setup time.

With this patch, tc displays the value and can change it.

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agotc: support TCA_STATS_RATE_EST64
Eric Dumazet [Tue, 17 Sep 2013 11:19:03 +0000 (04:19 -0700)]
tc: support TCA_STATS_RATE_EST64

Since linux-3.11, rate estimator can provide TCA_STATS_RATE_EST64
when rate (bytes per second) is above 2^32 (~34 Mbits)

Change tc to use this attribute for high rates.

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agoiproute2: bridge: document mdb
Petr Písař [Thu, 19 Sep 2013 08:41:26 +0000 (10:41 +0200)]
iproute2: bridge: document mdb

This augments bridge(8) manual page with `bridge mdb' and `bridge
monitor mdb' commands which have been added recently.

Signed-off-by: Petr Písař <ppisar@redhat.com>
10 years agopkt_sched: fq: Fair Queue packet scheduler
Eric Dumazet [Fri, 30 Aug 2013 02:30:36 +0000 (19:30 -0700)]
pkt_sched: fq: Fair Queue packet scheduler

Support for FQ packet scheduler

$ tc qd add dev eth0 root fq help
Usage: ... fq [ limit PACKETS ] [ flow_limit PACKETS ]
              [ quantum BYTES ] [ initial_quantum BYTES ]
              [ maxrate RATE  ] [ buckets NUMBER ]
              [ [no]pacing ]

$ tc -s -d qd
qdisc fq 8002: dev eth0 root refcnt 32 limit 10000p flow_limit 100p
buckets 256 quantum 3028 initial_quantum 15140
 Sent 216532416 bytes 148395 pkt (dropped 0, overlimits 0 requeues 14)
 backlog 0b 0p requeues 14
  511 flows (511 inactive, 0 throttled)
  110 gc, 0 highprio, 0 retrans, 1143 throttled, 0 flows_plimit

limit : max number of packets on whole Qdisc (default 10000)

flow_limit : max number of packets per flow (default 100)

quantum : the max deficit per RR round (default is 2 MTU)

initial_quantum : initial credit for new flows (default is 10 MTU)

maxrate : max per flow rate (default : unlimited)

buckets : number of RB trees (default : 1024) in hash table.
               (consumes 8 bytes per bucket)

[no]pacing : disable/enable pacing (default is enable)

Usage :

tc qdisc add dev $ETH root fq

tc qdisc del dev $ETH root 2>/dev/null
tc qdisc add dev $ETH root handle 1: mq
for i in `seq 1 4`
do
  tc qdisc add dev $ETH parent 1:$i est 1sec 4sec fq
done

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agonstat: add json output format
Stephen Hemminger [Fri, 13 Sep 2013 17:31:41 +0000 (10:31 -0700)]
nstat: add json output format

New command line flag to output statistics in JSON format.
In our envrionment, we have scripts that parse output of commands.
It is better to use a format supported by existing parsers.

10 years agopkt_sched: fq: Fair Queue packet scheduler
Eric Dumazet [Fri, 30 Aug 2013 02:30:36 +0000 (19:30 -0700)]
pkt_sched: fq: Fair Queue packet scheduler

Support for FQ packet scheduler

$ tc qd add dev eth0 root fq help
Usage: ... fq [ limit PACKETS ] [ flow_limit PACKETS ]
              [ quantum BYTES ] [ initial_quantum BYTES ]
              [ maxrate RATE  ] [ buckets NUMBER ]
              [ [no]pacing ]

$ tc -s -d qd
qdisc fq 8002: dev eth0 root refcnt 32 limit 10000p flow_limit 100p
buckets 256 quantum 3028 initial_quantum 15140
 Sent 216532416 bytes 148395 pkt (dropped 0, overlimits 0 requeues 14)
 backlog 0b 0p requeues 14
  511 flows (511 inactive, 0 throttled)
  110 gc, 0 highprio, 0 retrans, 1143 throttled, 0 flows_plimit

limit : max number of packets on whole Qdisc (default 10000)

flow_limit : max number of packets per flow (default 100)

quantum : the max deficit per RR round (default is 2 MTU)

initial_quantum : initial credit for new flows (default is 10 MTU)

maxrate : max per flow rate (default : unlimited)

buckets : number of RB trees (default : 1024) in hash table.
               (consumes 8 bytes per bucket)

[no]pacing : disable/enable pacing (default is enable)

Usage :

tc qdisc add dev $ETH root fq

tc qdisc del dev $ETH root 2>/dev/null
tc qdisc add dev $ETH root handle 1: mq
for i in `seq 1 4`
do
  tc qdisc add dev $ETH parent 1:$i est 1sec 4sec fq
done

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agoUpdate to 3.11 net-next kernel headers
Stephen Hemminger [Tue, 3 Sep 2013 15:46:40 +0000 (08:46 -0700)]
Update to 3.11 net-next kernel headers

10 years agoMerge branch 'master' into net-next-3.11
Stephen Hemminger [Tue, 3 Sep 2013 15:45:27 +0000 (08:45 -0700)]
Merge branch 'master' into net-next-3.11

10 years agov3.11.0
Stephen Hemminger [Tue, 3 Sep 2013 15:23:03 +0000 (08:23 -0700)]
v3.11.0

10 years agolinklayer interface between kernel and tc/userspace
Jesper Dangaard Brouer [Fri, 30 Aug 2013 12:02:10 +0000 (14:02 +0200)]
linklayer interface between kernel and tc/userspace

This iproute2 tc patch is connected to the kernel
 - commit 8a8e3d84b17 (net_sched: restore "linklayer atm" handling)

The rate table calculated by tc, have gotten replaced in the kernel
and is no-longer used for lookups.

This happened in kernel release v3.8 caused by kernel
 - commit 56b765b79 ("htb: improved accuracy at high rates").
This change unfortunately caused breakage of tc overhead and
linklayer parameters.

 Kernel overhead handling got fixed in kernel v3.10 by
 - commit 01cb71d2d47 (net_sched: restore "overhead xxx" handling)

 Kernel linklayer handling got fixed in kernel v3.11 by
 - commit 8a8e3d84b17 (net_sched: restore "linklayer atm" handling)

The linklayer fix introduced a struct change, that allow the linklayer
attribute to be transferred between tc and kernel. This patch make use
of this linklayer attribute.

The linklayer setting is transfer to the kernel.  And linklayer
setting received from the kernel is printed with a prefixed
"linklayer" when listing current configuration.  The default
TC_LINKLAYER_ETHERNET is only printed in detailed output mode.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
10 years agoipnetns: fix ip batch mode when using 'netns exec'
Nicolas Dichtel [Thu, 29 Aug 2013 12:29:07 +0000 (14:29 +0200)]
ipnetns: fix ip batch mode when using 'netns exec'

Since commit a05f6511f543, ip batch mode is broken when using 'netns exec' cmd.

When WIFEXITED() returns true, it means that the child exited normally, hence
we must not call exit() but just returns the status. If we call exit, the next
commands in the file file are not executed.
If WIFEXITED() returns false, we can call exit() because it means that the
child failed.

This patch partially reverts commit a05f6511f543.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
10 years agoUpdate kernel headers to 3.11
Stephen Hemminger [Tue, 3 Sep 2013 15:18:25 +0000 (08:18 -0700)]
Update kernel headers to 3.11

Last minute addition to pkt_sched.h

10 years agoip/xfrm: Fix potential SIGSEGV when printing extra flags
Thomas Egerer [Thu, 29 Aug 2013 12:00:36 +0000 (14:00 +0200)]
ip/xfrm: Fix potential SIGSEGV when printing extra flags

The git-commit dc8867d0, that added support for displaying the
extra-flags of a state, introduced a potential segfault.
Trying to show a state without the extra-flag attribute and show_stats
enabled, would cause the NULL pointer in tb[XFRMA_SA_EXTRA_FLAGS] to be
dereferenced.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
10 years agomacvlan: fix typo in macvlan_print_opt()
Lutz Jaenicke [Thu, 29 Aug 2013 07:50:28 +0000 (09:50 +0200)]
macvlan: fix typo in macvlan_print_opt()

The mode information is contained in IFLA_MACVLAN_MODE instead
of IFLA_VLAN_ID (both evaluating to "1" in their enums).

Signed-off-by: Lutz Jaenicke <ljaenicke@innominate.com>
10 years agoiproute2: ip-route.8.in: minor fixes
Richard Godbee [Mon, 26 Aug 2013 02:40:19 +0000 (22:40 -0400)]
iproute2: ip-route.8.in: minor fixes

In SYNOPSIS section:

 - Add 'reordering'
 - Add missing '[' before 'quickack'

Signed-off-by: Richard Godbee <richard@godbee.net>
10 years agoiproute2: spelling: noptmudisc -> nopmtudisc
Richard Godbee [Mon, 26 Aug 2013 02:40:18 +0000 (22:40 -0400)]
iproute2: spelling: noptmudisc -> nopmtudisc

Signed-off-by: Richard Godbee <richard@godbee.net>
10 years agoiproute2: iproute.c: fix usage() spacing problems
Richard Godbee [Mon, 26 Aug 2013 02:19:11 +0000 (22:19 -0400)]
iproute2: iproute.c: fix usage() spacing problems

Fix two spacing problems around square brackets in usage text.

Signed-off-by: Richard Godbee <richard@godbee.net>
10 years agoadd ability to filter neighbour discovery by protocol
Stephen Hemminger [Thu, 29 Aug 2013 19:18:52 +0000 (12:18 -0700)]
add ability to filter neighbour discovery by protocol

Useful to be able to monitor arp and IPv6 nd seperately.
Default is both.

10 years agotc: allow qdisc without options
Stephen Hemminger [Mon, 26 Aug 2013 15:41:19 +0000 (08:41 -0700)]
tc: allow qdisc without options

Pfifo_fast needs no options. So don't force it to have parsing code.

10 years agoip: Add label option to ip monitor
Martin Schwenke [Mon, 19 Aug 2013 05:43:30 +0000 (15:43 +1000)]
ip: Add label option to ip monitor

Prefix labelling is currently only activated when monitoring "all"
objects.  However, the output can still be confusing when monitoring
more than 1 object, so add an option to always print prefix labels.

Signed-off-by: Martin Schwenke <martin@meltin.net>
10 years agoMore minor spelling fixes
Stephen Hemminger [Sun, 4 Aug 2013 22:10:05 +0000 (15:10 -0700)]
More minor spelling fixes

10 years agoFix spelling errors
Stephen Hemminger [Sun, 4 Aug 2013 22:00:56 +0000 (15:00 -0700)]
Fix spelling errors

Minor errors found by codespell

10 years agocleanup help message
Stephen Hemminger [Sun, 4 Aug 2013 22:00:42 +0000 (15:00 -0700)]
cleanup help message

Split it naturally

10 years agoiproute vxlan add support for fdb replace command
Thomas Richter [Tue, 30 Jul 2013 06:16:41 +0000 (08:16 +0200)]
iproute vxlan add support for fdb replace command

Add support for the bridge fdb replace command to replace an
existing entry in the vxlan device driver forwarding data base.
The entry is identified with its unicast mac address and its
corresponding remote destination information is updated.

This is useful for virtual machine migration and replaces the
bridge fdb del and bridge fdb add commands.

It follows the same interface as ip neigh replace commands.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
10 years agoip rule: add route suppression options
Stefan Tomanek [Sat, 3 Aug 2013 12:23:16 +0000 (14:23 +0200)]
ip rule: add route suppression options

When configuring a system with multiple network uplinks and default routes, it
is often convenient to reference a routing table multiple times - but reject
its routing decision if certain constraints are not met by it.

Consider this setup:

$ ip route add table secuplink default via 10.42.23.1

$ ip rule add pref 100            table main suppress_prefixlength 0
$ ip rule add pref 150 fwmark 0xA table secuplink

With this setup, packets marked 0xA will be processed by the additional routing
table "secuplink", but only if no suitable route in the main routing table can
be found. By suppressing entries with a prefixlength of 0 (or less), the
default route (/0) of the table "main" is hidden to packets processed by rule
100; packets traveling to destinations via more specific routes are processed
as usual.

It is also possible to suppress a routing entry if a device belonging to
a specific interface group is to be used:

$ ip rule add pref 150 table main suppress_group 1

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
10 years agoMerge branch 'master' into net-next-3.11
Stephen Hemminger [Sun, 4 Aug 2013 18:53:10 +0000 (11:53 -0700)]
Merge branch 'master' into net-next-3.11

10 years agoip link: fix display of interface groups
Stefan Tomanek [Sat, 3 Aug 2013 12:20:53 +0000 (14:20 +0200)]
ip link: fix display of interface groups

This change adds the interface group to the output of "ip link show".

It also makes "ip link" print _all_ devices if no group filter is specified;
previously, only interfaces of the default group (0) were shown.

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
10 years agoUpdate kernel headers to net-next for 3.12
Stephen Hemminger [Sun, 4 Aug 2013 18:43:02 +0000 (11:43 -0700)]
Update kernel headers to net-next for 3.12

10 years agoRemove -Werror
Stephen Hemminger [Thu, 1 Aug 2013 00:42:39 +0000 (17:42 -0700)]
Remove -Werror

-Werror just doesn't work because it changes too much
between compiler versions.

10 years agoip: allow to specify mode for sit tunnels
Nicolas Dichtel [Tue, 16 Jul 2013 20:54:14 +0000 (22:54 +0200)]
ip: allow to specify mode for sit tunnels

It's now possible to have IPv4 and IPv6 over IPv4 tunnels with the module sit.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
10 years agoipadress: fix display of IPv6 peer address
Nicolas Dichtel [Tue, 16 Jul 2013 20:52:48 +0000 (22:52 +0200)]
ipadress: fix display of IPv6 peer address

Because only IPv4 was supported, the size was static. Now, IPv6 also supports
peer address.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>