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 <tredaelli@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
8f0807023d
commit
7bdd623948
|
|
@ -166,12 +166,12 @@ static void print_mdb_entry(FILE *f, int ifindex, struct br_mdb_entry *e,
|
||||||
if (mdb_flags)
|
if (mdb_flags)
|
||||||
jsonw_end_array(jw_global);
|
jsonw_end_array(jw_global);
|
||||||
} else{
|
} 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(ifindex),
|
||||||
ll_index_to_name(e->ifindex),
|
ll_index_to_name(e->ifindex),
|
||||||
inet_ntop(af, src, abuf, sizeof(abuf)),
|
inet_ntop(af, src, abuf, sizeof(abuf)),
|
||||||
(e->state & MDB_PERMANENT) ? "permanent" : "temp",
|
(e->state & MDB_PERMANENT) ? "permanent" : "temp",
|
||||||
(e->flags & MDB_FLAGS_OFFLOAD) ? "offload" : "");
|
(e->flags & MDB_FLAGS_OFFLOAD) ? " offload" : "");
|
||||||
}
|
}
|
||||||
if (e->vid) {
|
if (e->vid) {
|
||||||
if (jw_global)
|
if (jw_global)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue