rtnetlink: return the correct error code
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Wed, 30 Nov 2016 08:37:34 +0000 (16:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2016 19:36:03 +0000 (14:36 -0500)
Before this patch, function ndo_dflt_fdb_dump() will always return code
from uc fdb dump. The reture code of mc fdb dump is lost.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index bd85570e6e4bb7cd64682ed7631b58a135032768..4cb84f0449a814ef1bda5e87b0499052bfdba940 100644 (file)
@@ -3177,7 +3177,7 @@ int ndo_dflt_fdb_dump(struct sk_buff *skb,
        err = nlmsg_populate_fdb(skb, cb, dev, idx, &dev->uc);
        if (err)
                goto out;
-       nlmsg_populate_fdb(skb, cb, dev, idx, &dev->mc);
+       err = nlmsg_populate_fdb(skb, cb, dev, idx, &dev->mc);
 out:
        netif_addr_unlock_bh(dev);
        return err;