[iproute PATCH] bridge: Prevent a double space in bridge mdb show

Subsystems: the rest

STALE3137d

2 messages, 2 authors, 2018-02-23 · open the first message on its own page

[iproute PATCH] bridge: Prevent a double space in bridge mdb show

From: Timothy Redaelli <hidden>
Date: 2018-02-19 16:13:15

Prevent a double space in "bridge mdb show" when the MDB entry is not
marked as "offload".

Signed-off-by: Timothy Redaelli <redacted>
---
 bridge/mdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bridge/mdb.c b/bridge/mdb.c
index 62dc8a0c..58c20b82 100644
--- a/bridge/mdb.c
+++ b/bridge/mdb.c
@@ -166,12 +166,12 @@ static void print_mdb_entry(FILE *f, int ifindex, struct br_mdb_entry *e,
 		if (mdb_flags)
 			jsonw_end_array(jw_global);
 	} else{
-		fprintf(f, "dev %s port %s grp %s %s %s",
+		fprintf(f, "dev %s port %s grp %s %s%s",
 			ll_index_to_name(ifindex),
 			ll_index_to_name(e->ifindex),
 			inet_ntop(af, src, abuf, sizeof(abuf)),
 			(e->state & MDB_PERMANENT) ? "permanent" : "temp",
-			(e->flags & MDB_FLAGS_OFFLOAD) ? "offload" : "");
+			(e->flags & MDB_FLAGS_OFFLOAD) ? " offload" : "");
 	}
 	if (e->vid) {
 		if (jw_global)
-- 
2.14.3

Re: [iproute PATCH] bridge: Prevent a double space in bridge mdb show

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2018-02-23 16:15:08

On Mon, 19 Feb 2018 17:13:06 +0100
Timothy Redaelli [off-list ref] wrote:
Prevent a double space in "bridge mdb show" when the MDB entry is not
marked as "offload".

Signed-off-by: Timothy Redaelli <redacted>
Applied.

In iproute2-next printout has changed in this area, so this patch won't merge
to next. It looks like the json stuff might have introduced other spacing glitches though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help