Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Luigi Leonardi <leonardi@redhat.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 v2 1/2] ss: move lport and rport in struct sockstat from int to long
Date: Mon, 24 Aug 2026 21:16:45 -0700	[thread overview]
Message-ID: <20260824211628.41e464f5@phoenix.local> (raw)
In-Reply-To: <20260817-fix_vsock-v2-1-47e544221eae@redhat.com>

On Mon, 17 Aug 2026 14:54:20 +0200
Luigi Leonardi <leonardi@redhat.com> wrote:

> Commit 012cb515 ("ss: change aafilter port from int to long (inode
> support)") widened aafilter.port to long so that unix socket inode
> numbers larger than INT_MAX can be used as port filter values, but left
> sockstat.lport and sockstat.rport as int. This means large u32 values
> (e.g. vsock ports or unix inodes > INT_MAX) are truncated on the
> socket-stat side, making the comparison against aafilter.port always
> fail.
> 
> Widen lport and rport to long and update the sscanf format specifiers
> in proc_parse_inet_addr() and unix_show() accordingly.
> 
> Fixes: 012cb515 ("ss: change aafilter port from int to long (inode support)")
> Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
> Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
> ---

Applied to iproute2 but I had to fix the snprintf() warning and condense
the overly verbose AI slop of a commit message.

  reply	other threads:[~2026-08-25  4:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 12:54 [PATCH iproute2 v2 0/2] ss: fix vsock port filtering Luigi Leonardi
2026-08-17 12:54 ` [PATCH iproute2 v2 1/2] ss: move lport and rport in struct sockstat from int to long Luigi Leonardi
2026-08-25  4:16   ` Stephen Hemminger [this message]
2026-08-17 12:54 ` [PATCH iproute2 v2 2/2] ss: fix vsock port filter Luigi Leonardi
2026-08-25  4:10 ` [PATCH iproute2 v2 0/2] ss: fix vsock port filtering 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=20260824211628.41e464f5@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=leonardi@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    /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