@@ -2801,6 +2801,9 @@ static int packet_show(struct filter *f)
int ino;
unsigned long long sk;
+ if (preferred_family != AF_PACKET && !(f->states & (1 << SS_CLOSE)))
+ return 0;
+
if (packet_show_netlink(f, NULL) == 0)
return 0;
@@ -3028,6 +3031,9 @@ static int netlink_show(struct filter *f)
int rq, wq, rc;
unsigned long long sk, cb;
+ if (preferred_family != AF_NETLINK && !(f->states & (1 << SS_CLOSE)))
+ return 0;
+
if (!getenv("PROC_NET_NETLINK") && !getenv("PROC_ROOT") &&
netlink_show_netlink(f, NULL) == 0)
return 0;