]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
l2tp: Fix printing of cookie and peer_cookie values
authorAndrea Claudi <aclaudi@redhat.com>
Fri, 30 Nov 2018 14:34:24 +0000 (15:34 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 3 Dec 2018 22:35:58 +0000 (14:35 -0800)
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 <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipl2tp.c

index 4308b591196505e74424a2f3e254fe65a46fce34..f699b258a3f09b076c69254dc52fb042bb636200 100644 (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)