From 662d3ec6d8881460e39583cfe5d5ad44d737e6d3 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Sat, 1 Apr 2023 11:36:43 +0200 Subject: [PATCH] Implement FILTER_PREFIX for specifying filter-ip --- cmd/app/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/app/main.go b/cmd/app/main.go index 74eb215..c6213f2 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -19,6 +19,7 @@ var envRequired = []string{ } var envDefaults = map[string]string{ "IPV6_FORMAT": "fc12::%02x%02x:%02x%02x/%s", + "FILTER_PREFIX": "100.100", } func main() { @@ -43,6 +44,9 @@ func main() { logger.Error.Fatalf("IPV6_FORMAT is invalid: %s", err) } + filterPrefix := os.Getenv("FILTER_PREFIX") + + // Get the IPv4 address of the interface addrs, err := netlink.AddrList(netInterface, netlink.FAMILY_V4) if err != nil {