Thread (24 messages) 24 messages, 2 authors, 2016-03-07
STALE3858d

Revision v3 of 2 in this series.

Revisions (2)
  1. v2 [diff vs current]
  2. v3 current

[ethtool PATCH v3 12/12] ethtool.c: use v6 socket when v4 is not available

From: David Decotigny <hidden>
Date: 2016-03-05 00:42:38
Subsystem: the rest · Maintainer: Linus Torvalds

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 e1acf09..4daf538 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -4618,6 +4618,9 @@ opt_found:
 		/* Open control socket. */
 		ctx.fd = socket(AF_INET, SOCK_DGRAM, 0);
 		if (ctx.fd < 0) {
+			ctx.fd = socket(AF_INET6, SOCK_DGRAM, 0);
+		}
+		if (ctx.fd < 0) {
 			perror("Cannot get control socket");
 			return 70;
 		}
-- 
2.7.0.rc3.207.g0ac5344
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help