Created
September 9, 2016 18:18
-
-
Save anonymous/a3e855fd8865334ded5322517c9a9dcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a620662fbb3891f705afcb1f13240197bc0457af Mon Sep 17 00:00:00 2001 | |
From: Cyrill Gorcunov <gorcunov@gmail.com> | |
Date: Thu, 8 Sep 2016 14:57:03 +0300 | |
Subject: [PATCH] ss: Add inet raw sockets information gathering via netlink | |
diag interface | |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |
--- | |
misc/ss.c | 4 ++++ | |
1 file changed, 4 insertions(+) | |
diff --git a/misc/ss.c b/misc/ss.c | |
index 3b268d9..66251d7 100644 | |
--- a/misc/ss.c | |
+++ b/misc/ss.c | |
@@ -2631,6 +2631,10 @@ static int raw_show(struct filter *f) | |
dg_proto = RAW_PROTO; | |
+ if (!getenv("PROC_NET_RAW") && !getenv("PROC_ROOT") && | |
+ inet_show_netlink(f, NULL, IPPROTO_RAW) == 0) | |
+ return 0; | |
+ | |
if (f->families&(1<<AF_INET)) { | |
if ((fp = net_raw_open()) == NULL) | |
goto outerr; | |
-- | |
2.7.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment