Handle peer interface config change (#348)

Before this change, NetBird Agent wasn't handling
peer interface configuration changes dynamically.
Also, remote peer configuration changes have
not been applied (e.g. AllowedIPs changed).
Not a very common cause, but still it should be handled.
Now, Agent reacts to PeerConfig changes sent from the
management service and restarts remote connections
if AllowedIps have been changed.
This commit is contained in:
Misha Bragin
2022-06-04 19:41:01 +02:00
committed by GitHub
parent 60ac8c3268
commit e6e9f0322f
13 changed files with 278 additions and 83 deletions

View File

@@ -21,7 +21,7 @@ const (
type Config struct {
WgListenAddr string
RemoteKey string
WgInterface iface.WGIface
WgInterface *iface.WGIface
AllowedIps string
PreSharedKey *wgtypes.Key
}