config: rewrite config sub-package and add more tests

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2022-05-04 13:54:06 +02:00
parent 70a9195654
commit 46391bb75c
6 changed files with 288 additions and 246 deletions

View File

@@ -193,7 +193,7 @@ func (d *Daemon) SyncAllInterfaces() error {
keepInterfaces := intf.InterfaceList{}
for _, device := range devices {
if !d.Config.WireguardInterfaceFilter.Match([]byte(device.Name)) {
if !d.Config.WireguardInterfaceFilter.MatchString(device.Name) {
continue // Skip interfaces which dont match the filter
}