History log of /external/iproute2/ip/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b7a3df0f3c56c10587e926307daaa87fc3b854bf 09-Jul-2013 Lorenzo Colitti <lorenzo@google.com> Support experimental UID range routing.

This uses the FRA_UID_START and FRA_UID_END rule attribute types
with values 18 and 19, and the RTA_UID route attribute type
with value 18.

Syntax uses the uidrange keyword for rules and the uid keyword
for routes. Example:

root@hammerhead:/ # ip -6 rule add prio 123 uidrange 100-200 lookup 100
root@hammerhead:/ # ip -6 rule | grep uidrange
123: from all uidrange 100-200 lookup 100
ooot@hammerhead:/ #
t@hammerhead:/ # ip -4 route get uid 10045 8.8.4.4
8.8.4.4 via 192.168.159.254 dev wlan0 src 192.168.158.102 uid 10045
cache

(cherry picked from commit 628e7252f75b2621d4b8c5f9314f55f3ec24b92b)

Change-Id: I52d544f27ffef895ad5513a516e37cfba7da9b75
proute.c
prule.c
7de04b4ce8ae85b30994b4e13ad3cbc66aa4c977 03-Jan-2014 Elliott Hughes <enh@google.com> Use bionic's setns(2).

Change-Id: Iee7479c91128ce635cf81b38c5696891e2db295d
ndroid.mk
98f709fb7327dde7fb1092fabed030a90e1dfb51 07-Dec-2013 Kristian Monsen <kristianm@google.com> Hide all warnings from this project

Turn on warning as error to detect new warnings.

Change-Id: Id20a927c0f47208efb0b841e72de4bdd0d09323c
ndroid.mk
7f28894dbd83c9d75c9cf2100469f5c2b0ab0515 12-Jun-2013 JP Abgrall <jpa@google.com> ip: update Android.mk for v3.4.0 new files.

ipnetns and few others have appeared since the 2.6.35 update.

Bug: 5095649
Change-Id: Ifaf9135cb28e85e519c6983faf0ebc29f3e85dd8
ndroid.mk
1c7928f8c1f12873e8f3b7767a3b342170737f8f 20-Feb-2013 Yegor Yefremov <yegorslists@googlemail.com> Use relative path for private includes

Change-Id: I44071e1035560ecff2fd4a8a9723468b0e23eb8a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
4675a9a740b84981a3186b7c8c788147f6675cb5 17-Mar-2012 Yegor Yefremov <yegorslists@googlemail.com> iproute2: don't optimize unused routines

without these linker options such routines like
can_parse_opt, vlan_parse_opt will be excluded
from the final binary

Change-Id: If783e5476fdb82af0173d717f0b1127399b349c5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
ndroid.mk
85d633f9776644b851a356924a2f5cdbbaada786 06-Apr-2012 Wei Zhong <wzhong@google.com> Add NOTICE and MODULE_LICENSE files for every Android.mk

Bug: 6299628

Change-Id: I0ca2bf16e7712e0d5ee2985ed4db75889cbd5ce0
Signed-off-by: Wei Zhong <wzhong@google.com>
(cherry picked from commit ba2925d39555590dd4bec50c413d6b4d65f5405e)
ODULE_LICENSE_GPL
OTICE
5e84eb545d859852894c0b79bf74d1edb3d2f733 18-Sep-2010 Dmitry Shmidt <dimitrysh@google.com> ip: Add LOCAL_MODULE_TAGS := optional

Change-Id: Ie1a5a18e6e5a11cfd573c6bc789b3ec8d0e86e46
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
b082b9f9ad94f08d3f3d2e617f71dbaf3751ccad 08-Sep-2010 Dmitry Shmidt <dimitrysh@google.com> iproute2: Add ip utility

Change-Id: If7072c8d1b2d23c4383a452a4b0afddad779f3c1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
p.c
pxfrm.c
frm_monitor.c
frm_policy.c
frm_state.c
e2780880761df1ab1e8249653e9a18d19d66ae81 26-Apr-2012 Stephen Hemminger <shemminger@vyatta.com> Revert "iproute2: allow IPv6 addresses for l2tp local and remote parameters"

This reverts commit 16eba34485b7275f1b72d6c480d7062127617370.
Hold off until next release.
pl2tp.c
16eba34485b7275f1b72d6c480d7062127617370 20-Apr-2012 Chris Elston <celston@katalix.com> 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>
pl2tp.c
5c434a9e5a5eafec09ec9939b255948843423f80 01-Mar-2012 Christoph J. Thompson <cjsthompson@gmail.com> iproute2 - Fix up and simplify variables pointing to install directories

Define where is the are located the iproute2 config files.
Get rid of trailing slashes for paths in several file.

Signed-off-by: Christoph J. Thompson <cjsthompson@gmail.com>
plink.c
ff24746cca1ef0c92d46614158e6672acd6b63d3 10-Apr-2012 Stephen Hemminger <shemminger@vyatta.com> Convert to use rta_getattr_ functions

User new functions (inspired by libmnl) to do type safe access
of routeing attributes
p_common.h
paddress.c
plink_macvlan.c
plink_macvtap.c
plink_vlan.c
pneigh.c
pntable.c
proute.c
prule.c
pxfrm.c
ink_gre.c
49b730d7b237a3c0b2361e77877228199f32cf9c 10-Apr-2012 Jorge Boncompte [DTI2] <jorge@dti2.net> iproute: show metrics as an unsigned value

Avoids showing negative metrics.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
proute.c
4ccfb44dfbe4bf34130cf601a2a59152f4eec816 06-Apr-2012 Stephen Hemminger <stephen.hemminger@vyatta.com> Make link mode case independent

The link mode is printed in upper case, and following the general
rule that ip command output should work on input, allow either case.
plink.c
4f2fdd44b6694f713aa638cc2222a2d7d17dfe5f 06-Apr-2012 Stephen Hemminger <stephen.hemminger@vyatta.com> Add ability to set link state with ip

Exposes existing netlink operations to modify link state of devices.
p_common.h
paddress.c
plink.c
ae5555d3342299252b8690ead236694b7dc660c9 26-Mar-2012 João Valverde <jpv950@gmail.com> ipl2tp: allow setting session interface name

Hi,

I've attached a trivial patch for iproute2 to allow naming interfaces
created with "ip l2tp add session".

I believe patches should go through the netdev mailing list but this
patch is so small I figured that would just add noise. Hope that's OK.

Originally I thought I would need a bigger patch and was going to take a
stab at implementing something like

ip l2tp add tunnel L2TP_TUNNEL_ARGS
ip link add name NAME [ LINK_OPTS ] type l2tp L2TP_SESSION_ARGS

(a better interface IMHO) but all the code was there already, all that I
needed to add was option parsing.

Thanks,

João Valverde

From fd8c3b712527d2e959aeabc6f6b71a9910e7be7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= <joao.valverde@ist.utl.pt>
Date: Mon, 26 Mar 2012 18:30:56 +0100
Subject: [PATCH] ipl2tp: allow setting session interface name
pl2tp.c
82499282b27c82a25448dc40948920950c9a6936 20-Mar-2012 Stephen Hemminger <shemminger@vyatta.com> ip: allow set and display of link mode parameter

The kernel supports a link mode attribute (which can be dormant or default).
This attribute is used to control how the link watch engine
handles operstate transistion.

This adds a new parameter to ip link command to allow setting and
displaying the value.
---
paddress.c
plink.c
718165534d0c57ea23c536f57affe7f04a33199a 20-Mar-2012 Stephen Hemminger <shemminger@vyatta.com> gre: allow 0 as a legal key value

There is nothing in the standard that says 0 can't be used as a key.
It makes sense to allow it. Also fix typo where ikey was printed for
when printing okey.
ink_gre.c
598a42c09153a1b6cfe03efa3f7e68773eec912d 13-Mar-2012 Florian Westphal <fw@strlen.de> ip: xfrm: report nat-t/encapsulation portmapping updates

Signed-off-by: Florian Westphal <fw@strlen.de>
frm_monitor.c
09fa32794154a69d4a6fbc58c1ee02dbe26a99e9 14-Mar-2012 Stephen Hemminger <shemminger@vyatta.com> iproute: allow changing gretap parameters

Change the order of evaluation of ip link type arguements to allow
changing parameters of gre tunnels.

The following wouldn't work:
# ip li add mytunnel type gretap remote 1.1.1.1 key 3
# ip li set mytunnel type gretap key 9
plink.c
8ced4fcd50dbbf7a0219ff5705390e6f89ba434c 27-Feb-2012 Yegor Yefremov <yegorslists@googlemail.com> iproute2: cleanup dependencies

LIBNETLINK will be defined in the main Makefile, so
both ../lib/libnetlink.a ../lib/libutil.a will be
automatically appended during linking. Otherwise
../lib/libnetlink.a ../lib/libutil.a will appear
twice during linking.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
akefile
e6e6fb5c6a4f12112d41c6f4a3de1002f7fc3d4f 22-Feb-2012 Stephen Hemminger <shemminger@vyatta.com> ipaddress: cleanup code for link stats64

On 64 bit platform, casting to unsigned long long is unnecessary.
Use inttypes.h and stdtypes.h to resolve it.
paddress.c
1dac7817b44f0dea2828c2b897c7b3c81550e057 26-Jan-2012 Tony Zelenoff <antonz@parallels.com> Modify neighbour proxy show

New "ip neigh show proxy" command now can show proxies which
were added with "ip neigh add proxy" command. Kernel code to
support this feature sent a bit earlier to netdev.

Signed-off-by: Tony Zelenoff <antonz@parallels.com>
pneigh.c
5aa08f6bf4107f8aec43c0678466a314dbd0d054 20-Jan-2012 Stephen Hemminger <shemminger@vyatta.com> ip: make 'ip l' be 'ip link'

Restore compatiablity for those lazy typists.
p.c
13603f6a9e46f08576f6284a0ef1ce1fbf94ffe0 10-Jan-2012 Stephen Hemminger <shemminger@vyatta.com> iplt2p: remove unused libnl headers

Leftover from change to original code.
pl2tp.c
38cd311adef818a891a0d9fa778969419fe55141 24-Dec-2011 Stephen Hemminger <shemminger@vyatta.com> l2tp: Add l2tp support

Based on earlier implementation by James Chapman. But instead of
dragging in all of libnl, use existing libnetlink infrastructure.
akefile
p.c
p_common.h
pl2tp.c
cd70f3f522e04b4d2fa80ae10292379bf223a53b 28-Dec-2011 Stephen Hemminger <shemminger@vyatta.com> libnetlink: remove unused junk callback

Both rtnl_talk and rtnl_dump had a callback for handling portions
of netlink message that do not match the correct pid or seq.
But this callback was never used by any part of iproute2 so remove
it.
paddress.c
paddrlabel.c
plink.c
pneigh.c
pntable.c
proute.c
prule.c
ink_gre.c
tmon.c
frm_policy.c
frm_state.c
6cf8398f5f487762586801c25539d8fe5bb33b39 23-Dec-2011 Stephen Hemminger <shemminger@vyatta.com> libnetlink: change rtnl_send() to take void *

Avoid having to cast buffer being sent.
plink.c
7b8179c780a1abd547e5002c4e6fba898c6d72bb 13-Oct-2011 Greg Rose <gregory.v.rose@intel.com> iproute2: Add new command to ip link to enable/disable VF spoof check

Add ip link command parsing for VF spoof checking enable/disable

V2 - Fixed problem with parsing of dump info on kernels that don't
support the spoof checking option and also wrapped the ifla_vf_info
structure in #ifdef __KERNEL__ to prevent user space from directly
accessing the structure
V3 - Improved parsing of vfinfo
V4 - Put Makefile back to proper list of subdirs
V5 - Remove struct ifla_vf_info, it is only used by the kernel
V6 - Make sure spoof check is reported by the driver - rtnl will set
it to -1 to indicate driver didn't report a value.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
paddress.c
plink.c
7397944de6c11519a5951fc1bcff20225e71c4bd 13-Oct-2011 Stephen Hemminger <shemminger@vyatta.com> ip: fix exit codes

Alternative fix to problem reported by: Bin Li
The issue is came from https://bugzilla.novell.com/show_bug.cgi?id=681952.

In any previous version (since suse ... 10.0?), ip addr add always returned
the error code 2 in case the ip address is already set on the interface:

inet 172.16.2.3/24 brd 172.16.2.255 scope global bond0
RTNETLINK answers: File exists
2

On 11.4, it returns the exit code 254:

inet 172.16.1.1/24 brd 172.16.1.255 scope global eth0
RTNETLINK answers: File exists
254

This of course causes ifup to return an error in this quite common case..
p.c
19bcc05beade576878abc04c53f17d4a5a620610 03-Oct-2011 Thomas Jarosch <thomas.jarosch@intra2net.com> Fix file descriptor leak on error in read_igmp()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
pmaddr.c
297452a1c24f1fbbdc41e220422aa1fb7b4dccf0 03-Oct-2011 Thomas Jarosch <thomas.jarosch@intra2net.com> Fix file descriptor leak in do_tunnels_list()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
ptunnel.c
e588a7db167df75e659f99bd3b024eedafed62cc 03-Oct-2011 Thomas Jarosch <thomas.jarosch@intra2net.com> Fix file descriptor leak on error in read_mroute_list()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
pmroute.c
67ef60a29333784d09245762e8270727cc758945 03-Oct-2011 Thomas Jarosch <thomas.jarosch@intra2net.com> Fix file descriptor leak on error in read_viftable()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
pmroute.c
25352af7c2ee7291ac54a00a77b7e1de20676fe6 03-Oct-2011 Thomas Jarosch <thomas.jarosch@intra2net.com> Fix file descriptor leak on error in iproute_flush_cache()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
proute.c
e9a927dc08c8e8e70f68f84983c488158afb4a95 03-Oct-2011 Thomas Jarosch <thomas.jarosch@intra2net.com> Add missing closedir() call in do_show()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
ptuntap.c
21a5a6b37892d7173f38691d1f84366840ce3917 19-Sep-2011 Jiri Benc <jbenc@redhat.com> iproute2: fix changing of ip6ip6 tunnel parameters

When changing ip6ip6 parameters (ip -6 tun change), ip passes zeroed
struct ip6_tnl_parm to the kernel. The kernel then tries to change all of
the tunnel parameters to the passed values, including zeroing of local and
remote address. This fails (-EEXIST in net/ipv6/ip6_tunnel.c:ip6_tnl_ioctl).

For other tunnel types, ip fetches the current parameters first and applies
the required changes on top of them. This patch applies the same code as in
ip/iptunnel.c to ip/ip6tunnel.c.

See http://bugzilla.redhat.com/730627 for the original bug report.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
p6tunnel.c
a22e92951d21d0f796040d0d6c00d59a1e188bca 07-Oct-2011 Sridhar Samudrala <sri@us.ibm.com> iproute2: Fix usage and man page for 'ip link'

Add bridge as a supported type with 'ip link' in usage and all the missing
types in 'ip' man page. Also fixed some typos.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
plink.c
1313ceb4d668d7ea343acb0c573aeae17669ff54 31-Aug-2011 Dan McGee <dan@archlinux.org> iptuntap: avoid double open

would leak a file handle
ptuntap.c
223f4d8ea6803bd9288d54c819e54a88a63c1730 15-Jul-2011 Eric W. Biederman <ebiederm@xmission.com> iproute2: Fail "ip netns add" on existing network namespaces.

Use O_EXCL so that we only create and mount a new network namespace
if there is no chance an existing network namespace is present.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
pnetns.c
2e8a07f543e6f48f0d0479e3dd4796c18f733e12 15-Jul-2011 Eric W. Biederman <ebiederm@xmission.com> iproute2: Auto-detect the presence of setns in libc

If libc has setns present use that version instead of
rolling the syscall wrapper by hand.

Dan McGee found the following compile error:

gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
-DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -c -o ipnetns.o ipnetns.c
ipnetns.c:31:12: error: static declaration of ‘setns’ follows non-static
declaration
/usr/include/bits/sched.h:93:12: note: previous declaration of ‘setns’
was here
make[1]: *** [ipnetns.o] Error 1

