|
|
@ -19,6 +19,7 @@ var envRequired = []string{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var envDefaults = map[string]string{
|
|
|
|
var envDefaults = map[string]string{
|
|
|
|
"IPV6_FORMAT": "fc12::%02x%02x:%02x%02x/%s",
|
|
|
|
"IPV6_FORMAT": "fc12::%02x%02x:%02x%02x/%s",
|
|
|
|
|
|
|
|
"FILTER_PREFIX": "100.100",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
func main() {
|
|
|
@ -43,6 +44,9 @@ func main() {
|
|
|
|
logger.Error.Fatalf("IPV6_FORMAT is invalid: %s", err)
|
|
|
|
logger.Error.Fatalf("IPV6_FORMAT is invalid: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
filterPrefix := os.Getenv("FILTER_PREFIX")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get the IPv4 address of the interface
|
|
|
|
// Get the IPv4 address of the interface
|
|
|
|
addrs, err := netlink.AddrList(netInterface, netlink.FAMILY_V4)
|
|
|
|
addrs, err := netlink.AddrList(netInterface, netlink.FAMILY_V4)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|