Implement FILTER_PREFIX for specifying filter-ip
This commit is contained in:
parent
d9fe4ec429
commit
662d3ec6d8
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user