History log of /external/iproute2/ip/ipaddress.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8e12bc0a9df46516b851c9baa48d9da6b0999022 04-Jan-2016 Bjørn Mork <bjorn@mork.no> iplink: support show and set of "addrgenmode random"

"random" is a new IPv6 addrgenmode, enabling "stable_secret" type
addresses with an auto-generated secret.

$ ip link set eth0 addrgenmode random

$ ip -d link show dev eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 00:21:86:a3:25:7d brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode random

Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
/external/iproute2/ip/ipaddress.c
5c5176ce4b014ddf12526ec08fc24f9eede18767 16-Dec-2015 Hannes Frederic Sowa <hannes@stressinduktion.org> iproute: print addrgenmode stable_secret and fallback otherwise

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
/external/iproute2/ip/ipaddress.c
906dfe4887672be87b0656a2034f950883f036f6 24-Nov-2015 Phil Sutter <phil@nwl.cc> ipaddress: drop unnecessary check in ipaddr_list_flush_or_save()

Right after ipaddr_reset_filter(), filter.family is always AF_UNSPEC.

Signed-off-by: Phil Sutter <phil@nwl.cc>
/external/iproute2/ip/ipaddress.c
d25ec03e1dce4cf22093a9f7106e9401ab5bf066 24-Nov-2015 Phil Sutter <phil@nwl.cc> ipaddress: fix ipaddr_flush for Linux >= 3.1

Linux version 3.1 introduced a consistency check for netlink dumps in
commit 670dc28 ("netlink: advertise incomplete dumps"). This bites
iproute2 when flushing more addresses than can fit into a single
RTM_GETADDR response. To silence the spurious error message "Dump was
interrupted and may be inconsistent.", advise rtnl_dump_filter_l() to
not care about NLM_F_DUMP_INTR.

Signed-off-by: Phil Sutter <phil@nwl.cc>
/external/iproute2/ip/ipaddress.c
c6995c48025233902a5b0c5fe88654e17ea934f6 24-Nov-2015 Phil Sutter <phil@nwl.cc> ipaddress: simplify ipaddr_flush()

Since it's no longer relevant whether an IP address is primary or
secondary when flushing, ipaddr_flush() can be simplified a bit.

Signed-off-by: Phil Sutter <phil@nwl.cc>
/external/iproute2/ip/ipaddress.c
e149d4e84384f88965ce43a6390acf7ba356187c 05-Nov-2015 Neil Horman <nhorman@tuxdriver.com> iproute2: Ignore EADDRNOTAVAIL errors during address flush operation

I found recently that, if I disabled address promotion in the kernel, that
ip addr flush dev <dev>

would fail with an EADDRNOTAVAIL errno (though the flush operation would in fact
flush all addresses from an interface properly)

Whats happening is that, if I add a primary and multiple secondary addresses to
an interface, the flush operation first ennumerates them all with a GETADDR |
DUMP operation, then sends a delete request for each address. But the kernel,
having promotion disabled, deletes all secondary addresses when the primary is
removed. That means, that several delete requests may still be pending in the
netlink request for addresses that have been removed on our behalf, resulting in
EADDRNOTAVAIL return codes.

It seems the simplest thing to do is to understand that EADDRUNAVAIL isn't a
fatal outcome on a flush operation, as it just indicates that an address which
you want to remove is already removed, so it can safely be ignored.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Stephen Hemminger <stephen@networkplumber.org>
CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
/external/iproute2/ip/ipaddress.c
6f07f3dc41545657c0364eb17850b946f41861bf 16-Oct-2015 Phil Sutter <phil@nwl.cc> ip-address: fix oneline mode for interfaces with VF

Signed-off-by: Phil Sutter <phil@nwl.cc>
/external/iproute2/ip/ipaddress.c
8aacb9bbbd741c2873ee90118264ae2d5bbd9ae3 25-Sep-2015 Christoph Schulz <develop@kristov.de> ip: allow using a device "help" (or a prefix thereof)

Device names that match "help" or a prefix thereof should be allowed anywhere
a device name can be used. Note that a suitable keyword ("dev" or "name", the
latter for "ip tunnel") has to be used in these cases to resolve ambiguities.

Signed-off-by: Christoph Schulz <develop@kristov.de>
Reported-by: Leonhard Preis <leonhard@pre.is>
Reported-by: Wilhelm Wijkander <lists@0x5e.se>
/external/iproute2/ip/ipaddress.c
84d30afd8af596d775be5a91d891755f3071cfe5 24-Sep-2015 David Ahern <dsa@cumulusnetworks.com> ip: Add type and master filters to brief output

