diff options
author | Dragos Tatulea <dragos@endocode.com> | 2015-11-16 10:52:48 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-14 21:25:36 -0800 |
commit | 8f1a7ed477827f6a91c2d0115a8281298d6c5294 (patch) | |
tree | e60fc9de786a418e9ea455e4324c0dbd43a85e45 | |
parent | e85d35081dcb91cf6334df575694362fc4197617 (diff) |
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>
-rw-r--r-- | include/net/switchdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h index d5671f118bfc..0b9197975603 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -268,7 +268,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb, struct net_device *filter_dev, int idx) { - return -EOPNOTSUPP; + return idx; } #endif |