Ignore loopback interface

This commit is contained in:
braginini
2023-04-04 17:49:28 +02:00
parent 73a5bc33b3
commit 367eff493a
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -196,6 +196,12 @@ func parseInterfacesString(interfaces string) []*transport.Interface {
func InterfaceFilter(disallowList []string) func(string) bool {
return func(iFace string) bool {
if strings.HasPrefix(iFace, "lo") {
// hardcoded loopback check to support already installed agents
return false
}
for _, s := range disallowList {
if strings.HasPrefix(iFace, s) {
log.Debugf("ignoring interface %s - it is not allowed", iFace)