From patchwork Mon Feb 19 16:13:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 875198 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zlTLn2DSHz9ryG for ; Tue, 20 Feb 2018 03:13:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752866AbeBSQNT (ORCPT ); Mon, 19 Feb 2018 11:13:19 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39118 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752670AbeBSQNP (ORCPT ); Mon, 19 Feb 2018 11:13:15 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6753D4023141; Mon, 19 Feb 2018 16:13:15 +0000 (UTC) Received: from graphite.redhat.com (unknown [10.40.205.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id C3E8E23167; Mon, 19 Feb 2018 16:13:14 +0000 (UTC) From: Timothy Redaelli To: Stephen Hemminger Cc: netdev@vger.kernel.org Subject: [iproute PATCH] bridge: Prevent a double space in bridge mdb show Date: Mon, 19 Feb 2018 17:13:06 +0100 Message-Id: <09c2d14a14282f74739012d70f4a1cf103bee2e3.1519054060.git.tredaelli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 19 Feb 2018 16:13:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 19 Feb 2018 16:13:15 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'tredaelli@redhat.com' RCPT:'' Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Prevent a double space in "bridge mdb show" when the MDB entry is not marked as "offload". Signed-off-by: Timothy Redaelli --- 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)