Skip to content
  • Thomas Haller's avatar
    libnm: pass serialization flags to settings synth_func() · e8bf89a9
    Thomas Haller authored
    We will need access to the serialization flags from within the synth_func().
    
    That will be for WireGuard's peers. Peers are a list of complex, structured
    elements, and some fields (the peer's preshared-key) are secret and
    others are not. So when serializing the peers, we need to know whether
    to include secrets or not.
    
    Instead of letting _nm_setting_to_dbus() check the flags, pass them
    down.
    
    While at it, don't pass the property_name argument. Instead, pass the
    entire meta-data information we have. Most synth functions don't care
    about the property or the name either way. But we should not pre-filter
    information that we have at hand. Just pass it to the synth function.
    If the synth function would be public API, that would be a reason to be
    careful about what we pass. But it isn't and it only has one caller.
    So passing it along is fine. Also, do it now when adding the flags
    argument, as we touch all synth implementations anyway.
    e8bf89a9