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]
Message-Id: <20180324181811.22615-4-phil@nwl.cc>
Date:   Sat, 24 Mar 2018 19:18:11 +0100
From:   Phil Sutter <phil@....cc>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: [iproute PATCH 3/3] ss: Drop filter_default_dbs()

Instead call filter_db_parse(..., "all"). This eliminates the duplicate
default DB definition.

Signed-off-by: Phil Sutter <phil@....cc>
---
 misc/ss.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/misc/ss.c b/misc/ss.c
index e6511014ba3f4..ab2f07b9e5d4d 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -408,23 +408,6 @@ static int filter_af_get(struct filter *f, int af)
 	return !!(f->families & FAMILY_MASK(af));
 }
 
-static void filter_default_dbs(struct filter *f, bool enable)
-{
-	filter_db_set(f, UDP_DB, enable);
-	filter_db_set(f, DCCP_DB, enable);
-	filter_db_set(f, TCP_DB, enable);
-	filter_db_set(f, RAW_DB, enable);
-	filter_db_set(f, UNIX_ST_DB, enable);
-	filter_db_set(f, UNIX_DG_DB, enable);
-	filter_db_set(f, UNIX_SQ_DB, enable);
-	filter_db_set(f, PACKET_R_DB, enable);
-	filter_db_set(f, PACKET_DG_DB, enable);
-	filter_db_set(f, NETLINK_DB, enable);
-	filter_db_set(f, SCTP_DB, enable);
-	filter_db_set(f, VSOCK_ST_DB, enable);
-	filter_db_set(f, VSOCK_DG_DB, enable);
-}
-
 static void filter_states_set(struct filter *f, int states)
 {
 	if (states)
@@ -4906,7 +4889,7 @@ int main(int argc, char *argv[])
 
 	if (do_default) {
 		state_filter = state_filter ? state_filter : SS_CONN;
-		filter_default_dbs(&current_filter, true);
+		filter_db_parse(&current_filter, "all");
 	}
 
 	filter_states_set(&current_filter, state_filter);
-- 
2.16.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