| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Netlink message type permission tables, for user generated messages. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Author: James Morris <jmorris@redhat.com> |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | #include <linux/types.h> |
|---|
| 13 | 10 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 83 | 80 | { RTM_NEWCHAIN, NETLINK_ROUTE_SOCKET__NLMSG_WRITE }, |
|---|
| 84 | 81 | { RTM_DELCHAIN, NETLINK_ROUTE_SOCKET__NLMSG_WRITE }, |
|---|
| 85 | 82 | { 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 }, |
|---|
| 86 | 91 | }; |
|---|
| 87 | 92 | |
|---|
| 88 | 93 | static const struct nlmsg_perm nlmsg_tcpdiag_perms[] = |
|---|
| .. | .. |
|---|
| 166 | 171 | * structures at the top of this file with the new mappings |
|---|
| 167 | 172 | * before updating the BUILD_BUG_ON() macro! |
|---|
| 168 | 173 | */ |
|---|
| 169 | | - BUILD_BUG_ON(RTM_MAX != (RTM_NEWCHAIN + 3)); |
|---|
| 174 | + BUILD_BUG_ON(RTM_MAX != (RTM_NEWVLAN + 3)); |
|---|
| 170 | 175 | err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms, |
|---|
| 171 | 176 | sizeof(nlmsg_route_perms)); |
|---|
| 172 | 177 | break; |
|---|