Commit f42a4574 authored by Vadim Kochan's avatar Vadim Kochan Committed by Stephen Hemminger

ss: Filter inet dgram sockets with established state by default

As inet dgram sockets (udp, raw) can call connect(...)  - they
might be set in ESTABLISHED state. So keep the original behaviour of
'ss' which filtered them by ESTABLISHED state by default. So:

    $ ss -u

    or

    $ ss -w

Will show only ESTABLISHED UDP sockets by default.
Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
parent 1ff6b16e
......@@ -170,11 +170,11 @@ static const struct filter default_dbs[MAX_DB] = {
.families = (1 << AF_INET) | (1 << AF_INET6),
},
[UDP_DB] = {
.states = (1 << SS_CLOSE),
.states = (1 << SS_ESTABLISHED),
.families = (1 << AF_INET) | (1 << AF_INET6),
},
[RAW_DB] = {
.states = (1 << SS_CLOSE),
.states = (1 << SS_ESTABLISHED),
.families = (1 << AF_INET) | (1 << AF_INET6),
},
[UNIX_DG_DB] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment