From 92e9915c36b7d4820f004fa74e0d93be99b8272a Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 22 Aug 2023 14:19:16 +0200 Subject: [PATCH] ss: Fix socket type check in packet_show_line() The field is accessed before being assigned a meaningful value, effectively disabling the checks. Fixes: 4a0053b606a34 ("ss: Unify packet stats output from netlink and proc") Signed-off-by: Phil Sutter Signed-off-by: Stephen Hemminger --- misc/ss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index c71b08f98..653b1512c 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -4535,9 +4535,9 @@ static int packet_show_line(char *buf, const struct filter *f, int fam) &type, &prot, &iface, &state, &rq, &uid, &ino); - if (stat.type == SOCK_RAW && !(f->dbs&(1<dbs & (1<dbs&(1<dbs & (1<