diff --git a/bird/bird.conf.tmpl b/bird/bird.conf.tmpl index 79a4b7b..21d0ce4 100644 --- a/bird/bird.conf.tmpl +++ b/bird/bird.conf.tmpl @@ -42,9 +42,8 @@ function is_lixonet_router() function is_own_route() { - return net ~ [ - {{ if len "${routes:-}" }}{{ range "$routes" | split "," }}{{.}}+, {{ end }}{{ end }} - ]; + {{ if len "${routes:-}" }}{{ range "$routes" | split "," }}if net ~ [ {{.}}+ ] then return true;{{ end }}{{ end }} + return false; } filter bgp_import_filter