Skip to content

Commit

Permalink
Fix check on AFI on BIRD 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
pierky committed Mar 2, 2024
1 parent 02341e4 commit 03d8a80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions templates/bird/clients.j2
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,13 @@ filter receive_from_{{ client.id }} {

{% if client.ip|ipaddr_ver == 6 %}
# Prefix: only IPv6 Global Unicast space allowed
{% if "2.0"|target_version_ge %}
if net.type = NET_IP6 && !(net ~ [2000::/3+]) then
{{ reject(client, 10, '"prefix is not in IPv6 Global Unicast space - REJECTING ", net') }}
{% else %}
if !(net ~ [2000::/3+]) then
{{ reject(client, 10, '"prefix is not in IPv6 Global Unicast space - REJECTING ", net') }}
{% endif %}
{% endif %}

# Prefix: global blacklist
Expand Down
2 changes: 1 addition & 1 deletion templates/fingerprints.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bird:
clients.j2: 9d92c67ed7bc722bfdd4ef9c18560e4013e3ff494a8a5fe1b56dc16a3f2fab47e8a69e5ce62a9246af3f4ecbd192361d885381a49cb57067897dc9071c3dff1b
clients.j2: a9712bc73f10c84fd98b04fb72a190c3cf98784bd4a1a6febd9d4f018b9e3cac425ba17b8bf205e40376f5f6fe0c83b61b166904e84d0c98df05950cafe83f26
common.j2: 1888f590f24415b2df86b3f86f4a36ca8c348ae6e5ddfac664e1663928fd5093863b605d5165b4075da38df5bb041f1cbeebee9991efc1be02eb4a696d95e420
header.j2: 25f219ef4d0a4ee64c18b338bc557c246c4759b438f31865a7483ebef8a9a3795e09c85ba301da24d7036b474f7936f7a9ed758f93d66bca36e0624c23729170
irrdb.j2: 4ff9a0dba41a02737c17a2497613f2dcc179a80b79714f18d61162e9503907cfd53765ab426036119e8bcb716d9d24a5380d724235373ae4ab7340d6c6eb074a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ filter receive_from_AS10745_2 {


# Prefix: only IPv6 Global Unicast space allowed
if !(net ~ [2000::/3+]) then
if net.type = NET_IP6 && !(net ~ [2000::/3+]) then
reject "prefix is not in IPv6 Global Unicast space - REJECTING ", net;


Expand Down

0 comments on commit 03d8a80

Please sign in to comment.