From: Phil Sutter Date: Tue, 22 Aug 2023 12:19:16 +0000 (+0200) Subject: ss: Fix socket type check in packet_show_line() X-Git-Tag: v6.5.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92e9915c36b7d4820f004fa74e0d93be99b8272a;p=thirdparty%2Fiproute2.git 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 --- 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<