lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  1 Feb 2021 02:14:23 -0700
From:   Thayne McCombs <astrothayne@...il.com>
To:     netdev@...r.kernel.org, stephen@...workplumber.org,
        vadim4j@...il.com
Cc:     Thayne McCombs <astrothayne@...il.com>
Subject: [PATCH iproute2-next] 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@...il.com>
---
 man/man8/ss.8 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/man/man8/ss.8 b/man/man8/ss.8
index 3da279f9..3c4beede 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -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
-- 
2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