Thread (21 messages) 21 messages, 3 authors, 2016-03-15

Re: [ethtool PATCH v4 11/11] ethtool.c: support absence of v4 sockets

flat view

From: Ben Hutchings <hidden>
Date: 2016-03-13 17:24:23

On Fri, 2016-03-11 at 09:58 -0800, David Decotigny wrote:
quoted hunk ↗ jump to hunk
From: David Decotigny <redacted>


Signed-off-by: David Decotigny <redacted>
---
 ethtool.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/ethtool.c b/ethtool.c
index 761252f..f9336e3 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -4615,6 +4615,9 @@ opt_found:
 		/* Open control socket. */
 		ctx.fd = socket(AF_INET, SOCK_DGRAM, 0);
 		if (ctx.fd < 0) {
+			ctx.fd = socket(AF_UNIX, SOCK_DGRAM, 0);
+		}
You still haven't answered whether this is a real problem on Linux.

Ben.
+		if (ctx.fd < 0) {
 			perror("Cannot get control socket");
 			return 70;
 		}
-- 
Ben Hutchings
If at first you don't succeed, you're doing about average.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help