]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: Add clarification about host conditions with multiple familes to man
authorThayne McCombs <astrothayne@gmail.com>
Tue, 2 Feb 2021 22:30:40 +0000 (14:30 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 2 Feb 2021 22:30:40 +0000 (14:30 -0800)
commit38957a2f6c3ec2f69c8c444c77c3cafc296e23f1
tree8885f0e727f578ca91569a55139aeb8440285676
parentdf361a27c26a85c38a5f98e765fb306191a2c1ba
ss: Add clarification about host conditions with multiple familes to man

In creating documentation for expressions I ran into an interesting case
where if you use two different familie types in the expression, such as
in `ss 'sport inet:ssh or src unix:/run/*'`, then you would only get the
results for one address family (in this case unix sockets).

The reason is that in parse_hostcond if the family is specified we
remove any previously added families from filter->families, and
preserve the "states" if any states are set. I tried changing this to
not reset the families, but ran into some issues with Invalid Argument
errors in inet_show_netlink, I think related to the state.

I can dig into that more if supporting this is useful, but I'm not sure
if these types of expressions would actually be useful in practice. Or
perhaps an error should be given if an expression contains conditions
with multiple families (besides inet and inet6)?

Anyway, for now, this patch just notes the limitation in the man page.

Signed-off-by: Thayne McCombs <astrothayne@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
man/man8/ss.8