diff options
Diffstat (limited to 'roles/uvok_bird/templates')
-rw-r--r-- | roles/uvok_bird/templates/clearnet.conf.j2 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/roles/uvok_bird/templates/clearnet.conf.j2 b/roles/uvok_bird/templates/clearnet.conf.j2 index ff6674b..87ae8d8 100644 --- a/roles/uvok_bird/templates/clearnet.conf.j2 +++ b/roles/uvok_bird/templates/clearnet.conf.j2 @@ -29,6 +29,7 @@ protocol static myprefix { protocol static default6 { route ::/0 reject; ipv6 { + preference 10; table t_myas_trs; import all; export none; @@ -99,7 +100,14 @@ template bgp pt_rc from pt_clearnet { protocol babel p_myas_babel { ipv6 { table t_myas_babel; - import where source ~ [RTS_DEVICE, RTS_BABEL]; + import filter { +{% if uvok_bird_opts.babel_accept_default %} + # accept also default route +{% else %} + if is_default_route() then reject; +{% endif %} + accept; + }; export where source ~ [RTS_DEVICE, RTS_BABEL, RTS_STATIC]; }; @@ -168,10 +176,14 @@ protocol kernel pk_myas_out { if (source = RTS_BGP) then { accept; } - # default route + # static default route if (source = RTS_STATIC) then { accept; } +{% if uvok_bird_opts.babel_accept_default %} + # add babel default route + if is_default_route() then accept; +{% endif %} reject; }; }; |