Modified do_get_nl_link to potentially process multiple netlink dump replies.
Modified do_get_nl_link to potentially process multiple netlink dump replies.

Prior to this commit, do_get_nl_link assumed there would only be a single
reply for a dump request. On my system with multiple can interfaces, this
would cause only half of them to be listed in the dump reply. This change
checks for NLMSG_DONE dump terminator and stops receiving messages once
received.

Signed-off-by: Andrew Beard <9a77c4c52f7ab69a3d8ac15dd166263e178346d8@ovro.caltech.edu>
[mkl: fix indention, move variable init out of loop]
Signed-off-by: Marc Kleine-Budde <4a0ea1158d3cc63151119c05b1bff00c0bdbf421@pengutronix.de>

lalten/libsocketcan,lalten/libsocketcan,lalten/libsocketcan