[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1457367206.15205.30.camel@decadent.org.uk>
Date: Mon, 07 Mar 2016 16:13:26 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: David Decotigny <ddecotig@...il.com>, netdev@...r.kernel.org
Cc: Jeff Garzik <jgarzik@...ox.com>, David Miller <davem@...hat.com>,
Vidya Sagar Ravipati <vidya@...ulusnetworks.com>,
Joe Perches <joe@...ches.com>,
David Decotigny <decot@...glers.com>
Subject: Re: [ethtool PATCH v3 12/12] ethtool.c: use v6 socket when v4 is
not available
On Fri, 2016-03-04 at 16:42 -0800, David Decotigny wrote:
> 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);
> + }
Can this really happen on Linux? (AF_INET6 available but not AF_INET?)
Why not AF_UNIX? That's even more critical.
Ben.
> + if (ctx.fd < 0) {
> perror("Cannot get control socket");
> return 70;
> }
--
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists