ss: Support displaying and filtering on socket marks.

This allows the user to dump sockets with a given mark (via
"fwmark = 0x1234/0x1234" or "fwmark = 12345", etc.) , and to
display the socket marks of dumped sockets.

The relevant kernel commits are: d545caca827b ("net: inet: diag:
expose the socket mark to privileged processes.") and
- a52e95abf772 ("net: diag: allow socket bytecode filters to
match socket marks")

Signed-off-by: Lorenzo Colitti <>

[Backport of net-next ec75249b141e99b978e6494345d468595f5b829f]

Bug: 23113288
Change-Id: If4beb143fdb1f841c6f11e1a70a7f3dc25df1c96
4 files changed