The brief format does not honer the master and type filters:

$ ip link show master vrf-mgmt
7: dummy0: <BROADCAST,NOARP,SLAVE> mtu 1500 qdisc noop master vrf-mgmt state DOWN mode DEFAULT group default qlen 1000
link/ether 66:39:cc:2b:e9:bd brd ff:ff:ff:ff:ff:ff

$ ip -br link show master vrf-mgmt
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
eth0 UP 08:00:27:de:14:c8 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth1 UP 08:00:27:87:02:f1 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth2 UP 08:00:27:61:1e:fd <BROADCAST,MULTICAST,UP,LOWER_UP>
vrf-blue UNKNOWN a6:3f:09:34:7e:74 <NOARP,MASTER,UP,LOWER_UP>
vrf-red DOWN fe:a2:2d:e1:bc:ac <NOARP,MASTER>
dummy0 DOWN 66:39:cc:2b:e9:bd <BROADCAST,NOARP,SLAVE>
dummy1 DOWN 4a:4f:13:91:64:b1 <BROADCAST,NOARP,SLAVE>
dummy2 DOWN b2:4f:b6:cd:bd:a6 <BROADCAST,NOARP>
dummy3 DOWN 1e:06:3d:40:b8:c2 <BROADCAST,NOARP,SLAVE>
vrf-mgmt DOWN ce:b2:74:41:21:df <NOARP,MASTER>

With this patch the expected output is shown:

$ ip -br link show master vrf-mgmt
dummy0 DOWN 66:39:cc:2b:e9:bd <BROADCAST,NOARP,SLAVE>

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
/external/iproute2/ip/ipaddress.c
f1e225beef61b2d8d3df79cbb86ba72ca97097de 01-Sep-2015 Stephen Hemminger <shemming@brocade.com> Merge branch 'master' into net-next
5d295bb8e1af491bc3de1d2506cbb2bd6bbd9da1 28-Aug-2015 Andy Gospodarek <gospo@cumulusnetworks.com> add support for brief output for link and addresses

This adds support for slightly less output than is normally provided by
'ip link show' and 'ip addr show'. This is a bit better when you have a
host with lots of interfaces. Sample output:

$ ip -br link show
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
p2p1 UP 08:00:27:ee:0b:3b <BROADCAST,MULTICAST,UP,LOWER_UP>
p7p1 UP 08:00:27:9d:62:9f <BROADCAST,MULTICAST,UP,LOWER_UP>
p8p1 DOWN 08:00:27:dc:d8:ca <NO-CARRIER,BROADCAST,MULTICAST,UP>
p9p1 UP 08:00:27:76:d9:75 <BROADCAST,MULTICAST,UP,LOWER_UP>
p7p1.100@p7p1 UP 08:00:27:9d:62:9f <BROADCAST,MULTICAST,UP,LOWER_UP>

$ ip -br -4 addr show
lo UNKNOWN 127.0.0.1/8
p2p1 UP 192.168.56.2/24
p7p1 UP 70.0.0.1/24
p8p1 DOWN 80.0.0.1/24
p9p1 UP 10.0.5.15/24
p7p1.100@p7p1 UP 200.0.0.1/24

$ ip -br -6 addr show
lo UNKNOWN ::1/128
p2p1 UP fe80::a00:27ff:feee:b3b/64
p7p1 UP 7000::1/8 fe80::a00:27ff:fe9d:629f/64
p8p1 DOWN 8000::1/8
p9p1 UP fe80::a00:27ff:fe76:d975/64
p7p1.100@p7p1 UP fe80::a00:27ff:fe9d:629f/64

$ ip -br addr show p7p1
p7p1 UP 70.0.0.1/24 7000::1/8 fe80::a00:27ff:fe9d:629f/64

v2: Now with color support!
v3: Better field width estimation (except netdev names to keep output at a
decent width) and whitespace fixup.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
/external/iproute2/ip/ipaddress.c
9a6422c2438d60d9ecedac27d813f4c3fb44a7da 14-Aug-2015 Stephen Hemminger <shemming@brocade.com> Merge branch 'master' into net-next
4e972d5ef41b28679a8125ed5289496284a9157f 12-Aug-2015 Pavel Šimerda <psimerda@redhat.com> ip-address: fix and extend documentation

* Improve manual page synopsis and built-it help
* Use full subcommand names (e.g. 'address' and 'maddress')
* Specify when IPv4, IPv6 or both are affected
* Add lifetimes, home and nodad
* Remove any remaining excess spaces

