From: Timothy Redaelli Date: Mon, 19 Feb 2018 16:13:06 +0000 (+0100) Subject: bridge: Prevent a double space in bridge mdb show X-Git-Tag: v4.16.0~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bdd62394883a0c38489da105996c35c9bacf18d;p=thirdparty%2Fiproute2.git bridge: Prevent a double space in bridge mdb show Prevent a double space in "bridge mdb show" when the MDB entry is not marked as "offload". Signed-off-by: Timothy Redaelli Signed-off-by: Stephen Hemminger --- diff --git a/bridge/mdb.c b/bridge/mdb.c index 62dc8a0c5..58c20b82b 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)