Reported-by: Dan McGee <dan@archlinux.org>
Tested-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
akefile
pnetns.c
c0c44bfedda05e52572cc16c9d7777e1077d86cf 20-Jul-2011 Andreas Henriksson <andreas@fatal.se> iproute2: Remove "monitor" from "ip route help" output

$ ip route help 2>&1 | grep monitor
ip route { add | del | change | append | replace | monitor } ROUTE
$ ip route monitor
Command "monitor" is unknown, try "ip route help".

(I guess what was really intended is "ip monitor route", so just remove
the argument from the help output.)

Originally reported by martin f krafft at http://bugs.debian.org/537681

While at it, also drop all non-existant (route,link,netns) monitor
arguments from the ip(8) man page.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
proute.c
c13f598242dd2b108016367ab318f15b0cf4db44 21-Jul-2011 Christoph Biedl <debian.axhn@manchmal.in-ulm.de> ip: fix display of prefix cache info

The "ip monitor" command does properly decode the "preferred" and
"valid" lifetime records in router advertisements from netlink
messages.
pprefix.c
0dc34c7713bb7055378fe5cbc720d63d0db572a1 13-Jul-2011 Eric W. Biederman <ebiederm@xmission.com> iproute2: Add processless network namespace support

The goal of this code change is to implement a mechanism such that it is
simple to work with a kernel that is using multiple network namespaces
at once.

This comes in handy for interacting with vpns where there may be rfc1918
address overlaps, and different policies default routes, name servers
and the like.

Configuration specific to a network namespace that would ordinarily be
stored under /etc/ is stored under /etc/netns/<name>. For example if
the dns server configuration is different for your vpn you would create
a file /etc/netns/myvpn/resolv.conf.

File descriptors that can be used to manipulate a network namespace can
be created by opening /var/run/netns/<NAME>.

This adds the following commands to iproute.
ip netns add NAME
ip netns delete NAME
ip netns monitor
ip netns list
ip netns exec NAME cmd ....
ip link set DEV netns NAME

ip netns exec exists to cater the vast majority of programs that only
know how to operate in a single network namespace. ip netns exec
changes the default network namespace, creates a new mount namespace,
remounts /sys and bind mounts netns specific configuration files to
their standard locations.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
akefile
p.c
p_common.h
plink.c
pnetns.c
cbec0219132afd1749e1b8852b8b3729988af841 11-Jun-2011 David Ward <david.ward@ll.mit.edu> xfrm: Update documentation

The ip(8) man page and the "ip xfrm [ XFRM-OBJECT ] help" command output
are updated to include missing options, fix errors, and improve grammar.
There are no functional changes made.

The documentation for the ip command has many different meanings for the
same formatting symbols (which really needs to be fixed). This patch makes
consistent use of brackets [ ] to indicate optional parameters, pipes | to
mean "OR", braces { } to group things together, and dashes - instead of
underscores _ inside of parameter names. The parameters are listed in the
order in which they are parsed in the source code.

There are several parameters and options that are still not mentioned or
need to be described more thoroughly in the "COMMAND SYNTAX" section of
the ip(8) man page. I would appreciate help from the developers with this.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
pxfrm.c
frm_monitor.c
frm_policy.c
frm_state.c
d93b6b51e6a2bc6f2a3e7710d89cef659276c17d 20-Jun-2011 Stephen Hemminger <shemminger@vyatta.com> ip: iproute fix set never used warning
proute.c
cdf3585224fe8042582c27825eb29763d7dedcf9 20-Jun-2011 Stephen Hemminger <shemminger@vyatta.com> ip: addrlabel fix set never used warning
paddrlabel.c
f78e316f25f8795e3e2b8d05ce2ecb908b62db9c 22-Oct-2009 Eric Dumazet <eric.dumazet@gmail.com> ip: Support IFLA_TXQLEN in ip link command

Eric Dumazet a écrit :
> We currently use an expensive ioctl() to get device txqueuelen, while
> rtnetlink gave it to us for free. This patch speeds up ip link operation
> when many devices are registered.
>

Here is a 2nd version od this patch, not displaying "qlen 0" useless info

[PATCH iproute2] ip: Support IFLA_TXQLEN in ip link show command

We currently use an expensive ioctl() to get device txqueuelen, while
rtnetlink gave it to us for free. This patch speeds up ip link operation
when many devices are registered.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
paddress.c
4d91e4f168025d7051291bcc23f0f7a853ab74f8 12-Apr-2011 Stephen Hemminger <shemminger@vyatta.com> Merge branch 'for-2.6.39' of /home/shemminger/iproute2-net-next

Conflicts:
include/linux/xfrm.h
ip/iplink.c
242b8da71be73204500cc85613a399d6968f23af 12-Apr-2011 Stephen Hemminger <shemminger@vyatta.com> Use INIT_NETDEV_GROUP

Now that headers are sanitized, use the define.
paddress.c
c0635644cd0a4471c09f665f7098713f3157c170 07-Apr-2011 Ulrich Weber <uweber@astaro.com> iproute2: parse flag XFRM_POLICY_ICMP

parse flag XFRM_POLICY_ICMP

Signed-off-by: Ulrich Weber <uweber@astaro.com>
pxfrm.c
frm_policy.c
1f7190db3920f76cca7fdcd1bb318c6cfa4a3266 23-Mar-2011 Brandon Philips <bphilips@suse.de> ip: fix memory leak in ipmaddr.c

If the continue is taken, then there is a memory leak.

https://bugzilla.novell.com/show_bug.cgi?id=538996

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Brandon Philips <bphilips@suse.de>
pmaddr.c
38c867d2a82d6f2b60450550fbaaadc5d9c77579 09-Mar-2011 Stephen Hemminger <stephen.hemminger@vyatta.com> Add checks for fgets() when reading proc

If expected proc headers are missing, catch and print error.
p6tunnel.c
pmaddr.c
pmroute.c
ptunnel.c
ac694c333fc543e3ff4b9bc672811a83c3223658 02-Feb-2011 Vlad Dogaru <ddvlad@rosedu.org> iproute2: support listing devices by group

User can specify device group to list by using the group keyword:

ip link show group test

If no group is specified, 0 (default) is implied.

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
paddress.c
plink.c
aba383448c2e0c5442c14937b03b02fbbb5be3d1 11-Jan-2011 Nicolas Dichtel <nicolas.dichtel@6wind.com> iproute2: allow to specify truncation bits on auth algo

Hi,

here is a patch against iproute2 to allow user to set a state with a specific
auth length.

Example:
$ ip xfrm state add src 10.16.0.72 dst 10.16.0.121 proto ah spi 0x10000000
auth-trunc "sha256" "azertyuiopqsdfghjklmwxcvbn123456" 96 mode tunnel
$ ip xfrm state
src 10.16.0.72 dst 10.16.0.121
proto ah spi 0x10000000 reqid 0 mode tunnel
replay-window 0
auth-trunc hmac(sha256)
0x617a6572747975696f707173646667686a6b6c6d77786376626e313233343536 96
sel src 0.0.0.0/0 dst 0.0.0.0/0

Regards,
Nicolas

>From 522ed7348cdf3b6f501af2a5a5d989de1696565a Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Thu, 23 Dec 2010 06:48:12 -0500
Subject: [PATCH] iproute2: allow to specify truncation bits on auth algo

Attribute XFRMA_ALG_AUTH_TRUNC can be used to specify
truncation bits, so we add a new algo type: auth-trunc.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
pxfrm.c
frm_state.c
db6b0cfa518de3b27c05bdf3efe05a7f77c4d97d 25-Feb-2011 Gerrit Renker <gerrit@erg.abdn.ac.uk> iproute: rename 'get_jiffies' since it uses msecs

The get_jiffies() function retrieves rtt-type values in units of
milliseconds. This patch updates the function name accordingly,
following the pattern given by dst_metric() <=> dst_metric_rtt().
proute.c
fca1dae821d627101914c36c9282fc244cd92744 25-Feb-2011 Gerrit Renker <gerrit@erg.abdn.ac.uk> iproute: fix unit conversion of rtt/rttvar/rto_min

Since July 2008 (2.6.27, c1e20f7c8b9), the kernel stores the values for
RTAX_{RTT{,VAR},RTO_MIN} in milliseconds. When using a kernel > 2.6.27 with
the current iproute2, conversion of these values is broken in either way.

This patch
* updates the code to pass and retrieve milliseconds;
* since values < 1msec would be rounded up, also drops the usec/nsec variants;
* since there is no way to query kernel HZ, also drops the jiffies variant.

Arguments such as
rtt 3.23sec
rto_min 0xff
rto_min 0.200s
rttvar 25ms
now all work as expected when reading back previously set values.
proute.c
897fb84fd9b872a544076f88430bc35fc12b7cc8 21-Dec-2010 Gerrit Renker <gerrit@erg.abdn.ac.uk> utils: get_jiffies always uses base=0

get_jiffies() is in all places called in the same manner, with base=0;
simplify argument list by putting the constant value into the function.
proute.c
4bb75da2d02ff16af775de0b2d12d07240c73eab 03-Feb-2011 Joy Latten <jml@austin.ibm.com> xfrm security context support

Adds security context support to ip xfrm state.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
frm_state.c
e5055b591b60e8627fcb18035ef80cf88c48fb7c 03-Feb-2011 Joy Latten <jml@austin.ibm.com> xfrm security context support

Adds security context support to ip xfrm policy.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
frm_policy.c
2c319e1ab7ebd371c0230f549890ae6c8ba49c8e 03-Feb-2011 Joy Latten <jml@austin.ibm.com> xfrm security context support

In the Linux kernel, ipsec policy and SAs can include a
security context to support MAC networking. This feature
is often referred to as "labeled ipsec".

This patchset adds security context support into ip xfrm
such that a security context can be included when
add/delete/display SAs and policies with the ip command.
The user provides the security context when adding
SAs and policies. If a policy or SA contains a security
context, the changes allow the security context to be displayed.

For example,
ip xfrm state
src 10.1.1.6 dst 10.1.1.2
proto esp spi 0x00000301 reqid 0 mode transport
replay-window 0
auth hmac(digest_null) 0x3078
enc cbc(des3_ede) 0x6970763672656164796c6f676f33646573636263696e3031
security context root:system_r:unconfined_t:s0

Please let me know if all is ok with the patchset.
Thanks!!

regards,
Joy

Signed-off-by: Joy Latten <latten@austin.ibm.com>
pxfrm.c
frm.h
f0612d566b8bb76866fa772076412d290ed4cf5e 17-Mar-2011 Sridhar Samudrala <sri@us.ibm.com> macvlan/macvtap: support 'passthru' mode

Add support for 'passthru' mode when creating a macvlan/macvtap device
which allows takeover of the underlying device and passing it to a KVM
guest using virtio with macvtap backend.

Only one macvlan device is allowed in passthru mode and it inherits
the mac address from the underlying device and sets it in promiscuous
mode to receive and forward all the packets.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
plink_macvlan.c
plink_macvtap.c
98f5519cd9db9d1ca58c49af27698101c8fff373 01-Feb-2011 Nicolas Dichtel <nicolas.dichtel@6wind.com> iproute2: add support of flag XFRM_STATE_ALIGN4

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
pxfrm.c
frm_state.c
d5b7420a269e6e220e00cfbd69546d157fac1332 26-Feb-2011 Stephen Hemminger <stephen.hemminger@vyatta.com> Remove #ifdef's

The iproute package keeps its own headers so there is no need
of polluting code with #ifdef's
paddress.c
plink.c
pneigh.c
proute.c
a1e191b90c35f5ef5d7dfba5ad8b5b7a7f57a421 26-Feb-2011 Jiri Pirko <jpirko@redhat.com> iplink: implement setting of master devic
plink.c
f323f2a32c3b9c29fb91c812472b7fd663f9ae73 11-Jan-2011 Nicolas Dichtel <nicolas.dichtel@6wind.com> iproute2: allow to specify truncation bits on auth algo

Hi,

here is a patch against iproute2 to allow user to set a state with a specific
auth length.

Example:
$ ip xfrm state add src 10.16.0.72 dst 10.16.0.121 proto ah spi 0x10000000
auth-trunc "sha256" "azertyuiopqsdfghjklmwxcvbn123456" 96 mode tunnel
$ ip xfrm state
src 10.16.0.72 dst 10.16.0.121
proto ah spi 0x10000000 reqid 0 mode tunnel
replay-window 0
auth-trunc hmac(sha256)
0x617a6572747975696f707173646667686a6b6c6d77786376626e313233343536 96
sel src 0.0.0.0/0 dst 0.0.0.0/0

Regards,
Nicolas

>From 522ed7348cdf3b6f501af2a5a5d989de1696565a Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Thu, 23 Dec 2010 06:48:12 -0500
Subject: [PATCH] iproute2: allow to specify truncation bits on auth algo

Attribute XFRMA_ALG_AUTH_TRUNC can be used to specify
truncation bits, so we add a new algo type: auth-trunc.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
pxfrm.c
frm_state.c
81d03dc356df24d55443535eace247b93ff47b4e 25-Feb-2011 Gerrit Renker <gerrit@erg.abdn.ac.uk> iproute: rename 'get_jiffies' since it uses msecs

The get_jiffies() function retrieves rtt-type values in units of
milliseconds. This patch updates the function name accordingly,
following the pattern given by dst_metric() <=> dst_metric_rtt().
proute.c
9b2cdc00dab7b601938901e20b5e1e66188d388b 25-Feb-2011 Gerrit Renker <gerrit@erg.abdn.ac.uk> iproute: fix unit conversion of rtt/rttvar/rto_min

Since July 2008 (2.6.27, c1e20f7c8b9), the kernel stores the values for
RTAX_{RTT{,VAR},RTO_MIN} in milliseconds. When using a kernel > 2.6.27 with
the current iproute2, conversion of these values is broken in either way.

This patch
* updates the code to pass and retrieve milliseconds;
* since values < 1msec would be rounded up, also drops the usec/nsec variants;
* since there is no way to query kernel HZ, also drops the jiffies variant.

Arguments such as
rtt 3.23sec
rto_min 0xff
rto_min 0.200s
rttvar 25ms
now all work as expected when reading back previously set values.
proute.c
94089ef7726cc25bffbd133fe5e1e16e0fd4654e 21-Dec-2010 Gerrit Renker <gerrit@erg.abdn.ac.uk> utils: get_jiffies always uses base=0

get_jiffies() is in all places called in the same manner, with base=0;
simplify argument list by putting the constant value into the function.
proute.c
0c7a594541df84d3497681a8ecc09b05c1449dd0 03-Feb-2011 Joy Latten <jml@austin.ibm.com> xfrm security context support

Adds security context support to ip xfrm state.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
frm_state.c
e4f054f017d0daa7ff9bba6027c5df264999ff1a 03-Feb-2011 Joy Latten <jml@austin.ibm.com> xfrm security context support

Adds security context support to ip xfrm policy.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
frm_policy.c
b2bb289a57fe7be63ebe0d1fe6ff94555bf6c936 03-Feb-2011 Joy Latten <jml@austin.ibm.com> xfrm security context support

In the Linux kernel, ipsec policy and SAs can include a
security context to support MAC networking. This feature
is often referred to as "labeled ipsec".

This patchset adds security context support into ip xfrm
such that a security context can be included when
add/delete/display SAs and policies with the ip command.
The user provides the security context when adding
SAs and policies. If a policy or SA contains a security
context, the changes allow the security context to be displayed.

For example,
ip xfrm state
src 10.1.1.6 dst 10.1.1.2
proto esp spi 0x00000301 reqid 0 mode transport
replay-window 0
auth hmac(digest_null) 0x3078
enc cbc(des3_ede) 0x6970763672656164796c6f676f33646573636263696e3031
security context root:system_r:unconfined_t:s0

Please let me know if all is ok with the patchset.
Thanks!!

regards,
Joy

Signed-off-by: Joy Latten <latten@austin.ibm.com>
pxfrm.c
frm.h
db02608b6f408998ea8c823fb791cead3e574f50 02-Feb-2011 Vlad Dogaru <ddvlad@rosedu.org> iproute2: support device group semantics