Commit 43d29f7 substantially improves generated ip-address.8 instead of
ip-address.8.in and commit e419f2d removes the generated one losing the
improvements entirely. This commit recovers the lost changes, adapts
them to the current manual page and adds more man page and help
improvements.

Original commit by: Kenyon Ralph <kenyon@kenyonralph.com>
/external/iproute2/ip/ipaddress.c
188648270ae9d5d967fddf496cd2f2a5ac04e2bf 14-Jul-2015 Anuradha Karuppiah <anuradhak@cumulusnetworks.com> ip link: proto_down config and display.

This patch adds support to set and display protodown on a switch port. The
switch driver can handle this error state by doing a phys down on the port.

One example user space application setting this flag is a multi-chassis
LAG application to handle split-brain situation on peer-link failure.

Example:
root@net-next:~# ip link set eth1 protodown on
root@net-next:~/iproute2# ip link show eth1
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:12:35:01 brd ff:ff:ff:ff:ff:ff protodown on
root@net-next:~/iproute2# ip link set eth1 protodown off
root@net-next:~/iproute2# ip link show eth1
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:12:35:01 brd ff:ff:ff:ff:ff:ff
root@net-next:~/iproute2#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
/external/iproute2/ip/ipaddress.c
122f2fc5739c1ba9967775581201eefece855602 08-Jul-2015 Jiri Pirko <jiri@resnulli.us> iproute2: ipa: show switch id

We forgot to include this patch somehow. So do it now.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
/external/iproute2/ip/ipaddress.c
a1b99717c7cd72f066f351e3296430bc5fa0ab03 15-Jun-2015 Eran Ben Elisha <eranbe@mellanox.com> Add displaying VF traffic statistics

Enable reading and displaying SRIOV VFs traffic statistics through
the host PF netdevice using the nested IFLA_VF_STATS attribute.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
/external/iproute2/ip/ipaddress.c
03371c7d98d167145b0c562f5d2ca2f54c8a5c7f 28-May-2015 Stephen Hemminger <shemming@brocade.com> Merge branch 'master' into net-next

Conflicts:
include/linux/tcp.h
lib/libnetlink.c
c079e121a73af5eb49e003b13607e8a690331df6 27-May-2015 Stephen Hemminger <shemming@brocade.com> libnetlink: add size argument to rtnl_talk

There have been several instances where response from kernel
has overrun the stack buffer from the caller. Avoid future problems
by passing a size argument.

Also drop the unused peer and group arguments to rtnl_talk.
/external/iproute2/ip/ipaddress.c
0628cddd9d5c0cb9ed0e0aba136e50de93487150 20-May-2015 Nicolas Dichtel <nicolas.dichtel@6wind.com> libnetlink: introduce rtnl_listen_filter_t

There is no functional change with this commit. It only prepares the next one.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
/external/iproute2/ip/ipaddress.c
d7bd2db52c1fcfe5159dda101f786020e8304820 28-Apr-2015 Mathias Nyman <m.nyman@iki.fi> ip: Add color output option

It is hard to quickly find what you are looking for in the output of the
ip command. Color helps.

This patch adds a '-c' flag to highlight these with individual colors:
- interface name
- ip address
- mac address
- up/down state

Signed-off-by: Mathias Nyman <m.nyman@iki.fi>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
/external/iproute2/ip/ipaddress.c
e31867ac30cf95155d113bbfaedf6b99f98a677f 04-Mar-2015 Madhu Challa <challa@noironetworks.com> ip: enable configuring multicast group autojoin

Joining multicast group on ethernet level via "ip maddr" command would
not work if we have an Ethernet switch that does igmp snooping since
the switch would not replicate multicast packets on ports that did not
have IGMP reports for the multicast addresses.

Linux vxlan interfaces created via "ip link add vxlan" have the group option
that enables then to do the required join.

By extending ip address command with option "autojoin" we can get similar
functionality for openvswitch vxlan interfaces as well as other tunneling
mechanisms that need to receive multicast traffic.

example:
ip address add 224.1.1.10/24 dev eth5 autojoin
ip address del 224.1.1.10/24 dev eth5
/external/iproute2/ip/ipaddress.c
ccdcbf35f120c754660b3b3f48fa67cc950a6407 17-Feb-2015 Nicolas Dichtel <nicolas.dichtel@6wind.com> iplink: add support of IFLA_LINK_NETNSID attribute

This new attribute is now advertised by the kernel for x-netns interfaces.
It's also possible to set it when an interface is created (and thus creating a
x-netns interface with one single message).

