]> git.proxmox.com Git - mirror_iproute2.git/commit
bridge/mdb: fix missing new line when show bridge mdb
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 12 Sep 2018 01:39:44 +0000 (09:39 +0800)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 13 Sep 2018 23:02:33 +0000 (16:02 -0700)
commit92bba4ed4016af3ce7f7071d3c37f2cb34f240f5
tree1afc28f638068b60ce341120752b6518c7b2378a
parentb914fe5f1c5d7beef742b565c98888c5e34efc02
bridge/mdb: fix missing new line when show bridge mdb

The bridge mdb show is broken on current iproute2. e.g.
]# bridge mdb show
34: br0  veth0_br  224.1.1.2  temp 34: br0  veth0_br  224.1.1.1  temp

After fix:
]# bridge mdb show
34: br0  veth0_br  224.1.1.2  temp
34: br0  veth0_br  224.1.1.1  temp

v2: Use json print lib as Stephen suggested.
v3: No need to use is_json_context() as print_string() could handle both cases.
v4: use new function print_nl() to print new line in non-json mode.

Reported-by: Ying Xu <yinxu@redhat.com>
Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
bridge/mdb.c