@@ -511,7 +511,9 @@ The general host syntax is [FAMILY:]ADDRESS[:PORT].
.P
FAMILY must be one of the families supported by the -f option. If not given
it defaults to the family given with the -f option, and if that is also
-missing, will assume either inet or inet6.
+missing, will assume either inet or inet6. Note that all host conditions in the
+expression should either all be the same family or be only inet and inet6. If there
+is some other mixture of families, the results will probably be unexpected.
.P
The form of ADDRESS and PORT depends on the family used. "*" can be used as
a wildcord for either the address or port. The details for each family are as
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> --- man/man8/ss.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)