]> git.ipfire.org Git - thirdparty/iproute2.git/commit
iproute2: bridge: fix 'bridge link' setlink/getlink parsing
authorJohn Fastabend <john.fastabend@gmail.com>
Wed, 29 May 2013 06:20:53 +0000 (06:20 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 4 Jun 2013 02:55:32 +0000 (19:55 -0700)
commita40d0827a58b3de39c8557db13f8a285813abd40
tree8c935af7ee14aa40677f17a07d43e04d46e957f2
parent45a3b3fcd6ffe8adbbf09e32d6f3df3e05afaf37
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>
bridge/link.c