Skip to content
  • Thomas Haller's avatar
    device: don't clone NMPlatformIP6Address for dad6_failed_addrs · 95c94ff0
    Thomas Haller authored
    NMPObjects are never modified after being put into the cache.
    Hence, it is safe and encouraged to just keep a reference to them,
    instead of cloning them.
    
    Interestingly, NMPlatform's change signals have a platform_object
    pointer, which is not the pointer to the NMPObjects itself, but
    down-cast to the NMPlatformObject instance. It does so, because commonly
    callers want to have a pointer to the NMPlatformObject instance, instead
    of the outer NMPObjects. However, NMP_OBJECT_UP_CAST() is guaranteed
    to work one would expect.
    95c94ff0