diff options
author | uvok cheetah | 2024-04-28 20:21:36 +0200 |
---|---|---|
committer | uvok cheetah | 2024-04-28 20:21:36 +0200 |
commit | 0303b904ad0149cb0cb56d507a6f58f3776827ae (patch) | |
tree | 4f093fae77fc89f793868f392793e21fb393d3aa /roles | |
parent | 08a6cd50e5360acedc33515fa294b3a12ec240d1 (diff) |
bird: Add function to accept default route
hard to do properly with templates.
need to do copy/paste anyway. blergh.
Diffstat (limited to 'roles')
-rw-r--r-- | roles/uvok_bird/templates/clearnet.conf.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/uvok_bird/templates/clearnet.conf.j2 b/roles/uvok_bird/templates/clearnet.conf.j2 index 2c99411..bb057d1 100644 --- a/roles/uvok_bird/templates/clearnet.conf.j2 +++ b/roles/uvok_bird/templates/clearnet.conf.j2 @@ -55,6 +55,18 @@ define BOGON_PREFIXES = [ ::/0, # Default route ff00::/8+ # RFC 4291 multicast ]; +function is_default_route() -> bool { + case net.type { + NET_IP4: return net = 0.0.0.0/0; + NET_IP6: return net = ::/0; + else: return false; + } +} + +function accept_default_route() { + if is_default_route() then accept; +} + function reject_bogon_asns() int set bogon_asns; { |