hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/net/8021q/vlan_netlink.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * VLAN netlink control interface
34 *
45 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * version 2 as published by the Free Software Foundation.
96 */
107
118 #include <linux/kernel.h>
....@@ -35,8 +32,8 @@
3532 {
3633 if (!attr)
3734 return 0;
38
- return nla_validate_nested(attr, IFLA_VLAN_QOS_MAX, vlan_map_policy,
39
- NULL);
35
+ return nla_validate_nested_deprecated(attr, IFLA_VLAN_QOS_MAX,
36
+ vlan_map_policy, NULL);
4037 }
4138
4239 static int vlan_validate(struct nlattr *tb[], struct nlattr *data[],
....@@ -84,7 +81,8 @@
8481 flags = nla_data(data[IFLA_VLAN_FLAGS]);
8582 if ((flags->flags & flags->mask) &
8683 ~(VLAN_FLAG_REORDER_HDR | VLAN_FLAG_GVRP |
87
- VLAN_FLAG_LOOSE_BINDING | VLAN_FLAG_MVRP)) {
84
+ VLAN_FLAG_LOOSE_BINDING | VLAN_FLAG_MVRP |
85
+ VLAN_FLAG_BRIDGE_BINDING)) {
8886 NL_SET_ERR_MSG_MOD(extack, "Invalid VLAN flags");
8987 return -EINVAL;
9088 }
....@@ -231,7 +229,7 @@
231229 goto nla_put_failure;
232230 }
233231 if (vlan->nr_ingress_mappings) {
234
- nest = nla_nest_start(skb, IFLA_VLAN_INGRESS_QOS);
232
+ nest = nla_nest_start_noflag(skb, IFLA_VLAN_INGRESS_QOS);
235233 if (nest == NULL)
236234 goto nla_put_failure;
237235
....@@ -249,7 +247,7 @@
249247 }
250248
251249 if (vlan->nr_egress_mappings) {
252
- nest = nla_nest_start(skb, IFLA_VLAN_EGRESS_QOS);
250
+ nest = nla_nest_start_noflag(skb, IFLA_VLAN_EGRESS_QOS);
253251 if (nest == NULL)
254252 goto nla_put_failure;
255253