History log of /external/iproute2/bridge/link.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/bridge/link.c
42ecedd4bae534fc688194a795eb4548c6530cda 18-Mar-2015 Roopa Prabhu <roopa@cumulusnetworks.com> fix ip -force -batch to continue on errors

This patch replaces exits with returns in several
iproute2 commands. This fixes `ip -batch -force`
to not exit but continue on errors.

$cat c.txt
route del 1.2.3.0/24 dev eth0
route del 1.2.4.0/24 dev eth0
route del 1.2.5.0/24 dev eth0
route add 1.2.3.0/24 dev eth0

$ip -force -batch c.txt
RTNETLINK answers: No such process
Command failed c.txt:2
RTNETLINK answers: No such process
Command failed c.txt:3

Reported-by: Sven-Haegar Koch <haegar@sdinet.de>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
/external/iproute2/bridge/link.c
22a98f5140373198ea2a5ca721fea937c6f7b509 26-Feb-2015 Roopa Prabhu <roopa@cumulusnetworks.com> bridge link: add support to specify master

This patch adds support to specify 'master' keyword,
to target a bridge link command explicitly to the software
bridge driver.

Adds self/master keywords to usage and man page

v2:
fix usage to say (self and master) and not (self or master)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
/external/iproute2/bridge/link.c
6b8c871dc104576c9f55d87937d6dd445d77f34f 19-Feb-2015 Alex Pilon <alp@alexpilon.ca> Allow specifying bridge port STP state by name rather than number.

The existing behaviour forces one to memorize the integer constants for
STP port states.

# bridge link set dev dummy0 state 3

This patch makes it possible to use the lowercased port state name.

# bridge link set dev dummy0 state forwarding

Invalid non-integer inputs now cause exit with status -1.

Signed-off-by: Alex Pilon <alp@alexpilon.ca>
/external/iproute2/bridge/link.c
674bb438bc5cc61a9e16f97a236203ea2f50523f 29-Dec-2014 Scott Feldman <sfeldma@gmail.com> bridge/link: add learning_sync policy flag

v2:

Resending now that the dust has cleared in 3.18 on "self" vs. hwmode debate for
brport settings. learning_sync is now set/cleared using "self" qualifier on
brport.

v1:

Add 'learned_sync' flag to turn on/off syncing of learned MAC addresses from
offload device to bridge's FDB. Flag is be set/cleared on offload device port
using "self" qualifier:

$ sudo bridge link set dev swp1 learning_sync on self

$ bridge -d link show dev swp1
2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 2
hairpin off guard off root_block off fastleave off learning off flood off
2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0
learning on learning_sync on

Adds new IFLA_BRPORT_LEARNED_SYNCED attribute for IFLA_PROTINFO on the SELF
brport.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
/external/iproute2/bridge/link.c
6fdb465869ccda91d9cc2e6f8ee3aca448df5d33 06-Dec-2014 Roopa Prabhu <roopa@cumulusnetworks.com> bridge link: add option 'self'

Currently self is set internally only if hwmode is set.
This makes it necessary for the hw to have a mode.
There is no hwmode really required to go to hardware. So, introduce
self for anybody who wants to target hardware.

v1 -> v2
- fix a few bugs. Initialize flags to zero: this was required to
keep the current behaviour unchanged.

v2 -> v3
- fix comment

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
/external/iproute2/bridge/link.c
9dca899b2d97163f18b66c21b5e7acec893b0fa4 04-Jun-2014 Andreas Henriksson <andreas@fatal.se> bridge: Make filter_index match in signedness

Michael Tautschnig wrote:

During a rebuild [...]. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

[...]
gcc bridge.o fdb.o monitor.o link.o mdb.o vlan.o ../lib/libnetlink.a ../lib/libutil.a ../lib/libnetlink.a ../lib/libutil.a -o bridge
file link.c line 18: error: conflicting types for variable "filter_index"
old definition in module fdb file fdb.c line 29
signed int
new definition in module link file link.c line 18
unsigned int
<builtin>: recipe for target 'bridge' failed
make[3]: *** [bridge] Error 64
make[3]: Leaving directory '/srv/jenkins-slave/workspace/sid-goto-cc-iproute2/iproute2-3.14.0/bridge'
Makefile:45: recipe for target 'all' failed

