summaryrefslogtreecommitdiff
path: root/bridge
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@kernel.org>2021-09-08 15:13:49 -0600
committerDavid Ahern <dsahern@kernel.org>2021-09-08 15:13:49 -0600
commit917d913b2e792fcecc7a69ff4eb778e7e87519e4 (patch)
tree6030d3c29164ea23811d20e9fb49f689538eee32 /bridge
parentd0cba0d1f6590ed66f0c2b87794fe745e8142c59 (diff)
parente7e0e2ce65708a06e95e5822efaf10b34835e518 (diff)
downloadiproute2-917d913b2e792fcecc7a69ff4eb778e7e87519e4.tar.gz
Merge branch 'main' into next
Conflicts: include/uapi/linux/virtio_ids.h Signed-off-by: David Ahern <dsahern@kernel.org>
Diffstat (limited to 'bridge')
-rw-r--r--bridge/bridge.c2
-rw-r--r--bridge/fdb.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/bridge/bridge.c b/bridge/bridge.c
index f7bfe0b5..48b0e7f8 100644
--- a/bridge/bridge.c
+++ b/bridge/bridge.c
@@ -149,9 +149,9 @@ main(int argc, char **argv)
NEXT_ARG();
if (netns_switch(argv[1]))
exit(-1);
+ } else if (matches_color(opt, &color)) {
} else if (matches(opt, "-compressvlans") == 0) {
++compress_vlans;
- } else if (matches_color(opt, &color)) {
} else if (matches(opt, "-force") == 0) {
++force;
} else if (matches(opt, "-json") == 0) {
diff --git a/bridge/fdb.c b/bridge/fdb.c
index 37465e46..8912f092 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -192,10 +192,13 @@ int print_fdb(struct nlmsghdr *n, void *arg)
"mac", "%s ", lladdr);
}
- if (!filter_index && r->ndm_ifindex)
+ if (!filter_index && r->ndm_ifindex) {
+ print_string(PRINT_FP, NULL, "dev ", NULL);
+
print_color_string(PRINT_ANY, COLOR_IFNAME,
- "ifname", "dev %s ",
+ "ifname", "%s ",
ll_index_to_name(r->ndm_ifindex));
+ }
if (tb[NDA_DST]) {
int family = AF_INET;
@@ -208,9 +211,11 @@ int print_fdb(struct nlmsghdr *n, void *arg)
RTA_PAYLOAD(tb[NDA_DST]),
RTA_DATA(tb[NDA_DST]));
+ print_string(PRINT_FP, NULL, "dst ", NULL);
+
print_color_string(PRINT_ANY,
ifa_family_color(family),
- "dst", "dst %s ", dst);
+ "dst", "%s ", dst);
}
if (vid)