Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ebtables-tiny: Fix lockfile function and reduce wait on lock #275

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Aug 4, 2024

  1. ebtables-tiny: fix lockfile function

    flock without LOCK_NB never returns on a conflicting lock, so this
    function doesn't conform to its comment.
    
    Also close the lock file on error, so we can keep retrying.
    
    Signed-off-by: Jan Luebbe <[email protected]>
    Jan Luebbe authored and SmithChart committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    92c53ac View commit details
    Browse the repository at this point in the history
  2. ebtables-tiny: reduce wait on missisng lock

    With the fix form Shoragan to actually wait if a lock-file is present,
    retries would only be done every second.
    But: Interacting with ebtables should not take that long.
    So we can drastically reduce the waiting time here.
    
    With this change will will only wait 50ms (instead of 1s).
    To not spam the log too much if a lock is kept for longer (or the other
    process has more luck locking) this change also reduces the logging
    rate.
    
    Signed-off-by: Chris Fiege <[email protected]>
    SmithChart committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    1242428 View commit details
    Browse the repository at this point in the history