iftable: fix incomplete list of interfaces via nlif_query

RTM_GETLINK with NLM_F_DUMP returns a multi-part netlink message.
The existing code only handled the first message of it, thus,
ignoring the remaining interfaces.

This is the cause of the following bug in conntrackd:

[Thu Aug  9 14:14:23 2012] (pid=3819) [notice] -- starting in daemon mode --
[Thu Aug  9 14:14:23 2012] (pid=3819) [ERROR] no dedicated links available!
[Thu Aug  9 14:14:23 2012] (pid=3819) [ERROR] no dedicated links available!
[Thu Aug  9 14:14:23 2012] (pid=3819) [ERROR] no dedicated links available!
[Thu Aug  9 14:19:54 2012] (pid=3819) [notice] ---- shutdown received ----

Thanks to Jan Engelhardt for providing useful pointer to address the
problem.

Reported-by: Arturo Borrero <aborrero@cica.es>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
3 files changed