Skip to content
  • Thomas Haller's avatar
    dhcp: don't pass duid to client ip6_start() and stop() · 7d55b134
    Thomas Haller authored
    We don't do that for ip4_start() either. The duid/client-id
    is stored inside the NMDhcpClient instance, and the function can
    access it from there.
    
    Maybe, it is often preferable to have stateless objects and not
    relying on ip4_start() to obtain the client ID from the client's
    state. However, the purpose of the NMDhcpClient object is to
    hold state about DHCP. To simplify the complexity of objects that
    inherrently have state, we should be careful about mutating the state.
    It adds little additional complexity of only reading the state when
    needed anyway. In fact, it adds complexity, because previously
    it wasn't enough to check all callers of nm_dhcp_client_get_client_id()
    to see where the client-id is used. Instead, one would also need to
    follow the @duid argument several layers of the call stack.
    7d55b134