Re: [PATCH bpf] netkit: Reject IFLA_NETKIT_PEER_INFO in netkit_change_link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/27/23 7:22 PM, Jakub Kicinski wrote:
On Mon, 27 Nov 2023 14:43:11 +0100 Daniel Borkmann wrote:
+	if (data[IFLA_NETKIT_PEER_INFO]) {
+		NL_SET_ERR_MSG_ATTR(extack, data[IFLA_NETKIT_PEER_INFO],
+				    "netkit peer info cannot be changed after device creation");
+		return -EACCES;
+	}

Why EACCES? It doesn't have much to do with permissions and all netlink
validation errors use EINVAL. IMO this is a basic case of "attribute
not defined in the policy", NLA_REJECT, so EINVAL..

Ok, sounds good, will use EINVAL instead in a v2.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux