mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-04 16:16:39 +00:00
ss: Make sure scanned index value to unix_state_map is sane
Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
4cbf5224f2
commit
0aa03350c0
@ -3148,7 +3148,8 @@ static int unix_show(struct filter *f)
|
||||
|
||||
if (flags & (1 << 16)) {
|
||||
u->state = SS_LISTEN;
|
||||
} else {
|
||||
} else if (u->state > 0 &&
|
||||
u->state <= ARRAY_SIZE(unix_state_map)) {
|
||||
u->state = unix_state_map[u->state-1];
|
||||
if (u->type == SOCK_DGRAM && u->state == SS_CLOSE && u->rport)
|
||||
u->state = SS_ESTABLISHED;
|
||||
|
Loading…
Reference in New Issue
Block a user