From patchwork Fri Nov 30 14:34:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Claudi X-Patchwork-Id: 1005971 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 435xlc1CC4z9s9J for ; Sat, 1 Dec 2018 01:36:12 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726900AbeLABpk (ORCPT ); Fri, 30 Nov 2018 20:45:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45088 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726528AbeLABpk (ORCPT ); Fri, 30 Nov 2018 20:45:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ABAC8307D90E; Fri, 30 Nov 2018 14:36:09 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.32.181.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id D50A068706; Fri, 30 Nov 2018 14:36:08 +0000 (UTC) From: Andrea Claudi To: dsahern@gmail.com, stephen@networkplumber.org Cc: netdev@vger.kernel.org Subject: [PATCH iproute2] l2tp: Fix printing of cookie and peer_cookie values Date: Fri, 30 Nov 2018 15:34:24 +0100 Message-Id: <000a6802b08986b9e056a8f66784eadf7226eed5.1543588086.git.aclaudi@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 30 Nov 2018 14:36:09 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org print_cookie() invocations miss %s format specifier. While at it, align printout to the previous lines. Fixes: 98453b65800f7 ("ip/l2tp: add JSON support") Signed-off-by: Andrea Claudi --- ip/ipl2tp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c index 4308b591..f699b258 100644 --- a/ip/ipl2tp.c +++ b/ip/ipl2tp.c @@ -302,10 +302,11 @@ static void print_session(struct l2tp_data *data) print_uint(PRINT_FP, "peer_offset", " peer offset %u\n", 0); if (p->cookie_len > 0) - print_cookie("cookie", "cookie", + print_cookie("cookie", " cookie %s", p->cookie, p->cookie_len); + if (p->peer_cookie_len > 0) - print_cookie("peer_cookie", "peer cookie", + print_cookie("peer_cookie", " peer cookie %s", p->peer_cookie, p->peer_cookie_len); if (p->reorder_timeout != 0)