netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ss: fix output of MD5 signature keys configured on TCP sockets
Date: Mon, 4 Mar 2024 08:25:03 -0800	[thread overview]
Message-ID: <20240304082503.5648447c@hermes.local> (raw)
In-Reply-To: <ZeHLFNX7f5x1M10/@grappa.linbit>

On Fri, 1 Mar 2024 13:33:24 +0100
Lars Ellenberg <lars.ellenberg@linbit.com> 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 <lars.ellenberg@linbit.com>
> ---

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.

  reply	other threads:[~2024-03-04 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 12:33 [PATCH] ss: fix output of MD5 signature keys configured on TCP sockets Lars Ellenberg
2024-03-04 16:25 ` Stephen Hemminger [this message]
2024-03-04 16:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240304082503.5648447c@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=lars.ellenberg@linbit.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).