]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: switchdev: fix return code of fdb_dump stub
authorDragos Tatulea <dragos@endocode.com>
Mon, 16 Nov 2015 09:52:48 +0000 (10:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 05:40:59 +0000 (21:40 -0800)
commit5eceaad8488b24f98ada6d5dfd5a6ec2df875d07
tree2a75d89e29086e66b9d02b5142f314d767984435
parent5c81f50e7fe60ed1d0820820df63f9193c6d5d0b
net: switchdev: fix return code of fdb_dump stub

[ Upstream commit 24cb7055a3066634a0f3fa0cd6a4780652905d35 ]

rtnl_fdb_dump always expects an index to be returned by the ndo_fdb_dump op,
but when CONFIG_NET_SWITCHDEV is off, it returns an error.

Fix that by returning the given unmodified idx.

A similar fix was 0890cf6cb6ab ("switchdev: fix return value of
switchdev_port_fdb_dump in case of error") but for the CONFIG_NET_SWITCHDEV=y
case.

Fixes: 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
Signed-off-by: Dragos Tatulea <dragos@endocode.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/switchdev.h