Example:
$ ip netns add foo
$ ip netns add bar
$ ip -n foo netns set bar 15
$ ip -n foo link add ipip1 link-netnsid 15 type ipip remote 10.16.0.121 local 10.16.0.249
$ ip -n foo link ls ipip1
3: ipip1@NONE: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default
link/ipip 10.16.0.249 peer 10.16.0.121 link-netnsid 15

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
/external/iproute2/ip/ipaddress.c
5e5055bc26aea47073e9071fbc6ddb822ff89c58 23-Jan-2015 Andreas Henriksson <andreas@fatal.se> iproute2/ip: fix up filter when printing addresses

"ip addr show up" would exclude the interface (link), but include the
addresses of down interfaces (which looked like they where indented
under a different interface). This fixes the filtering.

For a full example see the original bug report at:
http://bugs.debian.org/776040

Reported-by: Paul Slootman <paul@debian.org>
CC: 776040@bugs.debian.org
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
/external/iproute2/ip/ipaddress.c
8c29ae7cc2494e251520584e83698c1a9f1912e5 09-Jan-2015 Vadim Kochan <vadim4j@gmail.com> ip link: Fix crash on older kernels when show VF dev

The issue was caused that ifla_vf_rate does not exist on
older kernels and should be checked if it exists as nested attr.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Reported-by: William Dauchy <william@gandi.net>
Tested-by: William Dauchy <william@gandi.net>
/external/iproute2/ip/ipaddress.c
ee0067a918e229cd0f3689364b4ce5eadbe3abdd 08-Jan-2015 Jiri Pirko <jiri@resnulli.us> iplink: print out addrgenmode attribute

addrgenmode is currently write only by ip. So display this information
if provided by kernel as well.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
/external/iproute2/ip/ipaddress.c
712249d8fac88bcf3a9fd0b1de2263074075873b 10-Dec-2014 Vadim Kochan <vadim4j@gmail.com> ip link: Show devices by type

Added new option 'type' to 'ip link show'
command which allows to filter devices by type:

ip link show type bridge
ip link show type vlan

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
/external/iproute2/ip/ipaddress.c
b5f39b2588a6b0312f11ac6d0fab9391b105b83c 22-Dec-2014 Heiner Kallweit <hkallweit1@gmail.com> ip: allow ip address show to list addresses with certain flags not being set

Sometimes it's needed to have "ip address show" list only addresses
with certain flags not being set, e.g. in network scripts.
As an example one might want to exclude addresses in "tentative"
or "deprecated" state.

Support listing addresses with flags tentative, deprecated, dadfailed
not being set by prefixing the respective flag with a minus.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
/external/iproute2/ip/ipaddress.c
2ec28933b6cdeaf98ad8d3d6e9471b50bac91223 04-Dec-2014 Nicolas Dichtel <nicolas.dichtel@6wind.com> ipaddress: enable -details option

This option was used only for 'ip link', but it can be useful to have it for
'ip address'. Thus it is possible to display link details and addresses with one
command.

Example:
$ ip -d a ls dev gre1
9: gre1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1468 qdisc noqueue state UNKNOWN group default
link/gre 10.16.0.249 peer 10.16.0.121 promiscuity 0
gre remote 10.16.0.121 local 10.16.0.249 ttl inherit ikey 0.0.0.10 okey 0.0.0.10 icsum ocsum
inet 192.168.0.249 peer 192.168.0.121/32 scope global gre1
valid_lft forever preferred_lft forever
inet6 fe80::5efe:a10:f9/64 scope link
valid_lft forever preferred_lft forever

Suggested-by: Christophe Gouault <christophe.gouault@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
/external/iproute2/ip/ipaddress.c
1b94414854d71a6b6df367644ae9b06a54278daf 29-Nov-2014 Vadim Kochan <vadim4j@gmail.com> ip link: Allow to filter devices by master dev

Added 'master' option to 'ip link show' command
to filter devices by master dev.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
/external/iproute2/ip/ipaddress.c
093b76466e930f8c4f6b65c4c10d4a0ec2bc9773 19-Oct-2014 vadimk <vadim4j@gmail.com> ip monitor: Allow to filter events by dev

Added 'dev' option to allow filtering events by device.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
/external/iproute2/ip/ipaddress.c
50ec66507b5e8f58540a87360ace72b0c88a2a36 04-Nov-2014 Christian Hesse <mail@eworm.de> ip-link: in human readable output use dynamic precision length
/external/iproute2/ip/ipaddress.c
f4fe81d26cd4e9077bb93376de0cc69e292fb1c5 03-Nov-2014 Christian Hesse <mail@eworm.de> ip-link: fix column alignment

