mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2026-01-26 14:13:24 +00:00
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 <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
872148f54e
commit
92e9915c36
@ -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<<PACKET_R_DB)))
|
||||
if (type == SOCK_RAW && !(f->dbs & (1<<PACKET_R_DB)))
|
||||
return 0;
|
||||
if (stat.type == SOCK_DGRAM && !(f->dbs&(1<<PACKET_DG_DB)))
|
||||
if (type == SOCK_DGRAM && !(f->dbs & (1<<PACKET_DG_DB)))
|
||||
return 0;
|
||||
|
||||
stat.type = type;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user