Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 811c8141 authored by Andrei Vagin's avatar Andrei Vagin Committed by Greg Kroah-Hartman
Browse files

sock_diag: fix autoloading of the raw_diag module



[ Upstream commit c34c1287778b080ed692c0a46a8e345206cc29e6 ]

IPPROTO_RAW isn't registred as an inet protocol, so
inet_protos[protocol] is always NULL for it.

Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Xin Long <lucien.xin@gmail.com>
Fixes: bf2ae2e4 ("sock_diag: request _diag module only when the family or proto has been registered")
Signed-off-by: default avatarAndrei Vagin <avagin@gmail.com>
Reviewed-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3c69a033
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3347,6 +3347,7 @@ int sock_load_diag_module(int family, int protocol)

#ifdef CONFIG_INET
	if (family == AF_INET &&
	    protocol != IPPROTO_RAW &&
	    !rcu_access_pointer(inet_protos[protocol]))
		return -ENOENT;
#endif