Width is the maximum number of characters used for the value, excluding a
field separator. So append a single whitespace.
/external/iproute2/ip/ipaddress.c
1e264abc3a3d8c303b235c8f15c420e4feabb7fe 02-Nov-2014 Stephen Hemminger <shemming@brocade.com> ip: add iec formatted option and cleanup code

Add a new -iec option in addition to -human.
Cleanup code so the formatting of numbers is done in one function,
not 2 ways and 2 sizes.
/external/iproute2/ip/ipaddress.c
b68d983754bcf781caa9fac454cff674775a2c35 31-Oct-2014 Christian Hesse <mail@eworm.de> ip-link: add switch to show human readable output

Byte and packet count can increase to really big numbers. This adds a
switch to show human readable output.

4: wl: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
1523846973 3969051 0 0 0 0
TX: bytes packets errors dropped carrier collsns
8710088361 6077735 0 0 0 0
4: wl: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
1.5G 3.9M 0 0 0 0
TX: bytes packets errors dropped carrier collsns
8.7G 6.0M 0 0 0 0
/external/iproute2/ip/ipaddress.c
5d5cf1b43706721c1db68ba5d54098a81390bc11 03-Oct-2014 Jiri Benc <jbenc@redhat.com> ip address: print stats with -s

Make ip address show accept the -s option similarly to ip link. This creates
an one command replacement for "ifconfig -a" useful for people who still
stay with ifconfig because of this feature.

Print the stats as the last thing for the interface. This requires some code
shuffling.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
/external/iproute2/ip/ipaddress.c
50b9950dd90114609e10298c0fa32a9371250687 16-Jul-2014 Roopa Prabhu <roopa@cumulusnetworks.com> link dump filter

This patch avoids a full link wildump request when the user has specified
a single link. Uses RTM_GETLINK without the NLM_F_DUMP flag.

This helps on a system with large number of interfaces.

This patch currently only uses the link ifindex in the filter.
Hoping to provide a subsequent kernel patch to do link dump filtering on
other attributes in the kernel.

In iplink_get, to be safe, this patch currently sets the answer buffer
size to the max size that libnetlink rtnl_talk can copy. The current api
does not seem to provide a way to indicate the answer buf size.

changelog from RFC to v1:
- incorporated comments from stephen (fixed comment and fixed if/else block)

changelog from v1 to v2:
- fix whitespaces error

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
/external/iproute2/ip/ipaddress.c
1199c4f569175e09a33bf6b1af3a8faadbf9dc04 14-Jul-2014 Stephen Hemminger <stephen@networkplumber.org> ip: add paren to silence warning

Gcc doesn't like mixed || and && in same conditional.
/external/iproute2/ip/ipaddress.c
f89a2a05ffa94ac5bec9f50751f761215356092b 22-May-2014 Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool

o "min_tx_rate" option has been added for minimum Tx rate. Hence, for
consistent naming, "max_tx_rate" option has been introduced for maximum
Tx rate.

o Change in v2: "rate" can be used along with "max_tx_rate".
When both are specified, "max_tx_rate" should override.

o Change in v3:
* IFLA_VF_RATE: When IFLA_VF_RATE is used, and user has given only one of
min_tx_rate or max_tx_rate, reading of previous rate limits is done in
userspace instead of in kernel space before ndo_set_vf_rate.

* IFLA_VF_TX_RATE: When IFLA_VF_TX_RATE is used, min_tx_rate is always read
in kernel space. This takes care of below scenarios:
(1) when old tool sends "rate" but kernel is new (expects min and max)
(2) when new tool sends only "rate" but kernel is old (expects only "rate")

o Change in v4 as suggested by Stephen Hemminger:
* As per iproute policy, input and output formats should match. Changing display
of max_tx_rate and min_tx_rate options accordingly.
./ip/ip link show p3p1
8: p3p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
link/ether 00:0e:1e:16:ce:40 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 2a:18:8f:4d:3d:d4, tx rate 700 (Mbps), max_tx_rate 700Mbps, min_tx_rate 200Mbps
vf 1 MAC 72:dc:ba:f9:df:fd

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
/external/iproute2/ip/ipaddress.c
4ec0ffde42b79cfde698e4f31cd6d0b72d735574 29-May-2014 Stephen Hemminger <stephen@networkplumber.org> fix format warnings

Enable format security, and fix the warning caused by printing
with string for format.
/external/iproute2/ip/ipaddress.c
c897067480a0e0fbf6231edf1ded8fc12ca6ad9d 15-May-2014 Jiri Pirko <jiri@resnulli.us> iproute2: ipa: show port id

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
/external/iproute2/ip/ipaddress.c
4b726cb1762f3255726d4dd6843c33d3ab07bf83 09-May-2014 Stephen Hemminger <stephen@networkplumber.org> Whitespace and indentation cleanup

Need to go over whole source and scrub..
/external/iproute2/ip/ipaddress.c
30b557929f2aaeeee59e1bbaad7c804bcae40e7b 06-May-2014 david decotigny <decot@googlers.com> iproute2: show counter of carrier on<->off transitions

This patch allows to display the current counter of carrier on<->off
transitions (IFLA_CARRIER_CHANGES, see kernel commit "expose number of
carrier on/off changes"):

ip -s -s link show dev eth0
32: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
link/ether ................. brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
125552461 258881 0 0 0 10150
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
40426119 224444 0 0 0 0
TX errors: aborted fifo window heartbeat transns
0 0 0 0 3

Tested:
- kernel with patch "net-sysfs: expose number of carrier on/off
changes": see "transns" column above
- kernel wthout the patch: "transns" not displayed (as expected)

Signed-off-by: David Decotigny <decot@googlers.com>
/external/iproute2/ip/ipaddress.c
a424c3936080dbaa199628c2fee2f4b8853db161 10-Apr-2014 Heiner Kallweit <heiner.kallweit@web.de> ip: officially support flag mngtmpaddr also for "ip addr del"

Kernel is being extended to support flag IFA_F_MANAGETEMPADDR also for
deletion of addresses. This will allow a userspace application to indicate
that for a global address the kernel should delete all related temporary
addresses as well.

"ip addr del" internally calls ipaddr_modify which silently accepts
any flag provided on the command line already, independent of the
actual command.
Therefore only the usage documentation needs to be extended.

Signed-off-by: Heiner Kallweit <heiner.kallweit@web.de>
/external/iproute2/ip/ipaddress.c
8b21f88dd05d72a960ec4170ed49288e8846f578 04-Apr-2014 WANG Cong <xiyou.wangcong@gmail.com> ipaddress: do not add IFA_FLAGS when not necessary

commit 37c9b94ed21d5779acc23d89a4 (add support for extended ifa_flags)
introduced a regression:

# ./ip/ip addr add 192.168.0.1/24 dev eth0
RTNETLINK answers: Invalid argument

This is due to old kernels don't support IFA_FLAGS flag, we should not
use it if we don't use the flags beyond old .ifa_flags.

Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
/external/iproute2/ip/ipaddress.c
4806867a6cc2950293229e66efe88061323ca0cf 17-Feb-2014 Stephen Hemminger <stephen@networkplumber.org> kill spaces before tabs
/external/iproute2/ip/ipaddress.c
0612519e011812276ade512d4a7f8113497f64ed 17-Feb-2014 Stephen Hemminger <stephen@networkplumber.org> Remove trailing whitespace
/external/iproute2/ip/ipaddress.c
fbea6115645a126de87bbcf51371050dde1a5b39 23-Jan-2014 Jiri Pirko <jiri@resnulli.us> introduce support for slave info data

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
/external/iproute2/ip/ipaddress.c
58c69b226fb3adff1644914654d4fad99c2ee463 07-Jan-2014 Thomas Haller <thaller@redhat.com> add support for IFA_F_NOPREFIXROUTE

Signed-off-by: Thomas Haller <thaller@redhat.com>
/external/iproute2/ip/ipaddress.c
5b7e21c417beae648312c27ee2043e7c04134c92 06-Jan-2014 Jiri Pirko <jiri@resnulli.us> add support for IFA_F_MANAGETEMPADDR

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
/external/iproute2/ip/ipaddress.c
37c9b94ed21d5779acc23d89a46d86b4df400ff3 06-Jan-2014 Jiri Pirko <jiri@resnulli.us> add support for extended ifa_flags

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
/external/iproute2/ip/ipaddress.c
ffa35d930b9bae8324768c5b018adaf26258aff9 30-Sep-2013 Sami Kerola <kerolasa@iki.fi> ip: make -resolve addr to print names rather than addresses

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

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
/external/iproute2/ip/ipaddress.c
c4fdf75d3def78fc5a08bbb3d91f10e456e8d0f1 03-Aug-2013 Stefan Tomanek <stefan.tomanek@wertarbyte.de> ip link: fix display of interface groups

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

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

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
/external/iproute2/ip/ipaddress.c
973eb50b1832cdbb9517bf08e322fbf6b3c212be 16-Jul-2013 Nicolas Dichtel <nicolas.dichtel@6wind.com> ipadress: fix display of IPv6 peer address

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

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
/external/iproute2/ip/ipaddress.c
07fa9c1529871b61879e11a7c9eccbf357982591 13-Jun-2013 Rony Efraim <ronye@mellanox.com> Add VF link state control

Add link state per VF command

Signed-off-by: Rony Efraim <ronye@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
/external/iproute2/ip/ipaddress.c
f0124b0f0aa0e5b9288114eb8e6ff9b4f8c33ec8 28-Mar-2013 Stephen Hemminger <stephen@networkplumber.org> ip: remove unnecessary ll_init_map

Don't call ll_init_map on modify operations
Saves significant overhead with 1000's of devices.
/external/iproute2/ip/ipaddress.c
1124ffb721ea4f3e53abdb54070314cbd6bb6956 14-Mar-2013 Stephen Hemminger <stephen@networkplumber.org> ipaddress: minor white space cleanup

Convert leading spaces to tabs, and put alias in one printf
/external/iproute2/ip/ipaddress.c
44051234330e3211f0cf4b4741114d4b93b439a4 14-Mar-2013 Petr Šabata <contyk@redhat.com> iproute2: Mention the 'up' argument in documentation

Both ip-link and ip-address support the 'up' argument, however this
isn't documented in neither their help outputs or ip-address' manpage.
This patch fixes that.

Signed-off-by: Petr Šabata <contyk@redhat.com>
Reported-by: Jiří Popelka <jpopelka@redhat.com>
/external/iproute2/ip/ipaddress.c
263c894fd114c489ca29290d24b088556a85e73d 12-Mar-2013 roopa <roopa@cumulusnetworks.com> Fix -oneline output when alias present

This patch removes '\n' in -oneline output when alias
present on interface

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
/external/iproute2/ip/ipaddress.c
d1f28cf181a6f77f230d90267eef0ecfbcb25f30 12-Feb-2013 Stephen Hemminger <stephen@networkplumber.org> ip: make local functions static
/external/iproute2/ip/ipaddress.c
14645ec2310ee7cf6d2f3d5035ac37ec09674e2c 08-Feb-2013 Kees van Reeuwijk <reeuwijk@few.vu.nl> iproute2: improved error messages

This patch improves many error messages as follows:
- For incorrect parameters, show the value of the offending parameter, rather than just say that it is incorrect
- Rephrased messages for clarity
- Rephrased to more `mainstream' english

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
/external/iproute2/ip/ipaddress.c
1cb6a110d676cb261bedf2ba0103209fcbbc4367 05-Feb-2013 Stephen Hemminger <stephen@networkplumber.org> ip: change format of promiscuity display

Don't put it on separate line, keep it on line with link address.
/external/iproute2/ip/ipaddress.c
ede6a3eaf53aed3671a4236d3006de0693ab6246 05-Feb-2013 Nicolas Dichtel <nicolas.dichtel@6wind.com> iplink: display the value of IFLA_PROMISCUITY

This is useful to know the 'real' status of an interface (the flag IFF_PROMISC
is exported by the kernel only when the user set it explicitly, for example it
will not be exported when a tcpdump is running).

This information will be displayed when '-details' is provided by the user.

Example:
$ ip -d l l tun10
6: tun10: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN mode DEFAULT
link/sit 10.16.0.249 peer 10.16.0.121
sit remote 10.16.0.121 local 10.16.0.249 ttl inherit pmtudisc 6rd-prefix 2002::/16
promiscuity 2

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
/external/iproute2/ip/ipaddress.c
d36035185ce948f6bf85978b6903cce1293061d7 29-Jan-2013 Nicolas Dichtel <nicolas.dichtel@6wind.com> ipaddr: fix a typo in error msg about SIOCGIFTXQLEN

The optname was wrong.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
/external/iproute2/ip/ipaddress.c
5bd9dd49aecb66cae5e6d34197ab0487d946cc1d 23-Dec-2012 Strake <strake888@gmail.com> include needed files

Needed to build iproute2 with musl
/external/iproute2/ip/ipaddress.c
7f747fd9377b8538adeba7332d25905ba08ac156 03-Oct-2012 Petr Písař <ppisar@redhat.com> iproute2: List interfaces without net address by default

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

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

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

Signed-off-by: Petr Písař <ppisar@redhat.com>
/external/iproute2/ip/ipaddress.c
81824ac2285d4d82c74b6293bb23027ef5a3ec67 11-Sep-2012 Pavel Emelyanov <xemul@parallels.com> iproute: Add ability to save, restore and show the interfaces' addresses (resend)

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

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

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
/external/iproute2/ip/ipaddress.c
f1675d615bbf0807b597c982abee4027bb804cb7 16-Aug-2012 Dan Kenigsberg <danken@redhat.com> utils: invarg: msg precedes the faulty arg

fix all call which reversed the arg order.

Signed-off-by: Dan Kenigsberg <danken@redhat.com>
/external/iproute2/ip/ipaddress.c
af9d406f99853848054162ed7aefbe71dc03e433 13-Aug-2012 Mike Frysinger <vapier@gentoo.org> Fix regression with 'ip address show'

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

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

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

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

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

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

if i revert the change to the if statement there, `ip a s` works for me again.
/external/iproute2/ip/ipaddress.c
8d07e5f7d995171ee8834eae268e300560de5d4f 13-Jul-2012 Stephen Hemminger <shemminger@vyatta.com> Refactor ipaddr_list_or_flush

Alternative solution to problem reported by Pravin B Shelar <pshelar@nicira.com>
Split large function ipaddr_list_or_flush into components.
Fix memory leak of address and link nlmsg info.
Avoid fetching address info if only flushing.
/external/iproute2/ip/ipaddress.c
62e2e540919d31147165dabd35431c0649122c96 09-Jun-2012 Eric Dumazet <edumazet@google.com> ip: speedup ip link

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

Provides a head/tail to cut time.

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

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

Signed-off-by: Eric Dumazet <edumazet@google.com>
/external/iproute2/ip/ipaddress.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
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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.
---
/external/iproute2/ip/ipaddress.c
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.
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.c
242b8da71be73204500cc85613a399d6968f23af 12-Apr-2011 Stephen Hemminger <shemminger@vyatta.com> Use INIT_NETDEV_GROUP

Now that headers are sanitized, use the define.
/external/iproute2/ip/ipaddress.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
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.c
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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.c
ace9c96121b10ff8f91d79b7486bb8a5520c12df 23-Mar-2009 Stephen Hemminger <stephen.hemminger@vyatta.com> Add support for IFALIAS

New 2.6.28 support for text description
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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 )
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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.
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.c
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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.c
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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.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>
/external/iproute2/ip/ipaddress.c
8ed63ab1f1283b2c63355fb7c1e80abead4b9399 21-Sep-2005 shemminger <shemminger> Fix leaks and warnings reported by valgrind.
/external/iproute2/ip/ipaddress.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
/external/iproute2/ip/ipaddress.c
f332d169246447bd5e258ac03d5ee840a70adb1e 06-Jul-2005 shemminger <shemminger> Cleanup GCC4 warnings about signedness.
/external/iproute2/ip/ipaddress.c
f082b64fb40b467bc1f9e5d245114aae4e256d5c 30-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch addr-del

(Logical change 1.178)
/external/iproute2/ip/ipaddress.c
73b49e9f481c075141e27699f629750748833b78 14-Mar-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch ip-nocarrier

(Logical change 1.161)
/external/iproute2/ip/ipaddress.c
3eb1731bbd566e369c76a2030b003d751d86941d 07-Feb-2005 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch family_check_when_flushing

(Logical change 1.139)
/external/iproute2/ip/ipaddress.c
48cef4eb2b30bbc8ff04c0bb85c0b0689896e5e8 18-Jan-2005 6!tgraf <6!tgraf> tb buffer initialization is now done in the parser

(Logical change 1.129)
/external/iproute2/ip/ipaddress.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)
/external/iproute2/ip/ipaddress.c
ae0f14435ef436183e6300336602137ef501e7a5 19-Oct-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch stats.eml

(Logical change 1.96)
/external/iproute2/ip/ipaddress.c
6dc9f016347441fbf94cf851c054b0f45ba32c1c 31-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> make all filtering handles take const args.

(Logical change 1.77)
/external/iproute2/ip/ipaddress.c
e5779fb2c8ca16f9fd81ae7efd14c20614b1498a 10-Jun-2004 osdl.org!shemminger <osdl.org!shemminger> more problems when kernel headers included before user headers.

(Logical change 1.29)
/external/iproute2/ip/ipaddress.c
aba5acdfdb347d2c21fc67d613d83d4430ca3937 15-Apr-2004 osdl.org!shemminger <osdl.org!shemminger> (Logical change 1.3)
/external/iproute2/ip/ipaddress.c
86fdf0e47be697587efcf9602cd1f952a1d73170 15-Apr-2004 osdl.org!shemminger <osdl.org!shemminger> Initial revision
/external/iproute2/ip/ipaddress.c