From: Andrea Claudi Date: Fri, 30 Nov 2018 14:34:24 +0000 (+0100) Subject: l2tp: Fix printing of cookie and peer_cookie values X-Git-Tag: v4.20.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b876b7e2b492fa14ce1f3db6c18bf22b2df10132;p=thirdparty%2Fiproute2.git l2tp: Fix printing of cookie and peer_cookie values 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 Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c index 4308b5911..f699b258a 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)