Skip to content

Conversation

andrew-aladjev
Copy link

@andrew-aladjev andrew-aladjev commented Apr 23, 2024

Added global lock to linux wg quick, fixed race condition when 2 wg interfaces wanted to have the same table number.

If it will be accepted than the next step will be to separate adding default route and adding firewall rules.

What issue has been fixed:

  1. You are creating multiple wg interfaces and starting them in parallel.
  2. All wg interfaces is trying to use table number 51820.
  3. The first wg interface succeeds, other interfaces fail.

What is the problem in wg quick? It is not globaly locking calculation of next table number.
How to fix it? We need to add global flock.

@andrew-aladjev andrew-aladjev force-pushed the master branch 2 times, most recently from db2341a to 5050316 Compare April 23, 2024 08:38
…nterfaces wanted to have the same table number. 1. You are creating multiple wg interfaces and starting them in parallel. 2. All wg interfaces is trying to use table number 51820. 3. The first wg interface succeeds, other interfaces fail. What is the problem in wg quick? It is not globaly locking calculation of next table number. How to fix it? We need to add global flock.

Signed-off-by: Andrew Aladjev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant