Subject: Re: [PATCH] ss: fix output of MD5 signature keys configured on TCP sockets

From: Stephen Hemminger <[email-masked]>
Date: Mon, 4 Mar 2024 08:25:03 -0800

On Fri, 1 Mar 2024 13:33:24 +0100
Lars Ellenberg <[email-masked]> wrote:

> da9cc6ab introduced printing of MD5 signature keys when found.
> But when changing printf() to out() calls with 90351722,
> the implicit printf call in print_escape_buf() was overlooked.
> That results in a funny output in the first line:
> "<all-your-tcp-signature-keys-concatenated>State"
> and ambiguity as to which of those bytes belong to which socket.
> 
> Add a static void out_escape_buf() immediately before we use it.
> 
> da9cc6ab (ss: print MD5 signature keys configured on TCP sockets, 2017-10-06)
> 90351722 (ss: Replace printf() calls for "main" output by calls to helper, 2017-12-12)
> 
> Signed-off-by: Lars Ellenberg <[email-masked]>
> ---

Wonder if the out() method was really good idea in the first place.
Would have been easier to use openstream to redirect stdio buffer and count
bytes on the other side.

But will merge this. Eventually, ss needs a bit overhaul/rewrite to be not
one monolithic program and handle json.