diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 1438a1d..ce66270 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -447,6 +447,11 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol, if (protocol < 0 || protocol >= MAX_LINKS) return -EPROTONOSUPPORT; +#ifndef CONFIG_AUDIT + if (protocol == NETLINK_AUDIT) + return -EPROTONOSUPPORT; +#endif + netlink_lock_table(); #ifdef CONFIG_MODULES if (!nl_table[protocol].registered) {