]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: reject unrecognized request flags
authorMichal Kubecek <mkubecek@suse.cz>
Sun, 15 Mar 2020 17:17:53 +0000 (18:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2020 09:04:24 +0000 (02:04 -0700)
commit0f4496ebc798fd01a3547b9f7f1f833267a612e3
tree50e6db43a35ff0a60dd39dda32e9d2a594502bb8
parentb627a30c6d6e8c26d81f601a7fcb58b7996b787c
ethtool: reject unrecognized request flags

As pointed out by Jakub Kicinski, we ethtool netlink code should respond
with an error if request head has flags set which are not recognized by
kernel, either as a mistake or because it expects functionality introduced
in later kernel versions.

To avoid unnecessary roundtrips, use extack cookie to provide the
information about supported request flags.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/netlink.c