| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * VLAN netlink control interface |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 35 | 32 | { |
|---|
| 36 | 33 | if (!attr) |
|---|
| 37 | 34 | 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); |
|---|
| 40 | 37 | } |
|---|
| 41 | 38 | |
|---|
| 42 | 39 | static int vlan_validate(struct nlattr *tb[], struct nlattr *data[], |
|---|
| .. | .. |
|---|
| 84 | 81 | flags = nla_data(data[IFLA_VLAN_FLAGS]); |
|---|
| 85 | 82 | if ((flags->flags & flags->mask) & |
|---|
| 86 | 83 | ~(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)) { |
|---|
| 88 | 86 | NL_SET_ERR_MSG_MOD(extack, "Invalid VLAN flags"); |
|---|
| 89 | 87 | return -EINVAL; |
|---|
| 90 | 88 | } |
|---|
| .. | .. |
|---|
| 231 | 229 | goto nla_put_failure; |
|---|
| 232 | 230 | } |
|---|
| 233 | 231 | 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); |
|---|
| 235 | 233 | if (nest == NULL) |
|---|
| 236 | 234 | goto nla_put_failure; |
|---|
| 237 | 235 | |
|---|
| .. | .. |
|---|
| 249 | 247 | } |
|---|
| 250 | 248 | |
|---|
| 251 | 249 | 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); |
|---|
| 253 | 251 | if (nest == NULL) |
|---|
| 254 | 252 | goto nla_put_failure; |
|---|
| 255 | 253 | |
|---|