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: 98453b6580 ("ip/l2tp: add JSON support")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Andrea Claudi 2018-11-30 15:34:24 +01:00 committed by Stephen Hemminger
parent 3adcbf3757
commit b876b7e2b4
1 changed files with 3 additions and 2 deletions

View File

@ -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)