33 lines
910 B
Diff
33 lines
910 B
Diff
--- misc/ss.c 2009-02-19 13:55:43.000000000 +0100
|
|
+++ misc/ss.c 2009-02-19 13:58:07.000000000 +0100
|
|
@@ -1509,6 +1509,7 @@
|
|
h = (struct nlmsghdr*)buf;
|
|
while (NLMSG_OK(h, status)) {
|
|
int err;
|
|
+ struct inet_diag_msg *r = NLMSG_DATA(h);
|
|
|
|
if (/*h->nlmsg_pid != rth->local.nl_pid ||*/
|
|
h->nlmsg_seq != 123456)
|
|
@@ -1527,6 +1528,10 @@
|
|
return 0;
|
|
}
|
|
if (!dump_fp) {
|
|
+ if (!(f->families & (1<<r->idiag_family))) {
|
|
+ h = NLMSG_NEXT(h, status);
|
|
+ continue;
|
|
+ }
|
|
err = tcp_show_sock(h, NULL);
|
|
if (err < 0)
|
|
return err;
|
|
@@ -2634,9 +2639,7 @@
|
|
int mask2;
|
|
if (preferred_family == AF_INET ||
|
|
preferred_family == AF_INET6) {
|
|
- mask2= (1<<TCP_DB);
|
|
- if (!do_default)
|
|
- mask2 = (1<<UDP_DB)|(1<<RAW_DB);
|
|
+ mask2= current_filter.dbs;
|
|
} else if (preferred_family == AF_PACKET) {
|
|
mask2 = PACKET_DBM;
|
|
} else if (preferred_family == AF_UNIX) {
|