[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C2A454FDE6C23F41BD5011E2458C46C9F30B29B5@ALA-MBD.corp.ad.wrs.com>
Date: Wed, 24 Apr 2019 03:02:11 +0000
From: "Bai, Haiqing" <Haiqing.Bai@...driver.com>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Elmahrad, Abdelghani" <Abdel.Elmahrad@...driver.com>
Subject: RE: [PATCH] net: socket: Exit earlier from __sock_create if
CONFIG_IPV6 is disabled
Actually I know this clearly, just bring your attention on this issue , I think this is a mechanism issue.
Though we have no good idea to fix this, but I believe firmly that you kernel experts must have some smart and beautiful solution.
Thanks.
-----Original Message-----
From: David Miller [mailto:davem@...emloft.net]
Sent: 2019年4月24日 9:43
To: Bai, Haiqing
Cc: netdev@...r.kernel.org; Elmahrad, Abdelghani
Subject: Re: [PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled
From: Haiqing Bai <Haiqing.Bai@...driver.com>
Date: Tue, 23 Apr 2019 17:00:23 +0800
> diff --git a/net/socket.c b/net/socket.c
> index 8255f5bda0aa..7927c2bcad65 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -1339,6 +1339,11 @@ int __sock_create(struct net *net, int family, int type, int protocol,
> if (type < 0 || type >= SOCK_MAX)
> return -EINVAL;
>
> +#if !(IS_ENABLED(CONFIG_IPV6))
> + if (family == AF_INET6)
> + return -EAFNOSUPPORT;
> +#endif
There is no way I am allowing this kind of layering violation. It's
just rediculous.
Powered by blists - more mailing lists