Skip to content
  • David Jaša's avatar
    nmci, steps: support backup and cleanup of sysctls · 3205c533
    David Jaša authored and Filip Pokryvka's avatar Filip Pokryvka committed
    MPTCP support: steps and cleanup
    
    MPTCP in NM depends on respective sysctl settings. Therefore
    infrastructure is added that allows to save all sysctls matching a given
    pattern, pattern specified as:
    
        nmci.cleanup.cleanup_add_sysctls(PATTERN)
    
    is passed verbatim to:
    
        sysctl -a --pattern PATTERN
    
    Sysctl infrastructure may also be used to tweak some sysctl in a step
    and having it automatically reverted during cleanup:
    
        * Set sysctl "my.key" to value "My value"
    
    Sysctl clean-up is on purpose implemented in a naïve way when repeated
    setting of the same sysctl will create respective number of cleanup
    actions of which only last one is required. The unique_tag looks to do exact
    opposite of what we need here and neat solution is out-of-scope of this
    MR.
    3205c533