[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1457065405-19049-13-git-send-email-ddecotig@gmail.com>
Date: Thu, 3 Mar 2016 20:23:25 -0800
From: David Decotigny <ddecotig@...il.com>
To: netdev@...r.kernel.org
Cc: Jeff Garzik <jgarzik@...ox.com>,
Ben Hutchings <ben@...adent.org.uk>,
David Miller <davem@...hat.com>,
Vidya Sagar Ravipati <vidya@...ulusnetworks.com>,
David Decotigny <decot@...glers.com>
Subject: [ethtool PATCH v2 12/12] ethtool.c: use v6 socket when v4 is not available
From: David Decotigny <decot@...glers.com>
Signed-off-by: David Decotigny <decot@...glers.com>
---
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
Powered by blists - more mailing lists