hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/security/selinux/nlmsgtab.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Netlink message type permission tables, for user generated messages.
34 *
45 * Author: James Morris <jmorris@redhat.com>
56 *
67 * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2,
10
- * as published by the Free Software Foundation.
118 */
129 #include <linux/types.h>
1310 #include <linux/kernel.h>
....@@ -83,6 +80,14 @@
8380 { RTM_NEWCHAIN, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
8481 { RTM_DELCHAIN, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
8582 { RTM_GETCHAIN, NETLINK_ROUTE_SOCKET__NLMSG_READ },
83
+ { RTM_NEWNEXTHOP, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
84
+ { RTM_DELNEXTHOP, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
85
+ { RTM_GETNEXTHOP, NETLINK_ROUTE_SOCKET__NLMSG_READ },
86
+ { RTM_NEWLINKPROP, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
87
+ { RTM_DELLINKPROP, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
88
+ { RTM_NEWVLAN, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
89
+ { RTM_DELVLAN, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
90
+ { RTM_GETVLAN, NETLINK_ROUTE_SOCKET__NLMSG_READ },
8691 };
8792
8893 static const struct nlmsg_perm nlmsg_tcpdiag_perms[] =
....@@ -166,7 +171,7 @@
166171 * structures at the top of this file with the new mappings
167172 * before updating the BUILD_BUG_ON() macro!
168173 */
169
- BUILD_BUG_ON(RTM_MAX != (RTM_NEWCHAIN + 3));
174
+ BUILD_BUG_ON(RTM_MAX != (RTM_NEWVLAN + 3));
170175 err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms,
171176 sizeof(nlmsg_route_perms));
172177 break;