While practical constraints may limit the value of filter_index to remain within
the bounds of a positive signed int, there is certainly no such guarantee here.
Also, a plain majority vote suggests that this really just a wrong declaration
in link.c as several declarations of filter_index as signed int exist.

[...]

My followup on this was:

I think the majority is wrong.

filter_index is assigned exclusively from if_nametoindex or ll_name_to_index
which both return unsigned int.

Changing it to unsigned everywhere seems better.

This has been minimally tested by using the bridge tool
to add vids and showing available vids on different devices.

Reported-by: Michael Tautschnig <mt@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
/external/iproute2/bridge/link.c
f0f4ab600b5a9d1f718c8812e20dffe61ca95989 21-May-2014 Vlad Yasevich <vyasevic@redhat.com> bridge: Add learning and flood support

Add ability to control learning and flood flags on bridge
ports.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
/external/iproute2/bridge/link.c
a40d0827a58b3de39c8557db13f8a285813abd40 29-May-2013 John Fastabend <john.fastabend@gmail.com> iproute2: bridge: fix 'bridge link' setlink/getlink parsing

Use IFLA_AF_SPEC nested attributes to lookup bridge mode and when
doing strcmp() check for equality.

These appear to be typos from the original commit,

commit 64108901b737b95247b53dec8c1b8217ca8505b7
Author: Vlad Yasevich <vyasevic@redhat.com>
Date: Fri Mar 15 10:01:28 2013 -0700

bridge: Add support for setting bridge port attributes

Also set flags to BRIDGE_FLAGS_SELF instead of using OR operation.
This allows setting the bridge mode when not being used with a
master device.

To allow setting both master and self devices simultaneously we
will need to add a {self|master} field similar to fdb commands.
For now the command sets are mutually exclusive as noted in the
original commit.

With this patch 'bridge link set' works now,

# ./bridge/bridge link set dev veth1 cost 3
# ./bridge/bridge link show
10: veth1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master bridge0 state forwarding priority 3 cost 3

CC: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
/external/iproute2/bridge/link.c
4cd20da16ffa96f3c67ef7b064ad87f6c8547824 16-Mar-2013 Stephen Hemminger <stephen@networkplumber.org> bridge: add oneline option

Split output of 'bridge link' across multiple lines,
only show the flags if -d is set, and add --oneline option
like ip command.
/external/iproute2/bridge/link.c
b1b7ce0f0d2c53bf3993ec6b455e4c12ad84dcde 15-Mar-2013 Vlad Yasevich <vyasevic@redhat.com> bridge: Add support for printing bridge port attributes

Output new nested bridge port attributes.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
/external/iproute2/bridge/link.c
64108901b737b95247b53dec8c1b8217ca8505b7 15-Mar-2013 Vlad Yasevich <vyasevic@redhat.com> bridge: Add support for setting bridge port attributes

Add netlink support bridge port attributes such as cost, priority, state
and flags. This also adds support for HW mode such as VEPA or VEB.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
/external/iproute2/bridge/link.c
1465db1a14408fae2cdd9c4f5e80e28f9bdb352e 30-Oct-2012 Stephen Hemminger <shemminger@vyatta.com> bridge: use rta_getattr_xxx wrappers

Don't peek at RTA_DATA() directly.
/external/iproute2/bridge/link.c
38df7ac95d261f63980e2227f7fdd34a371c08b3 30-Oct-2012 Stephen Hemminger <shemminger@vyatta.com> bridge: remove trailing whitespace
/external/iproute2/bridge/link.c
d04bc300c3e367702817fed6eea55e997a328c66 02-Aug-2012 Stephen Hemminger <shemminger@vyatta.com> Add bridge command

New tool to allow manipulating forwarding entries and monitoring
bridge events.
/external/iproute2/bridge/link.c