iproute2/bridge
John Fastabend a40d0827a5 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 64108901b7
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>
2013-06-03 19:55:32 -07:00
..
.gitignore Add bridge command 2012-08-01 15:23:49 -07:00
Makefile bridge: Add vlan configuration support 2013-03-06 11:03:08 -08:00
br_common.h bridge: Add support for setting bridge port attributes 2013-03-16 10:01:53 -07:00
bridge.c bridge: add oneline option 2013-03-16 10:18:50 -07:00
fdb.c iproute2: support NTF_ROUTER flag in VXLAN fdb entries 2013-05-06 07:54:44 -07:00
link.c iproute2: bridge: fix 'bridge link' setlink/getlink parsing 2013-06-03 19:55:32 -07:00
mdb.c bridge: make `bridge mdb` output consistent with input 2012-12-20 10:55:55 -08:00
monitor.c ip: make local functions static 2013-02-12 11:38:35 -08:00
vlan.c bridge: Add vlan configuration support 2013-03-06 11:03:08 -08:00