Skip to contentSkip to conversation

iproute2: ss - change default filter to include all socket types

PATCH In review Petr Šabata 2 participants 2 messages Dec 11, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iproute2: ss - change default filter to include all socket types

Currently the default filter lists TCP sockets only which is rather confusing especially when the '-a/--all' flag is used. This patch changes the default to include all sockets, imitating netstat(8) behavior.

---
 misc/ss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
misc/ss.c +1 -1
index b45f5ba..b8cd60d 100644
@@ -105,7 +105,7 @@ struct filter
 };
 
 struct filter default_filter = {
-	.dbs	=  (1<<TCP_DB),
+	.dbs	=  ~0,
 	.states = SS_ALL & ~((1<<SS_LISTEN)|(1<<SS_CLOSE)|(1<<SS_TIME_WAIT)|(1<<SS_SYN_RECV)),
 	.families= (1<<AF_INET)|(1<<AF_INET6),
 };
Signature · 1 line
1.7.11.7