dhcp: track dhcp-client instances with CList instead of hash-table
NMDhcpManager used a hash table to keep track of the dhcp client instances. It never actually did a lookup of the client, the only place where we search for an existing NMDhcpClient instance is get_client_for_ifindex(), which just iterated over all clients. Use a CList instead. The only thing that one might consider a downside is that now NMDhcpClient is aware of whether it is part of a list. Previously, one could theoretically track a NMDhcpClient instance in multiple NMDhcpManager instances. But that doesn't make sense, because NMDhcpManager is a singleton. Even if we would have mulitple NMDhcpManager instances, one client would still only be tracked by one manager. This tighter coupling of NMDhcpClient and NMDhcpManager isn't a problem.
Showing with 34 additions and 45 deletions