diff --git a/bird-conf.j2 b/bird-conf.j2 index 4de7a09..29524ab 100644 --- a/bird-conf.j2 +++ b/bird-conf.j2 @@ -43,6 +43,12 @@ function is_self_net_v6() { return net ~ OWNNETSETv6; } +function is_my_anycast_v6() { + return net ~ [ + fd42:d42:d42:81::/64 + ]; +} + {% if unicastv4 is defined %} function is_valid_network() { return net ~ [ @@ -57,6 +63,12 @@ function is_valid_network() { 10.0.0.0/8{15,24} # Freifunk.net ]; } + +function is_my_anycast_v4() { + return net ~ [ + 172.20.0.81/32+ + ]; +} {% endif %} {% if unicastv4 is defined %} @@ -143,7 +155,7 @@ template bgp dnpeers { } else reject; }; - export filter { if is_valid_network() && source ~ [RTS_STATIC, RTS_BGP] then accept; else reject; }; + export filter { if is_valid_network() && source ~ [RTS_STATIC, RTS_BGP] then accept; else if is_my_anycast_v4() && source ~ [RTS_BABEL] then accept; else reject; }; import limit 9000 action block; import table; }; @@ -159,7 +171,7 @@ template bgp dnpeers { } else accept; } else reject; }; - export filter { if is_valid_network_v6() && source ~ [RTS_STATIC, RTS_BGP] then accept; else reject; }; + export filter { if is_valid_network_v6() && source ~ [RTS_STATIC, RTS_BGP] then accept; else if is_my_anycast_v6() && source ~ [RTS_BABEL] then accept; else reject; }; import limit 9000 action block; import table; };