Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Gopal Malaviya <gopalmalaviya53@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC iproute2-next] ss: remove /proc fallback paths
Date: Mon, 19 Oct 2026 09:48:08 -0700	[thread overview]
Message-ID: <20261019094808.1aebae96@phoenix.local> (raw)
In-Reply-To: <20261018200712.389-1-gopalmalaviya53@gmail.com>

On Sun, 18 Oct 2026 20:07:12 +0000
Gopal Malaviya <gopalmalaviya53@gmail.com> wrote:

> On Tue, 1 Sep 2026 14:38 UTC, Stephen Hemminger wrote:
> > This patch removes the old /proc/net fallback code in ss command.
> > The sock_diag netlink interfaces were all in 3.10, over 13 years ago.
> > No longer need to carry all the additional text parsing code.  
> 
> I tested this on top of iproute2-next (204a7210). It builds with no new
> warnings, testsuite/tests/ss/ssfilter.t passes, and on a WSL2 6.18
> kernel the output of ss -tan, -uan, -xan, -s and -tanpie is identical
> with and without the patch (ss -a -A netlink too, apart from the line
> for ss's own netlink socket).
> 
> One concern: the diag interfaces are in the kernel, but each one is a
> separate Kconfig option. INET_DIAG defaults to y, while UNIX_DIAG,
> PACKET_DIAG, NETLINK_DIAG, INET_UDP_DIAG and INET_RAW_DIAG are all
> "default n", and common configs leave some of them off:
> x86_64_defconfig has "# CONFIG_INET_DIAG is not set", arm64 defconfig
> sets none of the five, and Android's gki_defconfig enables only
> INET_UDP_DIAG among them.
> 
> When the interface for a socket type is missing, ss currently falls
> back to /proc/net/*. With this patch it prints only the header and
> exits 0, so those sockets silently disappear. I reproduced this for
> raw, unix and packet sockets (ss_before/ss_after are ss built
> without/with this patch). Raw sockets, on a kernel without
> INET_RAW_DIAG (the stock WSL2 kernel), with one ICMP and one ICMPv6 raw
> socket open:


I am ok with forcing use of inet_diag for this.
If users turn it off, like Android, they are in embedded envrionments
where ss doesn't make lot of sense.

      reply	other threads:[~2026-10-19 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 14:38 [RFC iproute2-next] ss: remove /proc fallback paths Stephen Hemminger
2026-10-18 20:07 ` Gopal Malaviya
2026-10-19 16:48   ` Stephen Hemminger [this message]

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=20261019094808.1aebae96@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=gopalmalaviya53@gmail.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