-
Notifications
You must be signed in to change notification settings - Fork 72
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
Update routing table in more scenarios #73
Conversation
4cfbcaf
to
c5cefca
Compare
@FossoresLP At this point, the routing table will match the state of the configuration. Currently, when the WireGuard interface is disabled, running Should the peers be deleted from WireGuard when the interface is disabled in the configuration? |
I'm not quite sure what would be the better approach. |
With the changes in this PR, when the WireGuard interface is disabled, the routes are removed. The IP address that is assigned to the interface is still configured. The script that updates the routes checks the list of allowed-ips from the output of With the template rewrite, I tried to keep the same logic the was created before. If we need to redefine the logic, we should probably workshop some workflows to ensure the logic makes sense and the code functions as desired. |
I asked just out of curiosity, since this was requested before. This PR looks good the way it is for now. I'll merge it before the next release, but I don't think it's necessary to release it standalone since this is not a serious bug. |
With the current release, if you disable the WireGuard interface, the routes are removed (by the kernel). When you reenable the interface the routes will not update. I believe this is a bug that may not have been discovered. |
Ok, then I suppose a new release would be warranted. I'll get this PR merged and released in the next couple of days then. |
Nothing was happening when a peer was disabled. This PR will make sure the peer is removed from WireGuard and the routing table is updated when a peer is disabled.