Commit 91f3e7b1 authored by John Fastabend's avatar John Fastabend Committed by David S. Miller

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 090096bf
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: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 54a5d382
...@@ -2262,7 +2262,7 @@ static int nlmsg_populate_fdb(struct sk_buff *skb, ...@@ -2262,7 +2262,7 @@ static int nlmsg_populate_fdb(struct sk_buff *skb,
* @dev: netdevice * @dev: netdevice
* *
* Default netdevice operation to dump the existing unicast address list. * Default netdevice operation to dump the existing unicast address list.
* Returns zero on success. * Returns number of addresses from list put in skb.
*/ */
int ndo_dflt_fdb_dump(struct sk_buff *skb, int ndo_dflt_fdb_dump(struct sk_buff *skb,
struct netlink_callback *cb, struct netlink_callback *cb,
...@@ -2303,7 +2303,7 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -2303,7 +2303,7 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
if (dev->netdev_ops->ndo_fdb_dump) if (dev->netdev_ops->ndo_fdb_dump)
idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, dev, idx); idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, dev, idx);
else else
ndo_dflt_fdb_dump(skb, cb, dev, idx); idx = ndo_dflt_fdb_dump(skb, cb, dev, idx);
} }
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment