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

Alexandra Winter
2024-02-15T14:14:34Z

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;