Add the group keyword to ip link set, which has the following meaning:
If both a group and a device name are pressent, we change the device's
group to the specified one. If only a group is present, then the
operation specified by the rest of the command should apply on an entire
group, not a single device.

So, to set eth0 to the default group, one would use
ip link set dev eth0 group default

Conversely, to set all the devices in the default group down, use
ip link set group default down

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
plink.c
ink_veth.c
26ad3aecfeeb93cd396a199a5e664e749bcabc8d 02-Feb-2011 Vlad Dogaru <ddvlad@rosedu.org> iproute2: support device group semantics

Add the group keyword to ip link set, which has the following meaning:
If both a group and a device name are pressent, we change the device's
group to the specified one. If only a group is present, then the
operation specified by the rest of the command should apply on an entire
group, not a single device.

So, to set eth0 to the default group, one would use
ip link set dev eth0 group default

Conversely, to set all the devices in the default group down, use
ip link set group default down

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
paddress.c
f960c92aac1838e0f336c0ca0f657bb55a42d8e9 02-Feb-2011 Vlad Dogaru <ddvlad@rosedu.org> iproute2: support listing devices by group

User can specify device group to list by using the group keyword:

ip link show group test

If no group is specified, 0 (default) is implied.

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
paddress.c
plink.c
1598b9ef7b6704af5126d632e324323703ca8112 13-Jan-2011 Stephen Hemminger <stephen.hemminger@vyatta.com> Revert "iproute2: add VF_PORT support"

This reverts commit 632110aa0db4518b33fc09189ffcdd1b2e2e1762.

There seem to be some recent changes in the 802.1Qbh/bg specs which may
result in changes to this patch in the near future. It seems like its best
to ignore this patch for now.
I will re-spin at a later time when the changes in the specs converge.

BTW, Please let me know if I should CC netdev list and others on the
original email. I can resend this email.

Thanks,
Roopa
paddress.c
plink.c
632110aa0db4518b33fc09189ffcdd1b2e2e1762 09-Nov-2010 Roopa Prabhu <roprabhu@cisco.com> iproute2: add VF_PORT support

Resubmitting Scott Feldmans original patch with below changes

- Fix port profile strlen which was off by 1
- Added function to convert IFLA_PORT_RESPONSE codes to string

Add support for IFLA_VF_PORTS. VF port netlink msg layout is

[IFLA_NUM_VF]
[IFLA_VF_PORTS]
[IFLA_VF_PORT]
[IFLA_PORT_*], ...
[IFLA_VF_PORT]
[IFLA_PORT_*], ...
...
[IFLA_PORT_SELF]
[IFLA_PORT_*], ...

The iproute2 cmd line for link set is now:

Usage: ip link add link DEV [ name ] NAME
[ txqueuelen PACKETS ]
[ address LLADDR ]
[ broadcast LLADDR ]
[ mtu MTU ]
type TYPE [ ARGS ]
ip link delete DEV type TYPE [ ARGS ]

ip link set DEVICE [ { up | down } ]
[ arp { on | off } ]
[ dynamic { on | off } ]
[ multicast { on | off } ]
[ allmulticast { on | off } ]
[ promisc { on | off } ]
[ trailers { on | off } ]
[ txqueuelen PACKETS ]
[ name NEWNAME ]
[ address LLADDR ]
[ broadcast LLADDR ]
[ mtu MTU ]
[ netns PID ]
[ alias NAME ]
[ port MODE { PROFILE | VSI } ]
[ vf NUM [ mac LLADDR ]
[ vlan VLANID [ qos VLAN-QOS ] ]
[ rate TXRATE ]
[ port MODE { PROFILE | VSI } ] ]
ip link show [ DEVICE ]

TYPE := { vlan | veth | vcan | dummy | ifb | macvlan | can }
MODE := { assoc | preassoc | preassocrr | disassoc }
PROFILE := profile PROFILE
[ instance UUID ]
[ host UUID ]
VSI := vsi mgr MGRID type VTID ver VER
[ instance UUID ]

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
paddress.c
plink.c
f4ff11e3e298d457c4f30813e305f7d27d89823a 01-Dec-2010 Dan Smith <danms@us.ibm.com> Add ip route save/restore

This patch adds save and restore commands to "ip route". Save dumps
the RTNL stream to stdout which can then be passed to restore later.
This may be helpful in some normal situations, and will allow C/R to
migrate the routing information in userspace. Tweaking of the stream
can be done by userspace helpers to convert between versions and adjust
things like device indexes when restoring routes in a different
environment.

By factoring out some of the common bits of print_route() into
filter_nlmsg(), the "save" command can use the same selection logic
as "list," allowing the caller to save only specific routes as
necessary.

The only change since the RFC is the addition of manpage and doc
material.

Signed-off-by: Dan Smith <danms@us.ibm.com>
proute.c
64c7956061500611061910067d76512afcd2ddb4 01-Dec-2010 Ben Greear <greearb@candelatech.com> Allow 'ip addr flush' to loop more than 10 times

The default remains at 10 for backwards compatibility.

For instance:
# ip addr flush dev eth2
*** Flush remains incomplete after 10 rounds. ***
# ip -l 20 addr flush dev eth2
*** Flush remains incomplete after 20 rounds. ***
# ip -loops 0 addr flush dev eth2
#

This is useful for getting rid of large numbers of IP
addresses in scripts.

Signed-off-by: Ben Greear <greearb@candelatech.com>
p.c
paddress.c
3f0a7b4c4f0a6c5462ad55b7fa4445c2d485f435 28-Oct-2010 Sridhar Samudrala <sri@us.ibm.com> Support 'mode' parameter when creating macvtap device

Add support for 'mode' parameter when creating a macvtap device.
This allows a macvtap device to be created in bridge, private or
the default vepa modes.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>

-------------------------------------------------------------------
Acked-by: Arnd Bergmann <arnd@arndb.de>
akefile
plink_macvtap.c
f66efadd79f75c61642d90e0b64081b4e0edf61c 06-Nov-2010 Andreas Schwab <schwab@linux-m68k.org> iproute2: remove useless use of buffer

Print directly to the file instead of going through a buffer.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
paddress.c
4a9608e6aefe40cf8545097ed23931f9bacba06d 23-Nov-2010 Timo Teräs <timo.teras@iki.fi> iproute2: support xfrm upper protocol gre key

Similar to tunnel side: accept dotted-quad and number formats.
Use regular number for printing the key.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
pxfrm.c
frm_policy.c
6f4f7c464ad4121582594f03163c2b5f324d4b4b 23-Nov-2010 Timo Teräs <timo.teras@iki.fi> iproute2: treat gre key as number

Print GRE key as a regular number. It is not really an IPv4 address
and this is also how Cisco and Juniper treats GRE keys. Do keep the
parsing of dotted-quad format for backwards compatibility.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
ptunnel.c
ea71beacacb9ebf756bbc250c71df59ec2f46243 28-Nov-2010 Stephen Hemminger <stephen.hemminger@vyatta.com> Use standard routines for interface name to index etc

Use the available libraries for mapping from interface index to name
or type. This should speed up display with lots of interfaces
p6tunnel.c
ptunnel.c
ink_gre.c
unnel.c
unnel.h
66abc090724a14baa0b931ecab4ea22ce91c4fb0 13-Sep-2010 Ulrich Weber <uweber@astaro.com> iproute2: display xfrm socket policy direction

display socket policy direction

Signed-off-by: Ulrich Weber <uweber@astaro.com>
pxfrm.c
b0373bfbbcc82fa68d3c7f0507cf4b1d8c54268b 21-Jul-2010 Eric Dumazet <eric.dumazet@gmail.com> ip: add RTA_MARK support

Adds support for RTA_MARK rt attribute added in linux-2.6.36

$ ip route get ADDR mark 4
192.168.20.110 dev eth1 src 192.168.20.108 mark 4
cache mtu 1500 advmss 1460 hoplimit 64

$ ip route get 192.168.20.108 from ADDR iif STRING mark 256
local 192.168.20.108 from 192.168.20.110 dev lo src 192.168.20.108 mark 0x100
cache <local,src-direct> iif eth1

$ ip route list cache [ADDR] mark NUMBER

Hexadecimal output if mark >= 16
null marks are not displayed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
proute.c
c73f3e02f8ae25e5daad0367690a3069895dd8a3 12-Aug-2010 Ulrich Weber <uweber@astaro.com> iproute2: dont filter cached routes on iproute_get

iproute_get will return cloned routes for IPv4
and cloned as well non-cloned routes for IPv6.

Therefore RTM_F_CLONED flag should not be checked
for iproute_get routes. Check in print_route will
always fail because valid values are 0 and 1.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
proute.c
3bc1c4f29777171b484d36abf673667e3729202b 16-Aug-2010 Ben Greear <greearb@candelatech.com> iproute2: Fix filtering related to flushing IP addresses.

The old 'ip addr flush' logic had several flaws:

* It reversed logic for primary v/s secondary flags
(though, it sort of worked right anyway)

* The code tried to remove secondaries and then primaries,
but in practice, it always removed one primary per loop,
which not at all efficient.

* The filter logic in the core would run only the first
filter in most cases.

* If you used '-s -s', the ifa_flags member would be
modified, which could make future filters fail
to function fine.

This patch attempts to fix all of these issues.

Tested-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
paddress.c
dec01609dc62d2137ed83c8ebccd2eef49d7aa97 21-May-2010 Arnd Hannemann <arnd@rhea.(none)> iproute2: Add dsfield as alias for tos for ip rules

Get ip rule parsing of "dsfield" in sync with ip route parsing and manual page.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
prule.c
0d1c9b570a40e3eef8c053a229713ac9344a4f83 16-Jul-2010 Ben Greear <greearb@candelatech.com> iproute2: Fix batch-mode for mrules.

The do_multirule logic was broken in batch mode because
it expected the preferred_family to be AF_INET or AF_INET6,
but it then assigned it to RTNL_FAMILY_IPMR or RTNL_FAMILY_IP6MR.
So, the next iteration of the batch processing, it failed
the check for AF_INET or AF_INET6.

Signed-off-by: Ben Greear <greearb@candelatech.com>
prule.c
62011a0b31009a16518e0b17ba7205349a4b2a72 23-Jul-2010 Ulrich Weber <uweber@astaro.com> iproute2: use int instead of long for RTAX_HOPLIMIT compare

otherwise "if ((int)val == -1)" will never match on 64 bit systems

Signed-off-by: Ulrich Weber <uweber@astaro.com>
proute.c
2eca8d3d3e3ae21918132c9118a2605d32aaed02 23-Jul-2010 Ulrich Weber <uweber@astaro.com> iproute2: use get_user_hz() for IPv6 print_route

as already done in IPv4 and metrics code part

Signed-off-by: Ulrich Weber <uweber@astaro.com>
proute.c
447928279c88b6581ae4cdc1b5ac0a9e755aff64 23-Jul-2010 Ulrich Weber <uweber@astaro.com> iproute2: filter routing entries based on clone flag

Before IPv6 routing cache entries were always displayed
if additional tables beside MAIN and LOCAL are installed.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
proute.c
b6c8e808fcea80da8bb97078ff942a0b9001e1c1 09-Jun-2010 Patrick McHardy <kaber@trash.net> ip: add support for multicast rules

commit 44a5293c1c47b8c32d9bb0756660ea5d4802acf2
Author: Patrick McHardy <kaber@trash.net>
Date: Tue Apr 13 17:03:47 2010 +0200

ip: add support for multicast rules

Signed-off-by: Patrick McHardy <kaber@trash.net>
p.c
p_common.h
prule.c
8864ac9dc5bd5ce049280337deb21191673a02d0 11-Mar-2010 Jan Engelhardt <jengelh@medozas.de> Add IFLA_STATS64 support

`ip -s link` shows interface counters truncated to 32 bit. This is
because interface statistics are transported only in 32-bit quantity
to userspace. This commit adds recognition for the new IFLA_STATS64
attribute that exports them in full 64 bit.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
paddress.c
3fd86630876aed8a23e4f2c2d72e68cbb2ee331a 18-May-2010 Chris Wright <chrisw@sous-sol.org> iproute2: rework SR-IOV VF support

The kernel interface changed just before 2.6.34 was released. This brings
iproute2 in line with the current changes. The VF portion of setlink is
comprised of a set of nested attributes.

IFLA_VFINFO_LIST (NESTED)
IFLA_VF_INFO (NESTED)
IFLA_VF_MAC
IFLA_VF_VLAN
IFLA_VF_TX_RATE

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
paddress.c
plink.c
24abb62ee737f98b4b5a7afc8b817cdb6eb53a46 07-May-2010 Florian Westphal <fw@strlen.de> iproute2: fix addrlabel interface names handling

ip addrlabel outputs if%d names due to missing init call:
$ ip addrlabel s
prefix a::42/128 dev if4 label 1000

Also, ip did not accept "if%d" interfaces on input.

Signed-off-by: Florian Westphal <fw@strlen.de>
paddrlabel.c
3979ef91de9ed17d21672aaaefd6c228485135a2 04-Apr-2010 Alexandre Cassen <acassen@freebox.fr> Detect 6rd kernel missing support / 6rd tunnel scope

This patch fix two issues:

* If kernel is not supporting 6rd then ioctl() call
will return EINVAL, if so just skip perror call.

* 6rd scope is ipv6/ip tunnels. Dont try to fetch
6rd tunnel parms if tunnel protocol != IPPROTO_IPV6.

Signed-off-by: Alexandre Cassen <acassen@freebox.fr>
ptunnel.c
unnel.c
1db61e022d5f4318b9b236fef48be48a65e00878 06-Mar-2010 Michele Petrazzo - Unipex <michele.petrazzo@unipex.it> Continue after errors in -batch

Allow ip to process all the file passed with the -batch argument when
is passed also the -force switch

Signed-off-by: Michele Petrazzo <michele.petrazzo@unipex.it>
paddress.c
33ff9324def1d618614ba869fa2d7e73fde8428e 04-Mar-2010 Stephen Hemminger <stephen.hemminger@vyatta.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2
8a5179466a142172a6f24f5d815c622541b3f61f 22-Feb-2010 Wolfgang Grandegger <wg@grandegger.com> iproute2: netlink support for bus-error reporting and counters

This patch uses the new features of the kernel's netlink CAN interface
making the bus-error reporting configurable and allowing to retrieve
the CAN TX and RX bus error counters via netlink interface. Here is the
output of my test session showing how to use them:

# ip link set can0 up type can bitrate 500000 berr-reporting on
# ip -d -s link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can <BERR-REPORTING> state ERROR-PASSIVE (berr-counter tx 128 rx 0) restart-ms 0
CAN bus error counter values ^^^^^^^^^^^
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 54101 0 1 1 0
RX: bytes packets errors dropped overrun mcast
432808 54101 54101 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

# ifconfig can0 down
# ip link set can0 up type can berr-reporting off
# candump -t d any,0:0,#FFFFFFFF
(0.000000) can0 20000004 [8] 00 08 00 00 00 00 60 00 ERRORFRAME
(0.000474) can0 20000004 [8] 00 20 00 00 00 00 80 00 ERRORFRAME
^^ ^^
\ \___ rxerr
\_____ txerr

Furthermore, the missing support for one-shot mode has been added.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
plink_can.c
c90cda94006ed9d4a53750bd036adbfe1ae7069d 23-Feb-2010 Jamal Hadi Salim <hadi@cyberus.ca> xfrm: add support for SA by mark

Add support for SA manipulation by mark

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
frm_state.c
f6fd52e626d7897e9df03331dbeb149beacb53ba 23-Feb-2010 Jamal Hadi Salim <hadi@cyberus.ca> xfrm: Introduce xfrm by mark

This patch carries basic infrastructure.
You need to make sure that the proper include/linux/xfrm.h is included
for it to compile.

Example:
pxfrm.c
frm.h
ee675e87149eeaed8f7ae43bdc8648b83a934eb8 23-Feb-2010 Jamal Hadi Salim <hadi@cyberus.ca> xfrm: policy by mark

Add support for SP manipulation by mark

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
frm_policy.c
ae7229d5f99ed9d7fd6ae11bcc726b80e8f8cb87 10-Feb-2010 Williams, Mitch A <mitch.a.williams@intel.com> ip: Add support for setting and showing SR-IOV virtual funtion link params

Add support to 'ip' for setting and showing SR-IOV virtual function
link parameters.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
paddress.c
plink.c
3e4f6a380a14a3100b1aa97a94c46d8712080863 04-Mar-2010 Stephen Hemminger <stephen.hemminger@vyatta.com> Fix line numbering on batch commands

ip command should not keep track of lineno, that is done
in getcmdline().
p.c
f5fd80039fb95242ad8d5796bdf2f52190a058b4 15-Dec-2009 laurent chavey <chavey@google.com> Add initrwnd to iproute2

Add initrwnd option parsing to iproute. This option uses the new
rtnetlink init_rcvwnd to set the TCP initial receive window size
advertised by passive and active TCP connections.

Signed-off-by: Laurent Chavey <chavey@google.com>
proute.c
b88215c4689d94628d3aa0ac112c290b6373860a 16-Dec-2009 Alexandre Cassen <acassen@freebox.fr> IPv6: 6rd iproute2 support

This patch provides iproute2 facilities to configure 6rd tunnel. To
configure a 6rd tunnel, you need to configure a sit tunnel and set
6rd prefix as following :

ip tunnel add sit1 mode sit local a.b.c.d ttl 64
ip tunnel 6rd dev sit1 6rd-prefix xxxx:yyyy::/z

Optionally you can provide a relay prefix :

ip tunnel 6rd dev sit1 6rd-relay_prefix e.f.g.h/i

Finally you can reset previous tunnel settings :

ip tunnel 6rd dev sit1 6rd-reset

Signed-off-by: Alexandre Cassen <acassen@freebox.fr>
ptunnel.c
unnel.c
unnel.h
a1b9ffccc29f160618d6018d6934d90daa959592 14-Sep-2009 Brian Haley <brian.haley@hp.com> ip: print "temporary" for IPv6 temp addresses

IPv6 addresses that have IFA_F_SECONDARY set are actually temporary addresses,
hence the IFA_F_TEMPORARY equivalent. Change the output in this case and
allow filtering on the word "temporary".

Signed-off-by: Brian Haley <brian.haley@hp.com>
paddress.c
63a0f20ac1fb2b98b6e68531b67ad83f09bbd272 09-Feb-2010 Andreas Henriksson <andreas@fatal.se> iproute2: drop equalize support

Currently you can configure "equalize" and it looks all fine and dandy.
The kernel has the interface defined, but apparently there's never actually
been any implementation for it (only a never merged patch in the 2.4 era).

I'm suggesting to drop the code to give any potential users of this feature
the benefit of receiving a proper error message. I see it unlikely that
this will be implemented in the near future, but if it ever happens
reviving the iproute2 side should be as easy as git revert this patch.

For more details see http://bugs.debian.org/149897
proute.c
e6e0b60f2a3d2720d4d9d6d0a50e3b48deea45e4 11-Jan-2010 Alex Badea <abadea@ixiacom.com> ip xfrm policy: allow different tmpl family

Allow tmpl IP addresses to have a different family than
selector addresses. This is useful in conjunction with
XFRM_STATE_AF_UNSPEC.

Signed-off-by: Alex Badea <abadea@ixiacom.com>
frm_policy.c
15bb82c6fb9ae401f48eb7f03179ee6669496bf0 11-Jan-2010 Alex Badea <abadea@ixiacom.com> ip xfrm state: parse and print "icmp" and "af-unspec" flags

Convert to/from XFRM_STATE_ICMP and XFRM_STATE_AF_UNSPEC state flags.

Signed-off-by: Alex Badea <abadea@ixiacom.com>
pxfrm.c
frm_state.c
d63a9b2b1e4e3eab0d0577d0a0f412d50be1e0a7 26-Dec-2009 Arnd Bergmann <arnd@arndb.de> iproute2/iplink: add macvlan options for bridge mode

Macvlan can now optionally support forwarding between its
ports, if they are in "bridge" mode. This adds support
for this option to "ip link add", "ip link set" and "ip
-d link show".

The default mode in the kernel is now "vepa" mode, meaning
"virtual ethernet port aggregator". This mode is used
together with the "hairpin" mode of an ethernet bridge
that the parent of the macvlan device is connected to.
All frames still get sent out to the external interface,
but the adjacent bridge is able to send them back on
the same wire in hairpin mode, so the macvlan ports
are able to see each other, which the bridge can be
configured to monitor and control traffic between
all macvlan instances. Multicast traffic coming in
from the external interface is checked for the source
MAC address and only delivered to ports that have not
yet seen it.

In bridge mode, macvlan will send all multicast traffic
to other interfaces that are also in bridge mode but
not to those in vepa mode, which get them on the way
back from the hairpin.

The third supported mode is "private", which prevents
communication between macvlans even if the adjacent
bridge is in hairpin mode. This behavior is closer to
the original implementation of macvlan but stricly
maintains isolation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
akefile
plink_macvlan.c
a1f277943f86bd6974dfef9f59e5ee43eaeac300 03-Dec-2009 Brian Haley <brian.haley@hp.com> Add dadfailed option to ip command

Fix support for IFA_F_DADFAILED and update ip.8 man page.

Signed-off-by: Brian Haley <brian.haley@hp.com>
paddress.c
85eae222d252546435bb5638b15d46ccfc9df32a 03-Dec-2009 Patrick McHardy <kaber@trash.net> iprule: add oif classification support

David Miller wrote:
> From: Patrick McHardy <kaber@trash.net>
> Date: Mon, 30 Nov 2009 19:00:14 +0100
>
>> This patch contains iproute support for iprule oif classification
>> for the send-to-self RFC I just sent out.
>
> Patrick, you need to submit a new version of this patch with
> the FIB_RULE_* macro fixed, just like the kernel version got
> fixed.

Thanks for reminind me of this. New patch attached.

commit 0fe5164cbaa1d65dda341075710be71bf1f32d10
Author: Patrick McHardy <kaber@trash.net>
Date: Fri Dec 4 07:06:18 2009 +0100

iprule: add oif classification support

Signed-off-by: Patrick McHardy <kaber@trash.net>
prule.c
2180b6b50bdc50e1a7740e5283930088da0bbae7 01-Dec-2009 Patrick McHardy <kaber@trash.net> iplink_vlan: add support for VLAN loose binding flag

This patch adds support for the VLAN loose binding flag that is
supported in net-next to iplink_vlan.

commit 870970deb6cbea7a5d4881bdd717304d5284d315
Author: Patrick McHardy <kaber@trash.net>
Date: Tue Dec 1 12:21:15 2009 +0100

iplink_vlan: add support for VLAN loose binding flag

Signed-off-by: Patrick McHardy <kaber@trash.net>
plink_vlan.c
b49240ec7eab91418d2f090536bf8cd2205988d6 02-Dec-2009 Simon Horman <horms@verge.net.au> flush secondary addresses before primary ones

Unless promote_secondaries has been active deleting the primary address of
an interface will automatically delete all the secondary addresses.

In the case where ip flush requests the primary then secondary addresses to
be removed - which is the order the addresses are returned by the kernel -
this will cause an error as by the time the request to remove a secondary
address is made it will be missing as it will have been deleted in the
course of deleting the primary address.

This approach to solving this problem orders requests for the
deletion of secondary addresses before primary ones providing
rtnl_dump_filter_l(), a version of rtnl_dump_filter() that
iterates over a list of filters. And by providing two specialised
filters print_addrinfo_secondary() and print_addrinfo_primary().

rtnl_dump_filter_l() first iterates over all addresses using
print_addrinfo_secondary(), which appends secondary addresses to the
request buffer. Then again using print_addrinfo_primary() which appends
primary addresses.

This approach should work regardless of it promote_secondaries is
active or not. And regardless of if any primary of secondary addresses
are present or not.

Signed-off-by: Simon Horman <horms@verge.net.au>
paddress.c
080b3ad42820e002b91ab4e3ddb728d2c6763b58 02-Dec-2009 Mark Borst <mark@borst.org> iproute: "ip mroute show" doesn't show all output interfaces

The command "ip mroute show" will only show the first Oif.

mark@flappie:~$ ip mroute show
(192.168.1.1, 224.0.0.123) Iif: _rename Oifs: eth1

mark@flappie:~$ cat /proc/net/ip_mr_cache
Group Origin Iif Pkts Bytes Wrong Oifs
7B0000E0 0101A8C0 2 0 0 0 0:1 1:1

This shows 2 Oifs here. However, ipmroute.c, function read_mroute_list(), uses sscanf() with a %s mask for oiflist, which stops after the first whitespace (i.e. after Oif 0:1). The patch below fixes this to read until the newline (though I'm not sure whether this is the proper way to fix it).

After this patch:
mark@flappie:~/iproute-20090324/ip$ ./ip mroute show
(192.168.1.1, 224.0.0.123) Iif: _rename Oifs: eth1 eth0

This patch originally submitted as http://bugs.debian.org/550097

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
pmroute.c
f4af851bac12b0a72515912d6e1458d41aa2e009 02-Dec-2009 Brian Haley <brian.haley@hp.com> ipv6: Add IFA_F_DADFAILED flag

Add IFA_F_DADFAILED flag to denote an IPv6 address that has
failed Duplicate Address Detection, that way tools like
/sbin/ip can be more informative.

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2001:db8::1/64 scope global tentative dadfailed
valid_lft forever preferred_lft forever

Signed-off-by: Brian Haley <brian.haley@hp.com>
paddress.c
71e5815105fb0b86af7df9c719f7c106f05f29c0 06-Oct-2009 Gilad Ben-Yossef <gilad@codefidence.com> iproute2 add hoplimit parsing and update usage and documentation

- Parse and handle the hoplimit ip route option and add it to the usage
line and documentation.

- Add the missing reordering ip route option to the usage line.

- Add documentation for initcwnd ip route option.

Tested by setting hoplimit and retreiving it via "show".

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
[ported to HEAD, fixed a bug with hoplimit lock handling, added documentation]
Signed-off-by: Ori Finkelman <ori@comsleep.com>
Signed-off-by: Yony Amit <yony@comsleep.com>
proute.c
232642c28c5320e6cf1e32f667f866c5f7372bfe 02-Dec-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Remove Changes: comments

Discourage developers from putting change log in comments
now that software has been under change control for 5 years.
p.c
p6tunnel.c
paddress.c
pneigh.c
proute.c
prule.c
ptunnel.c
f2e27cfb016e2465cd3f07e0b556058060702578 06-Nov-2009 Mike Frysinger <vapier@gentoo.org> support static-only systems

The iptables code supports a "no shared libs" mode where it can be used
without requiring dlfcn related functionality. This adds similar support
to iproute2 so that it can easily be used on systems like nommu Linux (but
obviously with a few limitations -- no dynamic plugins).

Rather than modify every location that uses dlfcn.h, I hooked the dlfcn.h
header with stub functions when shared library support is disabled. Then
symbol lookup is done via a local static lookup table (which is generated
automatically at build time) so that internal symbols can be found.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
akefile
tatic-syms.c
7f03191fda39ff09640f093b7ad84f461ffd65b2 28-Oct-2009 Patrick McHardy <kaber@trash.net> iproute uses too small of a receive buffer

It uses 1MB as receive buf limit by default (without
increasing /proc/sys/net/core/rmem_max it will be limited by less
however) and allows to specify the size manually using "-rcvbuf X"
(-r is already used, so you need to specify at least -rc).

Additionally rtnl_listen() continues on ENOBUFS after printing the
error message.
p.c
8a1c7fcb2756be05b55008edbd9e813f590cdf01 10-Nov-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Consolidate fprintf statements

Doing one item per call is like old MODULA2 code.
pxfrm.c
580fbd88f75cc9eea0d28a48c025b090eb9419a7 19-Sep-2009 David Woodhouse <dwmw2@infradead.org> Add 'ip tuntap' support.

This patch provides support for 'ip tuntap', allowing creation and
deletion of persistent tun/tap devices.
akefile
p.c
p_common.h
ptuntap.c
c1cdf2d2148ddeff9c622bdcc0671ffe002b7cd8 06-Aug-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Fix typo in IPPROTO_DCCP
frm.h
5a2044782b6a0eb7594d3b3e2e32bbd6a63e77f1 12-May-2009 Wolfgang Grandegger <wg@grandegger.com> iproute2: Support for the CAN netlink

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
akefile
plink.c
plink_can.c
a07e9912539d4ec26c954a9b03f04af987df6246 04-May-2009 Sascha Hlusiak <mail@saschahlusiak.de> iproute2: ISATAP potential router list

--Boundary-01=_wxi/JRaNdLkbr7g
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Stephen,

please review attached patch to add support for in-kernel potential router=
=20
lists for ISATAP tunnels.

Usage:
ip tunnel add name isatap0 mode isatap local 192.168.1.100
ip tunnel prl dev isatap0 prl-default 192.168.1.1
ip tunnel prl dev isatap0 prl-nodefault 192.168.1.2
ip tunnel prl dev isatap0 prl-delete 192.168.1.1
ip tunnel show # pr and pdr will be listed as well

Patch based on http://osprey67.com/seal/iproute2_diff.v0_3.txt by Fred L.=20
Templin.

Thanks,
Sascha
ptunnel.c
unnel.c
unnel.h
cb2eb9997a0292a144968d117f4d831c155ca71d 30-Apr-2009 Andreas Henriksson <andreas@fatal.se> Bug#526329: iproute: Segfault on garbage lladdr

On tor, 2009-04-30 at 14:32 +0100, Timothy Baldwin wrote:
> Package: iproute
> Version: 20090324-1
> Severity: minor
>
>
> $ ip link set eth0 address help
> "help" is invalid lladdr.
> Segmentation fault
>
> Desipte the invalid command line arguments it shouldn't crash.
>

Callers need to check return value from ll_addr_a2n(). Patch below.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
plink.c
b9ab720e33748cd022f095620e75ca7eba24a965 15-Apr-2009 Thomas Egerer <hakke_007@gmx.de> Fix display of xfrm

When using iproute2 to display information on policies installed in kernel
(ip x p s) output is incorrect: IPv6 addresses printed as IPv4 addresses.
In case I am dealing with inter protocol policies where the template's address
family differs from those of the policy itself.
The patch attached solves this problem.
pxfrm.c
685f3a9ffbdc504f27aff4a9fd70023f0b3da5d2 27-Mar-2009 Oliver Hartkopp <oliver@hartkopp.net> iproute2: add vcan to ip link help text

Hello Stephen,

thanks für the commit of my last CAN patch.

Today i got a hint, that the help text of 'ip link' can be improved also.

Many thanks!

Oliver

Signed-Off-By: Oliver Hartkopp <oliver@hartkopp.net>
plink.c
98f9a1d24442399db3b1b6190010855804ca15e2 27-Mar-2009 Oliver Hartkopp <oliver@hartkopp.net> Add support Controller Area Network

t's not a big problem, but it makes a better show in 'ip link show' on
CAN interfaces :-)

I also moved __PF(CAN,can) in ll_proto.c to the same position where it
can be found in if_ether.h .

The only thing i did not know if the __PF(CAN,can) in ll_types.c needs
to be put in #ifdef ARPHDR_CAN like __PF(HWX25,hwx25) is or not. You
definitely know that better than me.
paddress.c
c3651bf4763d7247e3edd4e20526a85de459041b 27-Mar-2009 Srivats P <srivats.p@conexant.com> ip6tunnel: Fix no default display of ip4ip6 tunnels

"ip -6 tunnel show" displays only ip6ip6 tunnels not ip4ip6 tunnels
- it should display all irrespective of proto.

This is because the default tunnel proto is initialized to IPPROTO_IPV6 in ip6_tnl_parm_init() which is fine for a 'add' command but not for 'show'. This patch overrides proto with 0 signifying 'mode any' as the default in case of a 'show'.
p6tunnel.c
eeef12c514269092ce679bf618a219fd8ad2aa68 27-Mar-2009 Sascha Hlusiak <Sascha@hlusiak.de> iptunnel: allow ISATAP with stateless autoconf

please commit my patch below to the iproutes package. It just an incorrect
check so that adding an isatap tunnel with remote works, since it's needed if
one wants to use stateless autoconf. The current check makes tunnel mode
isatap unusable for all client users.
ptunnel.c
6cdbf3706350c4d724ea8d35267ae93a4d99eab0 14-Mar-2009 Andreas Henriksson <andreas@fatal.se> iproute2: drop equalize support.

Hello Stephen and netdev people!

Currently you can configure "equalize" and it looks all fine and dandy.
The kernel has the interface defined, but apparently there's never actually
been any implementation for it (only a never merged patch in the 2.4 era).

I'm suggesting to drop the code to give any potential users of this feature
the benefit of receiving a proper error message. I see it unlikely that
this will be implemented in the near future, but if it ever happens
reviving the iproute2 side should be as easy as git revert this patch.

For more details see http://bugs.debian.org/149897

Regards,
Andreas Henriksson
pmonitor.c
4b6e07d8fde629073a512bf0cb86956c1d55145e 12-Mar-2009 Varun Chandramohan <varunc@linux.vnet.ibm.com> Enable Type Labels For "ip monitor all"

This patch adds prefix lables for "ip monitor all" command to simplfy
understanding of the output.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
pmonitor.c
fb063322b4339507157b5030978b5aeb7342e68b 12-Mar-2009 Varun Chandramohan <varunc@linux.vnet.ibm.com> Add Monitor Support For Neigh Table

This patch adds exclusive support to enable monitoring
neighbour table entries in ip command.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
pmonitor.c
10494d2724cac05d6a8a352205da18b86787eaba 07-Aug-2008 Petr Jediný <petr.jediny@gmail.com> Changing commandline help text to be more uniform...
p.c
4cd23bdde90cc7d2911106017c60617e96d9d1f4 08-Aug-2008 jamal <hadi@cyberus.ca> ip: Allow for easier debug of buggy devices that dont send their names

patch attached this time..

On Fri, 2008-08-08 at 10:01 -0400, jamal wrote:
> wireless drivers using wext is a prime example if you need a test case.
>
> cheers,
> jamal

ip: Allow for easier debug of buggy devices that dont send their names

With the old message couldnt tell which device had the bug.
This patch provides at least an ifindex to narrow it down.
Theres also no point in bailing out because of one bug; we
allow it to go on so we could dump as much info as we can

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
paddress.c
1957a322c9932e1a1d2ca1fd37ce4b335ceb7113 24-Mar-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Fix headers needed for gre

Need to get right headers or build breaks.
ink_gre.c
ced61d7dc44541127f0462409d81d11ee0da0a2e 23-Mar-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Handle default hoplimit

Default for hoplimit is -1 which should be displayed as zero.
proute.c
ace9c96121b10ff8f91d79b7486bb8a5520c12df 23-Mar-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Add support for IFALIAS

New 2.6.28 support for text description
paddress.c
plink.c
9a73e17deb231949f11e8ebf1303907c840b29cd 08-Jan-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Fix compile warnings

Gcc now warns about possible errors from passing a string
buffer as format arguement to printf().
pxfrm.c
037d950bceed6d5053758dea601e0d018f5f22d7 07-Jan-2009 Benedikt Gollatz <ben@differentialschokolade.org> When the preferred lifetime of a prefix assigned by IPv6 autoconfiguration
(router solicitation) becomes negative

How reproducible:

Always.

Steps to Reproduce:
1. Configure an IPv6 router to advertise a prefix with a short preferred
lifetime, e.g. 0.
2. Wait for the IPv6 autoconfiguration process to complete for an interface
<if> connected to a link where that router advertises.
3. Run ip -6 show dev <if>.

Actual results:

The preferred lifetime will have become negative, but it is printed as an
unsigned integer. The preferred lifetime to be displayed will therefore be
close to UINT_MAX.
paddress.c
7f71c0cae2db61890474e04ba3a26e40219e5561 25-Nov-2008 Olivier Fourdan <ofourdan@redhat.com> ip maddr show” on an infiniband address causes a stack corruption

“ip maddr show” on an infiniband address causes a stack corruption
because the length of the address for Infiniband (20 bytes, as
described in kernel doc Documentation/infiniband/ipoib.txt) does not
fit on the 16 bytes of the field in which it gets stored.

The proposed patch increases the size of the hardware address from 4
__u32 to 8 and also adds a check to avoid overriding the available
size while parsing the hardware address.

This bug affects current upstream code AFAICT.

Hope this helps,
Cheers,
Olivier.

“ip maddr show ib0” causes a stack corruption because the length of the address
for Infiniband (20 see kernel doc Documentation/infiniband/ipoib.txt) does not
fit on the 16 bytes of the field in which it gets stored.

The proposed patch increases the size of the hardware address from 4 u32 to 8
and adds a check to avoid overriding the available size while parsing the
hardware address.
pmaddr.c
72c771b20e38eaabb7699625fcdc144a51771f9c 07-Jan-2009 Herbert Xu <herbert@gondor.apana.org.au> Update version of IP gre

This patch adds support for configuring GRE tunnels using the
new rtnl_link interface. This only works on kernels that have
the new GRE configuration interface.

This is accessed through the "ip link" command. The previous
tunnel configuration interface "ip tunnel" remains as it is
and should be retained for compatibility with old kernels.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ink_gre.c
237d9e82c56918a1c972e6f30dd3cf1cfb957412 09-Oct-2008 Herbert Xu <herbert@gondor.apana.org.au> ip: gre: Add GRE configuration support through rtnl_link

This patch adds support for configuring GRE tunnels using the
new rtnl_link interface. This only works on kernels that have
the new GRE configuration interface.

This is accessed through the "ip link" command. The previous
tunnel configuration interface "ip tunnel" remains as it is
and should be retained for compatibility with old kernels.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
akefile
ink_gre.c
750a405a5a6f6cdae7d14609b49051e59738177e 13-Oct-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> Fix help text for ip link

This is a variant of Patrick McHardy patch for help text.
Add help for ip link add and ip link delete.
The help conditional on what the kernel supports.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
plink.c
3ef0c8594283d4891e84b4b8d7d04901416aeae0 07-Oct-2008 Patrick McHardy <kaber@trash.net> Refuse "ip link add/replace" without device type parameter

Fix confusing error message noticed by Martin Josefsson:
Fix typo noticed by Phil Oester: information vs. informatin

# ip link add
RTNETLINK answers: Operation not supported

The reason is missing device type information, refuse this and print a message.

Signed-off-by: Patrick McHardy <kaber@trash.net>
plink.c
053255520216654c6914e84b0a37e86c542898bd 07-Oct-2008 Patrick McHardy <kaber@trash.net> Support "ip link add help" for rtnl_link API

For some reason "ip link add help" is currently not supported when using
the new rtnl_link API. Fix that.

Signed-off-by: Patrick McHardy <kaber@trash.net>
plink.c
1f1ae524fbf461c2693d32f57ce468276e0051a8 18-Sep-2008 Andreas Henriksson <andreas@fatal.se> Allow he in tunnel name

Allows tunnels that could be confused with help command.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
ptunnel.c
1758a81f49d1360c930393d2042221f567dc52b5 18-Sep-2008 Herbert Xu <herbert@gondor.apana.org.au> ip: xfrm: Add AEAD support

This patch allows the user to create/manage AEAD algorithms with
the ip xfrm command. AEAD algorithms are also known as combined-
mode algorithms. They provide the functionality of encryption
algorithms as well as authentication algorithms.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
pxfrm.c
frm_state.c
5e3bb534ae179be141a92eb1a4e2eb48094193b7 22-Aug-2008 Andreas Henriksson <andreas@fatal.se> iproute: DESTDIR vs LIBDIR.

Hello Rafael Almeida.

I noticed your patch adding DESTDIR support in the latest iproute2 release.
Much appreciated! Soon the debian packages might be able to move to actually
using "make install" rather then it's own installation procedure when
building packages. I've noticed something that will break though....

Debian packages usually sets DESTDIR=debian/tmp/ and packages the contents
of that directory as if it where the root file system. This will break
the /usr/lib/{tc,ip}/ module loading, because they DESTDIR (/usr) will be
/whatever-the-build-path-was/debian/tmp/lib/{tc,ip}/.
I beleive others usually call this the LIBDIR to make the separation between
DISTDIR being the (possibly temporary) place things are put when build is
done, and LIBDIR (and others) are used for actual runtime paths.

I'm attaching a patch that I think fixes this, but would be really happy if
you could have a look at to verify I'm not screwing something up.

--
Regards,
Andreas Henriksson

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
plink.c
47420640687cbd389ddd99d39cf7fb0e0bcb265a 03-Jul-2008 Patrick McHardy <kaber@trash.net> iflink_vlan: support GVRP flag

This is the patch for iproute for configuring GVRP.

commit 32143eed8b706e5c6554ab42903533b3bccdc060
Author: Patrick McHardy <kaber@trash.net>
Date: Thu Jul 3 19:05:09 2008 +0200

[IPROUTE]: iflink_vlan: support GVRP flag

Signed-off-by: Patrick McHardy <kaber@trash.net>

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
plink_vlan.c
f0b34d2d98ffcd135c92dcba563d4bc47632333c 29-Aug-2008 Andreas Henriksson <andreas@fatal.se> ip a flush: unnecessarily chatty when there's nothing to flush

On tis, 2008-07-22 at 20:21 +0200, martin f krafft wrote:
> piper:~|master|% sudo ip a flush dev eth0 >/dev/null
> Nothing to flush.
>
> It should just shut up, shouldn't it? :)

The patch below makes the "Nothing to flush" only visible when show
statistics flag is given, and then only to stdout rather then stderr.

$ sudo ./ip/ip -s addr flush dev skif
Nothing to flush.
$ sudo ./ip/ip addr flush dev skif
$

(See http://bugs.debian.org/492196 )
paddress.c
pneigh.c
proute.c
b514b3587ee56552fcc87a066c955a7ff4f55d6f 02-Jun-2008 Rafael Almeida <rafaelc@dcc.ufmg.br> Fixed installation when changing DESTDIR

After changing the DESTDIR the installated binaries have some issues
due to hard coded paths. For example, using distributions on NetEm
would segfault.

I've changed iplink.c and tc_util.c so they are now aware of DESTDIR.
Along with that change I needed to change the main Makefile so it
defines the DESTDIR macro when calling gcc.

I also changed the paths so that during the installation sbin, etc,
share and lib directories are created directly inside of the DESTDIR,
instead of creating a usr directory inside that. That's the behaviour
of most packages out there, so I think most users will be expecting
that to happen.
plink.c
6579feeac4ccc0f087fa402486b3b2fcbcabc77f 02-Jun-2008 Varun Chandramohan <varunc@linux.vnet.ibm.com> Display Correct Error For Addrlabel Info

The command "ip addrlabel add/del" displays incorrect error message when provided with insufficient inputs. This patch fixes it in par with "ip addr add/del".

Currently:
# ./ip addrlabel add
RTNETLINK answers: Numerical result out of range

# ./ip addr add
Not enough information: "dev" argument is required.

After patch:
# ./ip addrlabel add
Not enough information: "prefix" argument is required.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
paddrlabel.c
e2613dc8605e56dbc53890ebbae263f93610bd41 20-Jun-2008 Benjamin Thery <benjamin.thery@bull.net> iproute2: add support for IFLA_NET_NS_PID in ip link

Hi Stephen,

I resend you this patch once more. This time I updated the documentation
too (may be that was the reason why you didn't take it before?).

Please tell me if there are other things missing in this patch
It applies on iproute2 git tree.

Regards,
Benjamin

Description:
------------

This patch adds support for the IFLA_NET_NS_PID type. It is used to
move network devices between network namespaces.

The syntax is:
ip link set DEVICE netns PID

PID is the pid of a process in the target network namespace.

(Daniel Lezcano is the original author).

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
plink.c
6a34d291449fc799048d2d56edcbeaedf1483fb1 20-Jun-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> Neighbor cache timer is in user hz

All timer values from kernel are supposed to be in constant
units or user hz value.
pneigh.c
de95ae7ca7d6a290eaab2c137b74f19c78a9a1fe 23-Apr-2008 Herbert Xu <herbert@gondor.apana.org.au> xfrm: Allow replay setting

Hi Stephen:

[IP] xfrm: Allow replay setting

For certain applications there is a requirement to start the
sequence number from a point other than the default. As it
is the kernel provides an interface to do that but it isn't
available through the ip(8) command. Since we're encouraging
people to migrate over to ip(8) for manual keying, it is useful
to have this ability there.

This patch adds support for setting replay sequence numbers
through ip(8).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
frm_state.c
7b3d366e0677c53767fca6b59677ee356b65b6da 19-Oct-2007 Daniel Silverstone <daniel.silverstone@ubuntu.com> Avoid infinite loop in ip addr flush.

Fix "ip addr flush" the same way "ip neigh flush" was previously fixed,
by bailing out if the flush hasn't completed after MAX_ROUNDS (10) tries.
paddress.c
418a217ad9cea86db79a618465d2a2cc2a08e46a 16-Mar-2008 Mike Frysinger <vapier@gentoo.org> Do not strip binaries with `install`

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
akefile
eddde1101c6f906b61011bbf787c4006c9ca5b30 13-Mar-2008 YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> Add more aliases for tunnel subcommand.

Add more aliases to synchronize IPv4 and IPv6 tunnel command, e.g.,
IPv4: hoplimit (alias to ttl), tclass (alias to tos)
IPv6: dsfield, tos (alias to tc, or tclass), ttl (alias to hoplimit)

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
p6tunnel.c
ptunnel.c
3d866ba2650d424faca3ea1c3fc89ba519019998 14-Mar-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> IP link state show enhancements

Show operational state (carrier), as well as fixing functions
to be static and use similar API.
paddress.c
9414cd6d380c3a9317b6912c14e571fb5b5a4f62 08-Mar-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> revert earlier mistake ALGO_NAME is okay

Revert "I found out when I was writing manual page, that options ALGO_NAME and"

This reverts commit 8a1485bb21bf84a7932ca849e29300853e647afc.
frm_state.c
8a1485bb21bf84a7932ca849e29300853e647afc 22-Feb-2008 Marcela Maslanova <mmaslano@redhat.com> I found out when I was writing manual page, that options ALGO_NAME and
ALGO_KEY aren't used. If it's a bug or should it be remove it, as I did?
frm_state.c
5ef82157002d1ae22b168604f0aec5331dd55def 18-Feb-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> get rid of warning from misnamed prototype

Minor warning message from missing prototype, probably because of
function name change.
p_common.h
3490740b98b83da556c593f63292993e6155b81b 14-Feb-2008 Varun Chandramohan <varunc@linux.vnet.ibm.com> Add missing prefix bit length for addrlabel

The prefix bit lenght value was not updated, resulting in incorrect addrlabel
entry. This patch fixes that issue.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
paddrlabel.c
4759758c05b3bda53b743a1c3238f1479bb61b43 13-Feb-2008 YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> Add addrlabel sub-command.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
akefile
p.c
p_common.h
paddrlabel.c
pmonitor.c
f31a37f79d1f33d4d0d6a18f3768bfee27e8b6cc 01-Feb-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> fix problem caused by rtnl_send checks

Some usages of rtnl_send could cause errors (ie flush requests)
others do a listen afterwards.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
paddress.c
pneigh.c
proute.c
frm_policy.c
frm_state.c
1fb0a998e1a8cb26a1f7fe1f79e2e3654aafdc93 26-Jan-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> remove extra newline from perror() calls

perror error adds a newline, so don't split error message
across two lines.
paddress.c
pneigh.c
proute.c
frm_policy.c
8055063afe06bef23571fced95b529db8f5a8675 25-Jan-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> Merge branch 'net-2.6.25'
692e075787835c6d89e7b67ec0c4df84e69466a7 21-Jan-2008 Stephen Hemminger <stephen.hemminger@vyatta.com> fix typo in ip batch error message

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
p.c
ed6a021a925def87fefb08e859861835328f4def 03-Jan-2008 Andreas Henriksson <andreas@fatal.se> iproute2: revert syntax help text mistake.

Sorry. The pref and prio options are actually synonyms.
This reverts part of commit 576c63ee59de3f18bec4ebd8181a5a395f268d03.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
prule.c
fbaa3dedd926bc442aa2ab6d97c016b5e3907d64 03-Jan-2008 Andreas Henriksson <andreas@fatal.se> iproute2: revert syntax help text mistake.

Sorry. The pref and prio options are actually synonyms.
This reverts part of commit 576c63ee59de3f18bec4ebd8181a5a395f268d03.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
prule.c
4c7abb271b8fc44caa40388d02bdd0de196d0dac 31-Dec-2007 Stephen Hemminger <stephen.hemminger@vyatta.com> Merge branch 'master' into net-2.6.25
118c923cc09551d3428e2905a69c07c5719988e5 25-Dec-2007 Stephen Hemminger <shemminger@linux-foundation.org> veth.h move to linux/

Move veth.h to linux/ since it is an API.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ink_veth.c
c595fda55bfed9753851de5675aa310f523564b3 21-Dec-2007 Stephen Hemminger <shemminger@linux-foundation.org> veth: use kernel header file

Use santized kernel header for veth.h and put in correct place
to prevent possible future problems with API.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ink_veth.c
eth.h
f9329ccaf933a9dee5760de6979c7be6f17e253f 18-Dec-2007 Vitaliy Gusev <vgusev@openvz.org> veth device link management

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ink_veth.c
eth.h
909dfe2c7ebcfe853b2fe4f995be1c4681d5a2a5 19-Jul-2007 Pavel Emelyanov <xemul@openvz.org> iplink_parse() routine

This routine parses CLI attributes, describing generic link
parameters such as name, address, etc.

This is mostly copy-pasted from iplink_modify().

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
plink.c
d84914a0c566516e13502fa555a92a2fb7968bb5 17-Dec-2007 Vitaliy Gusev <vgusev@openvz.org> Fix lost export-dynamic

get_link_kind() fails for statically linked modules (vlan, veth, etc.) if "ip"
was linked without "export-dynamic".

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>

--
Thank,
Vitaliy Gusev
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
akefile
7c73e1bd21bc54b20b2d4ad0fc1a94ca0b76c285 21-Dec-2007 YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> rto_min value display overflow

Reported by: Satoru SATOH <satoru.satoh@gmail.com>
"ip route show" does not print correct value when larger rto_min is
set (e.g. 3sec).

This problem is because of overflow in print_route() and
the patch below is a workaround fix for that.

[root test]# ./iproute2.git.org/ip/ip route show dev eth1
192.168.140.0/24 proto kernel scope link src 192.168.140.130
169.254.0.0/16 scope link
[root test]# ./iproute2.git.org/ip/ip route change 192.168.140.0/24
dev eth1 rto_min 3s
[root test]# ./iproute2.git.org/ip/ip route show dev eth1
192.168.140.0/24 scope link rto_min lock 2ms <-- wrong
169.254.0.0/16 scope link
[root test]# ./iproute2.git/ip/ip route show dev eth1 # patched version
192.168.140.0/24 scope link rto_min lock 3000ms <-- correct
169.254.0.0/16 scope link

This is a simpler fix.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
proute.c
0bd17929bc6e2df15dc3348f9690f698211c7711 26-Nov-2007 Templin, Fred L <Fred.L.Templin@boeing.com> iproute2-2.6.23: RFC4214 Support (v2.5)

This patch includes support for the Intra-Site Automatic Tunnel
Addressing Protocol (ISATAP) per RFC4214.

The following diffs are specific to the iproute2-2.6.23
software distribution. This message includes the full and
patchable diff text; please use this version to apply patches.

Signed-off-by: Fred L. Templin <fred.l.templin@boeing.com>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ptunnel.c
66e529f579f45351828fc82d6ba2629cc6eb3ddd 25-Oct-2007 Patrick McHardy <kaber@trash.net> iproute 2.6.23 incompatibility

Arkadiusz Miskiewicz wrote:
> People are reporting that
>> ip link set multicast on dev eth0 (Invalid argument)
>> no longer works when using iproute 2.6.23 on kernel 2.6.21.
>>
>> On my testing machine it also fails:
>> # ./ip link set eth0 multicast on
>> RTNETLINK answers: Invalid argument

It seems it fails to properly detect that your kernel is missing
RTM_NEWLINK support. Apparently the reason is that the kernels
I tested with return a different error in this situation.


Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
plink.c
4282c6c52b4f1f4b5e1ef5ef377c342ca87e0b73 12-Oct-2007 Herbert Xu <herbert@gondor.apana.org.au> Fix typo in tunnel code (o_key vs. i_key).

If a dotted quad ikey is specified for GRE tunnels, it gets set as the
okey instead. This patch fixes it. (http://bugs.debian.org/200714)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ptunnel.c
576c63ee59de3f18bec4ebd8181a5a395f268d03 12-Oct-2007 Alexander Wirt <formorer@debian.org> Add parameters to usage help text.

Add src option to route help text (http://bugs.debian.org/226142).
Add prio option to rule prio help text (http://bugs.debian.org/213673).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
proute.c
prule.c
b096fa5f3b7a8881972257587079160331eaccfe 12-Oct-2007 Alexander Wirt <formorer@debian.org> Fix various typos and nitpicks

Fix typo in ss manpage.
Make the backslash visible in ip manpage (http://bugs.debian.org/285507).
Strict syntax for ip addr advice in error message.
Fix typo in libnetlink(3) manpage (writen -> written).
Fix typos in tc-prio(8) manpage.
Fix typo in tc-htb(8) manpage (mininum -> minimum).
Fix typo in tc-cbq-details(8) manpage (occured -> occurred).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
paddress.c
ca78b0e7d4042be7f7283d551d433b76da7f312b 12-Oct-2007 Patrick McHardy <kaber@trash.net> Prevent renaming interfaces to empty string.

Andreas Henriksson wrote:
> From: Alexander Wirt <formorer@debian.org>
>
>
> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
> ---
> ip/iplink.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/ip/iplink.c b/ip/iplink.c
> index 4060845..da1f64e 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
> }
>
> if (newname && strcmp(dev, newname)) {
> + if (strlen(newname) == 0) {
> + printf("\"\" is not valid device identifier\n");
> + return -1;
> + }

Indentation fixed, same change for the non-ioctl case, use invarg.
While I'm at it I also fixed the error message for "name too long",
*argv is NULL at this point.

Signed-off-by: Patrick McHardy <kaber@trash.net>
plink.c
5058332f3cd751cb0aa4970a0892ebc4b791b748 13-Oct-2007 Stephen Hemminger <shemminger@linux-foundation.org> Revert "don't allow "" for device name"

Use Patrick's instead

This reverts commit ba371d989038e0dda803528c194e12e5177f7008.
plink.c
59cc4f73f20f802eda02baa0180a5fb92c14c25c 13-Oct-2007 Stephen Hemminger <shemminger@linux-foundation.org> Revert "Remove bogus reference to tc-filters(8) from tc(8) manpage."

This reverts commit 1bacc7ce752f795df3b1b3710245c4cd8c1bc396.
paddress.c
plink.c
proute.c
prule.c
ptunnel.c
1bacc7ce752f795df3b1b3710245c4cd8c1bc396 12-Oct-2007 Andreas Barth <aba@not.so.argh.org> Remove bogus reference to tc-filters(8) from tc(8) manpage.

Spotted by Aleš Kozumplík <al_es@seznam.cz>
(http://bugs.debian.org/289225)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
paddress.c
plink.c
proute.c
prule.c
ptunnel.c
ba371d989038e0dda803528c194e12e5177f7008 12-Oct-2007 Stephen Hemminger <shemminger@linux-foundation.org> don't allow "" for device name

If a zero-length string is given, it is not rejected by
netlink in kernel so catch it at command line.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
plink.c
550967eecf0c5fa5c306a57ff00407d4fa67c74f 12-Oct-2007 Stephen Hemminger <shemminger@linux-foundation.org> remove support for IP multipath

IP multipath routing was so buggy that it was dropped from the
current kernel.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
proute.c
0b959b0f4dcb9c905fb1b7f60d39d9e284e77eea 12-Oct-2007 YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> IPROUTE2: Support IPv4/IPv6 Tunnel

Based on patch from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
p6tunnel.c
unnel.c
54e0b2e71d723e3b493ff53d1332b48250f5d4bc 11-Oct-2007 Rick Jones <rick.jones2@hp.com> rto support for ip command

Enable users of ip to specify the times for rtt, rttvar and rto_min
in human-friendly terms a la "tc" while maintaining backwards
compatability with the previous "raw" mechanism. Builds upon
David Miller's uncommited patch to set rto_min.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
proute.c
e32d4db0a58f3673bb20fcb198e9372ded4194a6 11-Oct-2007 Stephen Hemminger <shemminger@linux-foundation.org> don't make veth a shared library

Making veth a shared library for ip caused build problems (not PIC)
and is unneeded.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
akefile
ink_veth.c
efe69c1b7220e6c89bc5ccbeceeadf7c9e09768b 24-Aug-2007 Masahide NAKAMURA <nakam@linux-ipv6.org> ip: xfrm: Fix flush message.

Fix xfrm state or policy flush message.
And minor updates are included:
o Use static buffer to show unknown value as string.
o Show policy type (ptype) only when kernel specified it.
o Clean-up xfrm_monitor.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
pxfrm.c
frm.h
frm_monitor.c
frm_state.c
c1fa2253241f3cddac3519700549f98d7840b864 24-Aug-2007 Masahide NAKAMURA <nakam@linux-ipv6.org> ip: xfrm: Fix policy and state flags.

o Support policy flag with string format.
Note that kernel defines only one name "localok" for the flag
and it has not had any effect currently.
o Support state flag value XFRM_STATE_NOPMTUDISC.
o Fix to show detailed flags value when "-s" option is used.
o Fix minor typo.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
pxfrm.c
frm.h
frm_policy.c
frm_state.c
ed01e3906854516188a5d57a31eab2e5e9ba673f 24-Aug-2007 Masahide NAKAMURA <nakam@linux-ipv6.org> ip: xfrm: Clean-up for internal mask to filter.

Remove unused or redundant usage for xfrm_filter.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
frm_policy.c
frm_state.c
2da55b1bbed22e1058627f6b262158349b2b142e 11-Jul-2007 Pavel Emelianov <xemul@openvz.org> Module for ip utility to support veth device (v.2.1)

The usage is
# ip link add [name] type veth [peer <name>] [mac <mac>] [peer_mac <mac>]

This version doesn't include the fix for ip/iplink.c as Patrick
said that he had included it into his patches already.

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
akefile
ink_veth.c
eth.h
5c302d518f10e67ddab9e44207a0c878214ed389 01-Sep-2007 Patrick McHardy <kaber@trash.net> vlan support

This is a resend of the iproute VLAN patch with the if_link.h changes
edited out since the headers are already synced.

[IPROUTE]: VLAN support

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
akefile
plink_vlan.c
147da5de6648ae31b38421414780b4fab1a30e90 05-Sep-2007 Stephen Hemminger <shemminger@linux-foundation.org> Revert "Make ip utility veth driver aware"

This reverts commit 4ed390ce43d1ec7c881721f312260df901d8390d.
Newer version doesn't use genetlink.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
akefile
p.c
eth.c
eth.h
9ab4c85b9af1373351991b55b1aa377b7f67aa32 22-Aug-2007 Sridhar Samudrala <sri@us.ibm.com> Fix bug in display of ipv6 cloned/cached routes

This patch fixes a bug in the 'ip' command to display
IPv6 cloned routes.
ip -6 route ls cache
returns empty even when there are cloned routes because of
of a missing else in print_route() routine.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
proute.c
1d93483985f0aa2d2afc72dde5179ff3f79a0999 22-Aug-2007 Patrick McHardy <kaber@trash.net> iplink: use netlink for link configuration

Add support for using netlink for link configuration. Kernel-support is
probed, when not available it falls back to using ioctls.

Signed-off-by: Patrick McHardy <kaber@trash.net>
akefile
p.c
p_common.h
paddress.c
plink.c
4ed390ce43d1ec7c881721f312260df901d8390d 02-May-2007 Pavel Emelianov <xemul@sw.ru> Make ip utility veth driver aware

The new command is called "veth" with the following syntax:
* ip veth add <dev1> <dev2>
creates interconnected pair of veth devices.
* ip veth del <dev>
destroys the pair of veth devices, where <dev> is either
<dev1> or <dev2> used to create the pair.

One question that is to be solved is whether or not to create
a hard-coded netlink family for veth driver. Without it the
family resolution code has to be moved to general place in ip
utility (by now it is copy-paste-ed from one file to another
till final decision).

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
akefile
p.c
eth.c
eth.h
ad1a12dbd023946695caade199707aaafa6cc560 22-Aug-2007 Patrick McHardy <kaber@trash.net> Use FRA_* attributes for routing rules

Use the FRA attributes for routing rules, with exception of RTA_GATEWAY
(used for route-NAT) which isn't supported by current kernels anymore
and thus doesn't exist as FRA attribute.

Signed-off-by: Patrick McHardy <kaber@trash.net>
prule.c
1e253d72f4a43dcd5b68541edf06c52d82145648 15-Jul-2006 Mike Frysinger <vapier@gentoo.org> ip/routef lifesaver

keep people from screwing their systems with routef

minor patch here ... if you run `routef --help`,
it'll turn around and flush your routing tables anyways :)

so patch will have routef output usage if any arguments are given,
otherwise it'll flush the tables ... idea is from Lars Strojny
outef
dcb283c300299d79a37fd386ea854b156fd503c5 20-Jun-2007 Thomas Graf <tgraf@suug.ch> iproute2: Support IFF_LOWER_UP and IFF_DORMANT

In order to support these new flags add current
linux/if.h into the directory with the local copies.
This caused troubles with outdated redefinitions from net/if.h
so I've removed the dependency on it.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
paddress.c
pneigh.c
pxfrm.c
tmon.c
bdf9e86d727156ca68fefd243afa29ad4f29f4bf 20-Jun-2007 Stephen Hemminger <shemminger@linux-foundation.org> fix last change

Need to use correct XFRMA_ constants.
Get rid of bogus casts. Fix case where no attribute returned.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
frm_policy.c
frm_state.c
f90c4f4e122e06eb1498bbcd1741bb5cd4150338 04-May-2007 jamal <hadi@cyberus.ca> see SPD info

and heres the SPD version ...

cheers,
jamal

[XFRM] see SPD info

i.e instead of something like ip xfrm policy ls | grep -i src | wc -l
do:

ip xfrm policy count
And you get the count; you can also pass -s or -s -s to see more
details

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
frm_policy.c
0bb4a4c20c9deeac26f7239d83c8747c4dfb4d89 04-May-2007 jamal <hadi@cyberus.ca> see SAD info

Stephen,
Use this patch instead of the one i sent yesterday.
As before, you will need to pull include/linux/xfrm.h from
net-2.6 once Dave applies the kernel patch.

cheers,
jamal

[XFRM] see SAD info

i.e instead of something like ip xfrm state ls | grep -i src | wc -l
do:

ip xfrm state count
And you get the count; you can also pass -s to the command line and
get the hash info.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
frm.h
frm_state.c
6b469caefd0fd8ff52a43308d7a47a75fb05a3de 27-Mar-2007 Thomas Graf <tgraf@suug.ch> iproute2: support for goto/nop action and detached flag

Stephen,

Patch to support the new fib rules features I just posted
on netdev.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
prule.c
b64f58b01354a1cfdc56f9617aabc9997f9fb01e 25-Feb-2007 jamal <hadi@cyberus.ca> update rest to use nl_mgrp

cheers,
jamal

[ALL] update rest to use nl_mgrp

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
pmonitor.c
tmon.c
bac735c53a36d259fa4d0722175d9864ed8cdcc0 07-Mar-2007 Noriaki TAKAMIYA <takamiya@linux-ipv6.org> enabled to manipulate the flags of IFA_F_HOMEADDRESS or IFA_F_NODAD from ip.

Hi,

This patch enables ip command to add IFA_F_HOMEADDRESS and
IFA_F_NODAD flags while adding the IPv6 address.

Signed-off-by: Noriaki TAKAMIYA<takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
paddress.c
81c61790d5927dc6ca168b2183000a3efc7bc493 14-Dec-2006 Stephen Hemminger <shemminger@osdl.org> Eliminate trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
prule.c
frm_monitor.c
7b8225122d1b22c74f05bd12398bd602d49e6e13 08-Dec-2006 jamal <hadi@cyberus.ca> update xfrm monitoring to use nl_mgrp

Stephen,
I will wait until you sync all these patches ive sent; then send a
couple more then i will be done.

cheers,
jamal

[XFRM] update xfrm monitoring to use nl_mgrp

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
frm_monitor.c
c9fd974bd88213d74fac0ec237c79a81aa8029fc 08-Dec-2006 jamal <hadi@cyberus.ca> update xfrm async events

[XFRM] update xfrm async events

Report abbreviated async xfrm aevents.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
frm_monitor.c
be7f286e8353cc947c6d2a74b21989af23988812 14-Dec-2006 Patrick McHardy <kaber@trash.net> [IPROUTE]: Add support for routing rule fwmark masks

Needs kernel >= 2.6.19.

Signed-off-by: Patrick McHardy <kaber@trash.net>
prule.c
ae665a522bd46bea44c5ea84c89c8b1731954170 05-Dec-2006 Stephen Hemminger <shemminger@osdl.org> Remove trailing whitespace

Go through source files and remove all trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
fcfg
p.c
p6tunnel.c
p_common.h
paddress.c
plink.c
pmaddr.c
pmroute.c
pneigh.c
pntable.c
pprefix.c
proute.c
prule.c
ptunnel.c
pxfrm.c
tmon.c
unnel.c
unnel.h
frm.h
frm_monitor.c
frm_policy.c
frm_state.c
0bf0fbc47e33cc968c1c1d20d938de31e497c753 05-Dec-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> XFRM: Mobility header support.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
pxfrm.c
frm.h
c54f31eeb3a1fe35359ffa40cf7bb31c18bc75a1 05-Dec-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> XFRM: support report message by monitor.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
frm.h
frm_monitor.c
7ea4f5d33d27b23a3127b0b6ec46d0b4821d9431 05-Dec-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> XFRM: Mobile IPv6 route optimization support.

To support Mobile IPv6 RO, the following extension is included:
o Use XFRM_MODE_XXX macro instead of magic number
o New attribute option for all state: source address for
deleting or getting message
o New attribute options for RO: care-of address, last-used timestamp
and wild-receive flag

Note:
Flush command like `ip xfrm state flush` is to remove all XFRM state.
It has been effected for IPsec SAD but with this patch it flushes both
IPsec SAD and Mobile IPv6 RO states.
To make only IPsec SA flush, it is recommanded to specify each XFRM
protocol like below:
`ip x s f proto esp ; ip x s f proto ah ; ip x s f proto comp`

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
pxfrm.c
frm.h
frm_policy.c
frm_state.c
972938e9e685156b97413d17ad8993de61fdd1b9 05-Dec-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> XFRM: sub policy support.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
pxfrm.c
frm.h
frm_policy.c
288384f22ffafd2d7d888ee45d8dfcf26d3f2b1c 23-Nov-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> TUNNEL: IPv6-over-IPv6 tunnel support.

Fix ip6tunnel.c to be fit with current ip command style.
Unlike other modules currently iptunnel (and ip6tunnel) is not
designed as protocol-independent because of unarranged structure
between IPv4 and IPv6.

Usage: ip -f inet6 tunnel { add | change | del | show } [ NAME ]
[ remote ADDR local ADDR ] [ dev PHYS_DEV ]
[ encaplimit ELIM ]
[ hoplimit HLIM ] [ tc TC ] [ fl FL ]
[ dscp inherit ]

Where: NAME := STRING
ADDR := IPV6_ADDRESS
ELIM := { none | 0..255 }(default=4)
HLIM := 0..255 (default=64)
TC := { 0x0..0xff | inherit }
FL := { 0x0..0xfffff | inherit }

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
akefile
p6tunnel.c
p_common.h
ptunnel.c
9447a0d344bf772027a9012a44b6b536e170da35 23-Nov-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> TUNNEL: Import ip6tunnel.c.

This file (ip6tunnel.c) is renamed from ipv6tunnel.c which is imported
from usagi cvs tree. It is originally ported by MIPL to work on their
2.4 kernel patch (MIPL1).

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
p6tunnel.c
d9bd1bd945b12b52e7825aa2742fa15ffa09651a 23-Nov-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> TUNNEL: Split common functions to export them.

Split common functions like ioctl to export them.
This is a preparation to support to configure IPv6-over-IPv6 tunnel.
This patch also includes minor improvemen:
o to stop to include unused headers
o to change function static if it is not needed to be exported

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
akefile
ptunnel.c
unnel.c
unnel.h
141bb60640efb17844b9b9c87d62f679c3036238 23-Nov-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> ADDR: Define 0xFFFFFFFFU as INFINITY_LIFE_TIME regarding to the kernel.

Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
p_common.h
paddress.c
0aef366b4830dfe0b60176ec67cf8ecb9ea6f00c 23-Nov-2006 Noriaki TAKAMIYA <takamiya@po.ntts.co.jp> ADDR: Add the 'change' and 'replace' commands to the IPv6 address manipulation context.

Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
paddress.c
35546df7d53a7ec2974a7b4f777d5a52f521d513 23-Nov-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> ADDR: Enable to add IPv6 address with valid/preferred lifetime.

Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
paddress.c
0cc5ebf46d852266abedd38ab1cc57ea6f68d25b 23-Nov-2006 Masahide NAKAMURA <nakam@linux-ipv6.org> ADDR: Fix print format for lifetimes.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
paddress.c
98bde989db679153ee7a5f6425037b5a002eb95d 10-Nov-2006 Thomas Graf <tgraf@suug.ch> Add rule notification support to ip monitor

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
p_common.h
pmonitor.c
prule.c
3123a0ccdd6b2f0b30c9e7d87c4a698577b3e5a5 09-Nov-2006 Thomas Graf <tgraf@suug.ch> Add support for inverted selectors

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
prule.c
6a79240b6f670155b3fc7abacd69894fff6e7f08 26-Oct-2006 Stephen Hemminger <shemminger@osdl.org> Route metrics decode bug.
Array was not being offset correctly.

See http://bugs.archlinux.org/task/5669

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
proute.c
34e099e24fd3c9070b68c1286a201834c0f4ae03 19-Oct-2006 Stephen Hemminger <shemminger@osdl.org> SA and SP in IPSec BEET mode.

Patch which allows for setting SA and SP also for
new IPSec mode BEET, beside tunnel and transport, according to the latest
changes in the kernel you can find at the following link:

Signed-off-by: Diego Beltrami <diego.beltrami@gmail.com>
Signed-off-by: Miika Komu <miika@iki.fi>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
pxfrm.c
frm_policy.c
frm_state.c
3bfa73ff99291d872f6d0e0284ee416e880088b6 26-Sep-2006 Stephen Hemminger <shemminger@osdl.org> rtnl fd check

Prevent accidental damage from rtnl library if fd is uninitialized.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
p.c
77219712bf5bbb1a65961c9b322e4a68c55276ab 26-Sep-2006 Stephen Hemminger <shemminger@osdl.org> Fix XFRM monitor

The change to hold open the netlink socket (for ip batch mode),
broke XFRM monitoring.

Bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383133

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
frm_monitor.c
af1b6a41d4c7ed8aab98cfdcdafd55ec6c638b07 11-Aug-2006 Andy Gay <andy@andynet.net> Fix struct alignment with cris architecture

[IPROUTE]: Fix struct alignment with cris architecture

gcc for the cris arch does not pad structures to the next multiple of 4
bytes, as the i386 gcc does.

This causes errors like this when displaying xfrm policies:

# ip x p
!!!Deficit 3, rta_len=300
src 192.168.251.32/29 dst 192.168.251.32/29
dir in priority 0
!!!Deficit 3, rta_len=180
src 0.0.0.0/0 dst 192.168.251.32/29
dir in priority 2208
....

Similar errors are seen from ip x s.

This patch fixes the errors when printing. I'm not sure whether we
should worry about other uses of the affected structs, I've not seen any
other bad effects from this though, so hopefully this is enough.

(Thanks to Herbert Xu for pointing out that NLMSG_SPACE is the correct
macro to use here.)

Tested against 2.6.17.6 kernel on i386, and 2.6.16.1 kernel on cris.

Signed-off-by: Andy Gay <andy@andynet.net>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
frm_policy.c
frm_state.c
34e9564753075c756f96597e7aa57f969a403aaf 11-Aug-2006 Patrick McHardy <kaber@trash.net> Add support for larger number of routing tables

[IPROUTE]: Add support for larger number of routing tables

Support support for 2^32 routing tables by using the new RTA_TABLE
attribute for specifying tables > 255 and intepreting it if it is
sent by the kernel.

When tables > 255 are used on a kernel not supporting it an error will
occur because of the unknown netlink attribute.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
p_common.h
proute.c
prule.c
bd4bcdad777a26c851e008fe79eb355c41f1f2fc 11-Aug-2006 Patrick McHardy <kaber@trash.net> Preparation for 32 bit table IDs

[IPROUTE]: Preparation for 32 bit table IDs

The route table filter uses an integer for the table number and the value
-1 to represent cloned routes. For 32 bit table IDs it needs to become an
unsigned, so this won't work anymore. Introduce a new filter flag "cloned"
and use instead of filter.tb = -1.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
proute.c
e0b29fe7dd137f7b47eb7c64e7bd07282e7801a2 10-Aug-2006 Patrick McHardy <kaber@trash.net> The current behaviour for IPv6 routing table filters is to derive the
table from the route type. This doesn't really work anymore now that IPv6
supports multiple tables. Add detection for IPv6 multiple table support
(relying on the fact that the first routes dumped belong to the local table
and have rtm_table == RT_TABLE_LOCAL with multiple tables) and handle it
like other protocols.

Signed-off-by: Patrick McHardy <kaber@trash.net>
proute.c
e7be3b22e85c46055de580c14417af43f62a7a4f 08-Aug-2006 Stephen Hemminger <shemminger@osdl.org> Fix build error on Ubuntu (Debian) because of ip.h dependence
on byteorder.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
ptunnel.c
de0a0b52a6ddfb6b3c4a5f835daa4cc3100bf234 08-Aug-2006 Stephen Hemminger <shemminger@osdl.org> Another .gitignore file.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
gitignore
f4f6d6407d43b81152e366b2011b606db1083802 25-Jul-2006 Patrick McHardy <kaber@trash.net> Add support for multipath route realms
proute.c
f38c73340966cd821d5e3cb08730797e1ea0c233 04-Aug-2006 Stephen Hemminger <shemminger@osdl.org> Cleanup mx_names table
use C99 initialization to match rtnetlink.h
proute.c
a1f1143e8da7be12375e6dd8d0d54c5919358114 17-Jul-2006 Vince Worthington <vincew@redhat.com> Proposed patch to iproute to add Initial Max Congestion Window Size route tuning parameter

Vince Worthington wrote:
> Hello,
>
> We've been working with a customer of ours who was experiencing some
> latency issues, and in the process of helping them solve their problem
> we found that adding the ability to adjust the Initial Max Congestion
> Window size on a route, they were able to tune their routes to perform
> more favorably in their mixed Linux and Solaris environment. There
> were a couple of other tuning steps necessary as well but we did find
> that the ability to set a larger initial max congestion window size
> was helpful in making Linux behave more like Solaris in low-latency
> situations.
>
> The kernel already supports this route attribute, this patch simply
> adds the option to iproute.c to provide a means to set it from userspace.
>
> I've attached the patch we used in test builds of the iproute packages
> we distribute in RHEL3 and RHEL4 for your consideration for possible
> acceptance and inclusion in iproute. Please let us know if there is
> any further information you would need or if there is a more
> appropriate venue to submit this patch.
>
> Thanks,
> Vince Worthington
> Red Hat, Inc.

Stephen,

I apologize for the last patch I sent not applying cleanly to the latest
iproute2 sources. I realized that this might impede any
review/acceptance of the patch and created a separate patch against the
20060323 build of iproute2, which seems to be the latest (by looking at
the website).

The previous patch wouldn't apply cleanly due to the label of the
ssthresh argument being corrected from REALMS to NUMBER.

Please let us know if there is any other information or assistance we
can be with this patch submission.

Thanks
Vince
proute.c
58bb642f72314c44c14ba958d78eab64244968ed 09-May-2006 Stephen Hemminger <shemminger@freekitty.localdomain> if you simply run `ifcfg iface`, you get:
/sbin/ifcfg: line 25: [: too many arguments
/sbin/ifcfg: line 26: [: -ge: unary operator expected
/sbin/ifcfg: line 27: [: -ge: unary operator expected
/sbin/ifcfg: line 28: [: -ge: unary operator expected

might i suggest the attached patch
-mike
fcfg
7b5657545dc246ae37690d660597e8fa37040205 22-Mar-2006 shemminger <shemminger> The ip(8) command has a bug when dealing with IPoIB link layer
addresses. Specifically it does not correctly handle the addition of
new entries in the neighbor/arp table. For example, this command will
fail:

ip neigh add 192.168.0.138 lladdr
00:00:04:04:fe:80:00:00:00:00:00:00:00:01:73:00:00:00:8a:91 nud
permanent dev ib0

An IPoIB link layer address is 20-bytes (see
http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-09.txt,
section 9.1.1).

The command line parsing code expects link layer addresses to be a
maximum of 16-bytes. Addresses over 16-bytes are truncated.
plink.c
pneigh.c
27356a5e000effe0060940c767547dd95235795c 12-Jan-2006 shemminger <shemminger> ndle DCCP in ipxfrm.c to allow using port numbers in the selector.
pxfrm.c
frm.h
143969f24bc40e2a28e53d1008852188b8cd767a 10-Jan-2006 shemminger <shemminger> Add missing files.
pntable.c
09954dc61adc3051cbb2127e2bfcf692502c8306 10-Jan-2006 shemminger <shemminger> IP ntable support and header update.
akefile
p.c
p_common.h
e25d697069a1c3d5eb13a44050eeed5f007d31d4 02-Dec-2005 shemminger <shemminger> Backout ambigious error for ip
p.c
ede723964a065992bf9d0dbe3f780e65ca917872 22-Nov-2005 shemminger <shemminger> Add ip command aliases and better matching
p.c
669ae748d6ae3a476090f7dc48dd0fa6d246f77e 07-Nov-2005 shemminger <shemminger> Minor fixes from Masahide for XFRM dynamic keying
frm.h
frm_monitor.c
frm_policy.c
frm_state.c
c595c790a08366db90654c01aba02a1bd97d73e2 02-Nov-2005 shemminger <shemminger> Fix XFRM bugs introduced by batching code.
Re-introduces the SA and policy add/del events
frm_monitor.c
frm_policy.c
frm_state.c
234b613556679e22b9b70e9a1e8cb0c9fab991a0 24-Oct-2005 shemminger <shemminger> Fix ip command shortcuts
p.c
7849fb559181f8a536c392cd4258db3729176e4c 13-Oct-2005 shemminger <shemminger> Fix memcpy overwrite in iproute.c because of bits vs. bytes confusion
proute.c
b77caeba0e8809c8e3d22d0cbea42e41f5522fdf 13-Oct-2005 shemminger <shemminger> Fix ip rule flush
prule.c
84616f8317554be7542b2e89b69f4129995cb03b 07-Oct-2005 shemminger <shemminger> Reenable 'ip mroute'
p.c
pmroute.c
8ed63ab1f1283b2c63355fb7c1e80abead4b9399 21-Sep-2005 shemminger <shemminger> Fix leaks and warnings reported by valgrind.
p.c
paddress.c
fc57a9df1bee719c86a4f0bc82bafae05bb92fc2 07-Sep-2005 shemminger <shemminger> Fix ip monitor since it is special and can't reuse
rtnl_open handle.
p.c
pmonitor.c
3d418dc38a62bb1d07ee3eb81a8dfa243764fb8e 02-Sep-2005 shemminger <shemminger> Add usage for ip -batch
p.c
351efcde4e62967362a10b29f3b701cfecd7cdfc 01-Sep-2005 shemminger <shemminger> Update header files to 2.6.14
Integrate support for DCCP and tcp_diag into ss
Add -batch to ip command
p.c
p_common.h
paddress.c
pmonitor.c
pneigh.c
proute.c
prule.c
frm_monitor.c
660818498d0f5a3f52c05355a3e82c23f670fcc1 16-Aug-2005 shemminger <shemminger> Update include files and fix a couple of minor bugs
pneigh.c
prule.c
737f15f6da0ed7512220f6fa5244a39777de4e0d 09-Jul-2005 shemminger <shemminger> Thomas's ematch fixes for lex.
Fix more GCC signedness warnings.
pneigh.c
frm_state.c
f332d169246447bd5e258ac03d5ee840a70adb1e 06-Jul-2005 shemminger <shemminger> Cleanup GCC4 warnings about signedness.
paddress.c
plink.c
pmaddr.c
proute.c
prule.c
02d2ae55c68d2319260163b76c550f45e1077a63 23-Jun-2005 shemminger <shemminger> IPv4 multipath algorithm selection support
proute.c
9bec1a436335457f3067a17de6ddb913bd95a184 07-Jun-2005 shemminger <shemminger> Masahide NAKAMURA <nakam@linux-ipv6.org>

It fixes flush feature for IPsec(ip xfrm).
Jamal gave me comment about it. I've tested it on 2.6.11.7.
Please find the log below, check code and pull it:

bk://bk.skbuff.net:38000/iproute2-xfrm-flush


ChangeSet@1.182, 2005-04-13 21:19:44+09:00, nakam@linux-ipv6.org
[ip] add "deleteall" command for xfrm;
"flush" uses kernel's flush interface and
"deleteall" uses legacy iproute2's flush feature like
getting-and-deleting-for-each.
frm_policy.c
frm_state.c
90f93024a0818dc691138d8401721e797004b042 07-Jun-2005 shemminger <shemminger> Monitor time patch from Masahide NAKAMURA
p.c
pmonitor.c
frm_monitor.c
frm_policy.c
frm_state.c
f082b64fb40b467bc1f9e5d245114aae4e256d5c 30-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch addr-del

(Logical change 1.178)
paddress.c
15ac4cdc2f0b83dffa0102494d110c13d717673d 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> split printing state/policy info function for xfrm common use.
add xfrm monitor.

(Logical change 1.175)
pxfrm.c
48f1ef9f1558735b27c8e4b910b6a0ab9b6019ad 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> split printing state/policy info function for xfrm common use.

(Logical change 1.175)
frm.h
56e8ad38cb6052ab59de480ad24e39064d07db76 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> split printing policy info function for xfrm common use.

(Logical change 1.175)
frm_policy.c
fb7399b2baf9018c896985c3d669422a33ce5b38 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> allocspi feature support.
support to specify sequence number.
split printing state info function for xfrm common use.

(Logical change 1.175)
frm_state.c
beebd7aa04d89a9e7369967ea6e9fec091b6bc5a 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> add xfrm_monitor.o.

(Logical change 1.175)
akefile
f9cb3a2fe2a5a1ecfa353397bff9a274d65becb1 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> (Logical change 1.175)
frm_monitor.c
bf82c4c0d3c52cc15b49da27e3385efdf980fb4b 22-Mar-2005 linux-ipv6.org!nakam <linux-ipv6.org!nakam> Initial revision
frm_monitor.c
73b49e9f481c075141e27699f629750748833b78 14-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch ip-nocarrier

(Logical change 1.161)
paddress.c
5e8bc6316b1a6c56598cdb29a737d1d670d74e69 14-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2-hz

(Logical change 1.159)
proute.c
60f1317aaa15da04fc08eba3ab736fd25d2c18d1 10-Mar-2005 osdl.net!shemminger <osdl.net!shemminger> NDA_PROBES not defined yet, so work around.

(Logical change 1.155)
pneigh.c
5cf576d928c515ce8dea2500154a291477ce38ba 10-Mar-2005 osdl.net!shemminger <osdl.net!shemminger> Add Esp-in-udp encapsulation

(Logical change 1.152)
pxfrm.c
frm.h
frm_state.c
69410a496b57c59b3353713dfe8ba57eaea90b79 10-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch thomas.2

(Logical change 1.148)
pneigh.c
f2111e6f51208a246a45caba58b5ea19698a8fb2 10-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute-typo.patch

(Logical change 1.145)
proute.c
dd79ac48dfcfe1b1b0e2e7f8e96aaaebf11f1814 10-Feb-2005 osdl.net!shemminger <osdl.net!shemminger> Workaround for kernel/user htons confusion.

(Logical change 1.144)
ptunnel.c
03ffadfe02bf8adbb76e7a3efcdec9e8825bafba 09-Feb-2005 osdl.net!shemminger <osdl.net!shemminger> don't strip shell scripts

(Logical change 1.141)
akefile
3eb1731bbd566e369c76a2030b003d751d86941d 07-Feb-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch family_check_when_flushing

(Logical change 1.139)
paddress.c
2af5c3d34463b2a96cebe9de35e86b19b8003011 18-Jan-2005 7!tgraf <7!tgraf> tb buffer initialization is now done in the parser

(Logical change 1.129)
prule.c
43d9d2de044dbba5ebc2903dc66e89ee8ee0a20b 18-Jan-2005 7!tgraf <7!tgraf> Remove obsolete XFRM_MAX_DEPTH and fix xfrm_xfrma_print prototype

(Logical change 1.129)
frm.h
48cef4eb2b30bbc8ff04c0bb85c0b0689896e5e8 18-Jan-2005 6!tgraf <6!tgraf> tb buffer initialization is now done in the parser

(Logical change 1.129)
paddress.c
87bc1f03ad3fb16f7c58becec9843378a7154495 18-Jan-2005 5!tgraf <5!tgraf> tb buffer initialization is now done in the parser

(Logical change 1.129)
pneigh.c
proute.c
ca96957c42e14953d14fd297bdaa26029a6497b9 18-Jan-2005 2!tgraf <2!tgraf> tb buffer initialization is now done in the parser

(Logical change 1.129)
pprefix.c
bcf32819617dec5807c296e39504b45b6e3812e0 18-Jan-2005 12!tgraf <12!tgraf> Use tb[type] access to TLVs

(Logical change 1.129)
pxfrm.c
2534613eeba36f2a59a7876dbe1b291c76fcb4da 18-Jan-2005 12!tgraf <12!tgraf> Switch to parse_rtattr and use XFRMA_MAX directly instead of a easly
forgetable magic define

(Logical change 1.129)
frm_policy.c
frm_state.c
1cb54e58069fb413bd20738754b4e49f0403da0c 18-Jan-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2.118

(Logical change 1.120)
akefile
p_common.h
pmonitor.c
pprefix.c
eaa34ee35d6b801cabb96aafce2ca410e3f5b31d 18-Jan-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2.117

(Logical change 1.119)
pxfrm.c
frm.h
frm_policy.c
frm_state.c
b906243b62c832f24473de3ead7d7feef0e75e4b 18-Jan-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2.116

(Logical change 1.118)
pxfrm.c
526afe400887be9b3168ef3c92c6b6ec3e184f5f 18-Jan-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2.113

(Logical change 1.115)
prule.c
3e1d2ea6abe3c0f2fe9e180187e7f48efc80f290 18-Jan-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Initial revision
pprefix.c
435ac6b8b58f6eba8ba4c04f3a335a86f367a853 08-Dec-2004 ch[shemminger]!tgraf <ch[shemminger]!tgraf> iproute2: ndm states should be handled as flags

(Logical change 1.108)
pneigh.c
50772dc51ac02239958e1ebcdb21277fcdf133a7 07-Dec-2004 osdl.net!shemminger <osdl.net!shemminger> Add ip rule flush capabilty and fix all the prototype changes
because of that code rewrites the nlmsghdr.

(Logical change 1.106)
p_common.h
paddress.c
pmonitor.c
pneigh.c
proute.c
prule.c
tmon.c
frm_policy.c
frm_state.c
63d91b4fda9cfb3f2f0a9dd0f1ce409850452ddc 21-Oct-2004 osdl.net!shemminger <osdl.net!shemminger> Fix for older /usr/include headers.

(Logical change 1.105)
frm.h
dfb92030548c6d11b248059a0281d06f32233f00 20-Oct-2004 osdl.net!shemminger <osdl.net!shemminger> don't need this either.

(Logical change 1.104)
ptunnel.c
ae0f14435ef436183e6300336602137ef501e7a5 19-Oct-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch stats.eml

(Logical change 1.96)
paddress.c
0284dcde32ccb3181c04f449ea41a0502fb91f07 07-Oct-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2-typo-fixes-1.diff

(Logical change 1.94)
prule.c
44d3eb258cc9fbad0112f8457e7e9306272feaf3 07-Oct-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute2-compile-fixes-1.diff

(Logical change 1.93)
pxfrm.c
cb4d97a9a8bde91a07f7f955a6f74a794fa572f8 28-Sep-2004 osdl.net!shemminger <osdl.net!shemminger> add mike's stuff.

(Logical change 1.89)
akefile
c70b36d231afba1700d6bb4ca1181fd9bb76c77b 28-Sep-2004 org[shemminger]!nakam <org[shemminger]!nakam> [iproute2] XFRM: support ICMP/ICMPv6's type and code

(Logical change 1.85)
pxfrm.c
frm_policy.c
frm_state.c
29aa4dd76c0c1877d50b2d643eb081d5477ceadf 28-Sep-2004 org[shemminger]!nakam <org[shemminger]!nakam> [iproute2] XFRM: fixing protocol

(Logical change 1.84)
pxfrm.c
frm.h
frm_policy.c
frm_state.c
bd641cd661527469a9d15c0fa09f19d017c2299f 28-Sep-2004 org[shemminger]!nakam <org[shemminger]!nakam> [iproute2] XFRM: using flush message type

(Logical change 1.83)
frm_policy.c
frm_state.c
54f7328aecfb8421b0e9ca180324aed135e780de 28-Sep-2004 org[shemminger]!nakam <org[shemminger]!nakam> [iproute2] XFRM: fixing IPsec algorithm key

(Logical change 1.82)
frm_state.c
71058eb8ef128aa99666dc4e6664e7632e12a1b9 01-Sep-2004 osdl.net!shemminger <osdl.net!shemminger> Fix ip command to not crash when interface name is too long.
always use strncpy(.., IFNAMSIZ)

(Logical change 1.79)
plink.c
ptunnel.c
6dc9f016347441fbf94cf851c054b0f45ba32c1c 31-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> make all filtering handles take const args.

(Logical change 1.77)
p_common.h
paddress.c
pmonitor.c
pneigh.c
proute.c
prule.c
tmon.c
frm_policy.c
frm_state.c
7809c61688c4a30799a07c727616887e5c885ab8 12-Aug-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch xrfm-msg.patch

(Logical change 1.64)
pxfrm.c
frm.h
frm_policy.c
frm_state.c
4b1bbd9c18641ba497d97822408f9a3f4550e871 09-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> Remove configuration options for stuff using our copied header files.

(Logical change 1.62)
akefile
8792aa821fff6c0d5d7ef1d46df7814f265e1ed9 09-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> Delete: ip/xfrm_stub.c

}(Logical change 1.62)
frm_stub.c
b9cb1c9a4bcfb3308721b53e85ff2867622ef43f 31-Jul-2004 osdl.net!shemminger <osdl.net!shemminger> XFRM is now a config optio.

(Logical change 1.60)
akefile
9a4a2b4721edc8862d87c9d3b4d4428c0dd62040 31-Jul-2004 osdl.net!shemminger <osdl.net!shemminger> (Logical change 1.60)
frm_stub.c
7238aafa61b1a51e65894cb4b3e69cf3cef0b198 31-Jul-2004 osdl.net!shemminger <osdl.net!shemminger> Initial revision
frm_stub.c
beab3a8352093d934670ed926c499adf272c9320 30-Jul-2004 osdl.net!shemminger <osdl.net!shemminger> unused variable.

(Logical change 1.59)
pxfrm.c
ad273962a13acc9a6723e2a86398cb0216c95679 30-Jul-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute-xfrm.3

2004/07/14 00:35:49-07:00 net[shemminger]!shemminger
Import patch iproute-xfrm.2

2004/07/14 00:35:49-07:00 net[shemminger]!shemminger
Import patch iproute2-xfrm.1

(Logical change 1.58)
pxfrm.c
frm_policy.c
9e566a46f24fd89e104dea064d5233ab614f490b 30-Jul-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute-xfrm.3

2004/07/14 00:35:49-07:00 net[shemminger]!shemminger
Import patch iproute-xfrm.2

(Logical change 1.58)
frm_state.c
30ff5089c4189e7ce0b462b16045dca04aba1765 30-Jul-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iproute-xfrm.3

(Logical change 1.58)
frm.h
c7699875bee00fbcd057fc62c30d6560b044e007 07-Jul-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch ipxfrm-20040707_2.diff

(Logical change 1.53)
akefile
p.c
p_common.h
pxfrm.c
frm.h
frm_policy.c
frm_state.c
7798b5237ef2b710c87f7f052d134d2180ffbd5c 07-Jul-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Initial revision
pxfrm.c
frm.h
frm_policy.c
frm_state.c
d27b1b5b41659d7b62f2e9f5213ffcefcad9753c 02-Jul-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch iplink.c.more_ifcfg_opts.diff

(Logical change 1.42)
plink.c
03156410981dcf7330a33d573154ec4a9302f741 10-Jun-2004 osdl.org!shemminger <osdl.org!shemminger> another place where user headers need to come before linux headers.

(Logical change 1.30)
pmroute.c
e5779fb2c8ca16f9fd81ae7efd14c20614b1498a 10-Jun-2004 osdl.org!shemminger <osdl.org!shemminger> more problems when kernel headers included before user headers.

(Logical change 1.29)
paddress.c
pmaddr.c
33551240de59151b4122ddf8fedc4f1cff0e2ec6 09-Jun-2004 osdl.org!shemminger <osdl.org!shemminger> Handle case wher non-root user runs ip flush.
Timeout after attempts to delete fail.

(Logical change 1.14)
proute.c
4fb466f9446d42fe3591520bf1b1e9ab7ee54f71 08-Jun-2004 org[shemminger]!shemminger <org[shemminger]!shemminger> Import patch iproute2-2.4.7-hex.patch

(Logical change 1.8)
prule.c
7272ddc775845d96ad1d388ced7ecdbc8612c64e 02-Jun-2004 osdl.org!shemminger <osdl.org!shemminger> rearrange includes to try and fix build issues.

(Logical change 1.6)
ptunnel.c
aba5acdfdb347d2c21fc67d613d83d4430ca3937 15-Apr-2004 osdl.org!shemminger <osdl.org!shemminger> (Logical change 1.3)
akefile
fcfg
p.c
p_common.h
paddress.c
plink.c
pmaddr.c
pmonitor.c
pmroute.c
pneigh.c
proute.c
prule.c
ptunnel.c
outef
outel
tm_map.c
tmon.c
tpr
86fdf0e47be697587efcf9602cd1f952a1d73170 15-Apr-2004 osdl.org!shemminger <osdl.org!shemminger> Initial revision
akefile
fcfg
p.c
p_common.h
paddress.c
plink.c
pmaddr.c
pmonitor.c
pmroute.c
pneigh.c
proute.c
prule.c
ptunnel.c
outef
outel
tm_map.c
tmon.c
tpr