Re: [PATCH v2 net-next] net: Deprecate SO_DEBUG and reclaim SOCK_DBG bit.

Kuniyuki Iwashima
2024-02-15T19:39:52Z

From: Alexandra Winter <wintera@linux.ibm.com>
Date: Thu, 15 Feb 2024 15:14:21 +0100
> On 14.02.24 20:54, Kuniyuki Iwashima wrote:
> > + case SO_DEBUG:
> > + /* deprecated, but kept for compatibility */
> > + if (val && !sockopt_capable(CAP_NET_ADMIN))
> > + ret = -EACCES;
> > + return 0;
>
> Setting ret has no effect here. Maybe you mean something like:
> > + if (val && !sockopt_capable(CAP_NET_ADMIN))
> > + return -EACCES;
> > + return 0;
>
> or
>
> return (val && !sockopt_capable(CAP_NET_ADMIN)) ? -EACCESS : 0;

oops, thanks for catching!
will fix in v3.