diff options
author | John Fastabend <john.fastabend@gmail.com> | 2013-03-29 04:18:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-29 15:26:27 -0400 |
commit | 91f3e7b17412d42e933949a9c297072b13a04d41 (patch) | |
tree | 36a6d964325d02fea88be8b5a2a6ac69f904eb2e /net/core | |
parent | 54a5d3828995c0df4f8e12a5d91b1c42f0f323d6 (diff) |
net: rtnetlink: fdb dflt dump must set idx used for cb->arg[0]
In rtnl_fdb_dump() when the fdb_dump ndo op is not populated
we never set the idx value so that cb->arg[0] is always 0.
Resulting in a endless loop of messages.
Introduced with this commit,
commit 090096bf3db1c281ddd034573260045888a68fea
Author: Vlad Yasevich <vyasevic@redhat.com>
Date: Wed Mar 6 15:39:42 2013 +0000
net: generic fdb support for drivers without ndo_fdb_<op>
CC: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 6fdfac8978f2..d2322d7f0f7b 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -2262,7 +2262,7 @@ skip: | |||
2262 | * @dev: netdevice | 2262 | * @dev: netdevice |
2263 | * | 2263 | * |
2264 | * Default netdevice operation to dump the existing unicast address list. | 2264 | * Default netdevice operation to dump the existing unicast address list. |
2265 | * Returns zero on success. | 2265 | * Returns number of addresses from list put in skb. |
2266 | */ | 2266 | */ |
2267 | int ndo_dflt_fdb_dump(struct sk_buff *skb, | 2267 | int ndo_dflt_fdb_dump(struct sk_buff *skb, |
2268 | struct netlink_callback *cb, | 2268 | struct netlink_callback *cb, |
@@ -2303,7 +2303,7 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
2303 | if (dev->netdev_ops->ndo_fdb_dump) | 2303 | if (dev->netdev_ops->ndo_fdb_dump) |
2304 | idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, dev, idx); | 2304 | idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, dev, idx); |
2305 | else | 2305 | else |
2306 | ndo_dflt_fdb_dump(skb, cb, dev, idx); | 2306 | idx = ndo_dflt_fdb_dump(skb, cb, dev, idx); |
2307 | } | 2307 | } |
2308 | rcu_read_unlock(); | 2308 | rcu_read_unlock(); |
2309 | 2309 | ||