From 406f90a243a706c744f4a9bff46d2ea8db0836eb Mon Sep 17 00:00:00 2001 From: Mazdak Nasab Date: Fri, 13 Feb 2026 15:33:48 -0800 Subject: [PATCH] embed filter for disabled ippools --- .../confd/templates/bird6_ipam.cfg.template | 16 ++++++---------- .../confd/templates/bird_ipam.cfg.template | 16 ++++++---------- .../export_only/explicit_peer/bird6_ipam.cfg | 8 +------- .../export_only/explicit_peer/bird_aggr.cfg | 1 - .../export_only/explicit_peer/bird_ipam.cfg | 8 +------- .../export_only/global_peer/bird6_ipam.cfg | 8 +------- .../export_only/global_peer/bird_aggr.cfg | 1 - .../export_only/global_peer/bird_ipam.cfg | 8 +------- .../filter_deletion/step1/bird6_ipam.cfg | 8 +------- .../filter_deletion/step1/bird_aggr.cfg | 1 - .../filter_deletion/step1/bird_ipam.cfg | 8 +------- .../filter_deletion/step2/bird6_ipam.cfg | 8 +------- .../filter_deletion/step2/bird_aggr.cfg | 1 - .../filter_deletion/step2/bird_ipam.cfg | 8 +------- .../bgpfilter/filter_names/bird6_ipam.cfg | 8 +------- .../bgpfilter/filter_names/bird_aggr.cfg | 1 - .../bgpfilter/filter_names/bird_ipam.cfg | 8 +------- .../import_only/explicit_peer/bird6_ipam.cfg | 8 +------- .../import_only/explicit_peer/bird_aggr.cfg | 1 - .../import_only/explicit_peer/bird_ipam.cfg | 8 +------- .../import_only/global_peer/bird6_ipam.cfg | 8 +------- .../import_only/global_peer/bird_aggr.cfg | 1 - .../import_only/global_peer/bird_ipam.cfg | 8 +------- .../bgpfilter/match_interface/bird6_ipam.cfg | 8 +------- .../bgpfilter/match_interface/bird_ipam.cfg | 8 +------- .../bgpfilter/match_operators/bird6_ipam.cfg | 8 +------- .../bgpfilter/match_operators/bird_aggr.cfg | 1 - .../bgpfilter/match_operators/bird_ipam.cfg | 8 +------- .../bgpfilter/match_source/bird6_ipam.cfg | 8 +------- .../bgpfilter/match_source/bird_ipam.cfg | 8 +------- .../multi_filter/explicit_peer/bird6_ipam.cfg | 8 +------- .../multi_filter/explicit_peer/bird_aggr.cfg | 1 - .../multi_filter/explicit_peer/bird_ipam.cfg | 8 +------- .../multi_filter/global_peer/bird6_ipam.cfg | 8 +------- .../multi_filter/global_peer/bird_aggr.cfg | 1 - .../multi_filter/global_peer/bird_ipam.cfg | 8 +------- .../bgpfilter/node_mesh/bird6_ipam.cfg | 8 +------- .../bgpfilter/node_mesh/bird_aggr.cfg | 1 - .../bgpfilter/node_mesh/bird_ipam.cfg | 8 +------- .../single_filter/explicit_peer/bird6_ipam.cfg | 8 +------- .../single_filter/explicit_peer/bird_aggr.cfg | 1 - .../single_filter/explicit_peer/bird_ipam.cfg | 8 +------- .../single_filter/global_peer/bird6_ipam.cfg | 8 +------- .../single_filter/global_peer/bird_aggr.cfg | 1 - .../single_filter/global_peer/bird_ipam.cfg | 8 +------- .../v4_only/explicit_peer/bird6_ipam.cfg | 8 +------- .../v4_only/explicit_peer/bird_aggr.cfg | 1 - .../v4_only/explicit_peer/bird_ipam.cfg | 8 +------- .../bgpfilter/v4_only/global_peer/bird6_ipam.cfg | 8 +------- .../bgpfilter/v4_only/global_peer/bird_aggr.cfg | 1 - .../bgpfilter/v4_only/global_peer/bird_ipam.cfg | 8 +------- .../v6_only/explicit_peer/bird6_ipam.cfg | 8 +------- .../v6_only/explicit_peer/bird_ipam.cfg | 8 +------- .../bgpfilter/v6_only/global_peer/bird6_ipam.cfg | 8 +------- .../bgpfilter/v6_only/global_peer/bird_ipam.cfg | 8 +------- .../global-external/bird6_ipam.cfg | 8 +------- .../global-external/bird_ipam.cfg | 8 +------- .../explicit_peering/global-ipv6/bird6_ipam.cfg | 8 +------- .../explicit_peering/global-ipv6/bird_ipam.cfg | 8 +------- .../explicit_peering/global/bird6_ipam.cfg | 8 +------- .../explicit_peering/global/bird_ipam.cfg | 8 +------- .../keepnexthop-global/bird6_ipam.cfg | 8 +------- .../keepnexthop-global/bird_ipam.cfg | 8 +------- .../explicit_peering/keepnexthop/bird6_ipam.cfg | 8 +------- .../explicit_peering/keepnexthop/bird_ipam.cfg | 8 +------- .../local-as-global-ipv6/bird6_ipam.cfg | 8 +------- .../local-as-global-ipv6/bird_ipam.cfg | 8 +------- .../local-as-global/bird6_ipam.cfg | 8 +------- .../local-as-global/bird_ipam.cfg | 8 +------- .../local-as-ipv6/bird6_ipam.cfg | 8 +------- .../explicit_peering/local-as-ipv6/bird_ipam.cfg | 8 +------- .../explicit_peering/local-as/bird6_ipam.cfg | 8 +------- .../explicit_peering/local-as/bird_ipam.cfg | 8 +------- .../local_bgp_peer/bird6_ipam.cfg | 8 +------- .../local_bgp_peer/bird_ipam.cfg | 8 +------- .../route_reflector/bird6_ipam.cfg | 8 +------- .../route_reflector/bird_ipam.cfg | 8 +------- .../route_reflector_v6_by_ip/bird6_ipam.cfg | 8 +------- .../route_reflector_v6_by_ip/bird_ipam.cfg | 8 +------- .../explicit_peering/selectors/bird6_ipam.cfg | 8 +------- .../explicit_peering/selectors/bird_ipam.cfg | 8 +------- .../selectors/step2/bird6_ipam.cfg | 8 +------- .../selectors/step2/bird_ipam.cfg | 8 +------- .../specific_node/bird6_ipam.cfg | 8 +------- .../explicit_peering/specific_node/bird_ipam.cfg | 8 +------- .../ignored_interfaces/bird6_ipam.cfg | 8 +------- .../ignored_interfaces/bird_aggr.cfg | 1 - .../ignored_interfaces/bird_ipam.cfg | 8 +------- .../compiled_templates/mesh/bgp-export/bird.cfg | 2 ++ .../mesh/bgp-export/bird6_ipam.cfg | 10 ++-------- .../mesh/bgp-export/bird_ipam.cfg | 10 ++-------- .../compiled_templates/mesh/communities/bird.cfg | 2 ++ .../mesh/communities/bird6_ipam.cfg | 8 +------- .../mesh/communities/bird_ipam.cfg | 8 +------- .../mesh/communities/step2/bird.cfg | 2 ++ .../mesh/communities/step2/bird6_ipam.cfg | 8 +------- .../mesh/communities/step2/bird_ipam.cfg | 8 +------- .../compiled_templates/mesh/hash/bird6_ipam.cfg | 8 +------- .../compiled_templates/mesh/hash/bird_aggr.cfg | 1 - .../compiled_templates/mesh/hash/bird_ipam.cfg | 8 +------- .../compiled_templates/mesh/ipip-always/bird.cfg | 2 ++ .../mesh/ipip-always/bird6_ipam.cfg | 8 +------- .../mesh/ipip-always/bird_ipam.cfg | 8 +------- .../mesh/ipip-cross-subnet/bird.cfg | 2 ++ .../mesh/ipip-cross-subnet/bird6_ipam.cfg | 8 +------- .../mesh/ipip-cross-subnet/bird_ipam.cfg | 8 +------- .../compiled_templates/mesh/ipip-off/bird.cfg | 2 ++ .../mesh/ipip-off/bird6_ipam.cfg | 8 +------- .../mesh/ipip-off/bird_ipam.cfg | 8 +------- .../mesh/password/step1/bird.cfg | 2 ++ .../mesh/password/step1/bird6_ipam.cfg | 8 +------- .../mesh/password/step1/bird_ipam.cfg | 8 +------- .../mesh/password/step2/bird6_ipam.cfg | 8 +------- .../mesh/password/step2/bird_ipam.cfg | 8 +------- .../mesh/password/step3/bird6_ipam.cfg | 8 +------- .../mesh/password/step3/bird_ipam.cfg | 8 +------- .../mesh/restart-time/bird.cfg | 2 ++ .../mesh/restart-time/bird6_ipam.cfg | 8 +------- .../mesh/restart-time/bird_ipam.cfg | 8 +------- .../mesh/route-reflector-mesh-enabled/bird.cfg | 2 ++ .../route-reflector-mesh-enabled/bird6_ipam.cfg | 8 +------- .../route-reflector-mesh-enabled/bird_ipam.cfg | 8 +------- .../mesh/static-routes-exclude-node/bird.cfg | 2 ++ .../static-routes-exclude-node/bird6_ipam.cfg | 8 +------- .../static-routes-exclude-node/bird_ipam.cfg | 8 +------- .../static-routes-exclude-node/step2/bird.cfg | 2 ++ .../step2/bird6_ipam.cfg | 8 +------- .../step2/bird_ipam.cfg | 8 +------- .../static-routes-no-ipv4-address/bird6_ipam.cfg | 8 +------- .../static-routes-no-ipv4-address/bird_ipam.cfg | 8 +------- .../mesh/static-routes/bird.cfg | 2 ++ .../mesh/static-routes/bird6_ipam.cfg | 8 +------- .../mesh/static-routes/bird_ipam.cfg | 8 +------- .../mesh/static-routes/step2/bird.cfg | 2 ++ .../mesh/static-routes/step2/bird6_ipam.cfg | 8 +------- .../mesh/static-routes/step2/bird_ipam.cfg | 8 +------- .../mesh/vxlan-always/bird.cfg | 2 ++ .../mesh/vxlan-always/bird6_ipam.cfg | 8 +------- .../mesh/vxlan-always/bird_ipam.cfg | 8 +------- .../next_hop_mode/global_peers/bird6_ipam.cfg | 8 +------- .../next_hop_mode/global_peers/bird_ipam.cfg | 8 +------- .../route_reflectors/bird6_ipam.cfg | 8 +------- .../next_hop_mode/route_reflectors/bird_ipam.cfg | 8 +------- .../password-deadlock/bird6_ipam.cfg | 8 +------- .../password-deadlock/bird_ipam.cfg | 8 +------- .../password/step1/bird6_ipam.cfg | 8 +------- .../password/step1/bird_ipam.cfg | 8 +------- .../password/step2/bird6_ipam.cfg | 8 +------- .../password/step2/bird_ipam.cfg | 8 +------- .../password/step3/bird6_ipam.cfg | 8 +------- .../password/step3/bird_ipam.cfg | 8 +------- .../password/step4/bird6_ipam.cfg | 8 +------- .../password/step4/bird_ipam.cfg | 8 +------- .../password/step5/bird6_ipam.cfg | 8 +------- .../password/step5/bird_ipam.cfg | 8 +------- .../password/step6/bird6_ipam.cfg | 8 +------- .../password/step6/bird_ipam.cfg | 8 +------- .../reachable_by/global_peers/bird6_ipam.cfg | 8 +------- .../reachable_by/global_peers/bird_aggr.cfg | 1 - .../reachable_by/global_peers/bird_ipam.cfg | 8 +------- .../reachable_by/route_reflectors/bird6_ipam.cfg | 8 +------- .../reachable_by/route_reflectors/bird_aggr.cfg | 1 - .../reachable_by/route_reflectors/bird_ipam.cfg | 8 +------- .../reverse_peering/auto/bird6_ipam.cfg | 8 +------- .../reverse_peering/auto/bird_ipam.cfg | 8 +------- .../reverse_peering/manual/bird6_ipam.cfg | 8 +------- .../reverse_peering/manual/bird_ipam.cfg | 8 +------- .../step1/bird6_ipam.cfg | 8 +------- .../step1/bird_ipam.cfg | 8 +------- .../step2/bird6_ipam.cfg | 8 +------- .../step2/bird_ipam.cfg | 8 +------- .../step3/bird6_ipam.cfg | 8 +------- .../step3/bird_ipam.cfg | 8 +------- .../ttl_security/explicit_node/bird6_ipam.cfg | 8 +------- .../ttl_security/explicit_node/bird_aggr.cfg | 1 - .../ttl_security/explicit_node/bird_ipam.cfg | 8 +------- .../ttl_security/global/bird6_ipam.cfg | 8 +------- .../ttl_security/global/bird_aggr.cfg | 1 - .../ttl_security/global/bird_ipam.cfg | 8 +------- .../ttl_security/peer_selector/bird6_ipam.cfg | 8 +------- .../ttl_security/peer_selector/bird_aggr.cfg | 1 - .../ttl_security/peer_selector/bird_ipam.cfg | 8 +------- 182 files changed, 186 insertions(+), 1052 deletions(-) diff --git a/confd/etc/calico/confd/templates/bird6_ipam.cfg.template b/confd/etc/calico/confd/templates/bird6_ipam.cfg.template index fcfecba2f36..f6fbba5061b 100644 --- a/confd/etc/calico/confd/templates/bird6_ipam.cfg.template +++ b/confd/etc/calico/confd/templates/bird6_ipam.cfg.template @@ -1,11 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -{{- range $line := ippoolsFilterBIRDFunc (gets "/v1/ipam/v6/pool/*") "reject" false "" 6 }} -{{ $line }} -{{- end}} -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -27,9 +20,11 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + +{{- range $line := ippoolsFilterBIRDFunc (gets "/v1/ipam/v6/pool/*") "reject" false "" 6 }} +{{ $line }} +{{- end}} + if (internal_peer) then { reject_tunnel_routes(); } @@ -60,6 +55,7 @@ function calico_export_to_bgp_peers(bool internal_peer) { {{- end}} {{- end}} {{- end}} + {{- range $line := ippoolsFilterBIRDFunc (gets "/v1/ipam/v6/pool/*") "accept" false "" 6 }} {{ $line }} {{- end }} diff --git a/confd/etc/calico/confd/templates/bird_ipam.cfg.template b/confd/etc/calico/confd/templates/bird_ipam.cfg.template index f2f82e1cdd2..c1295219475 100644 --- a/confd/etc/calico/confd/templates/bird_ipam.cfg.template +++ b/confd/etc/calico/confd/templates/bird_ipam.cfg.template @@ -1,11 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -{{- range $line := ippoolsFilterBIRDFunc (gets "/v1/ipam/v4/pool/*") "reject" false "" 4 }} -{{ $line }} -{{- end}} -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -27,9 +20,11 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + +{{- range $line := ippoolsFilterBIRDFunc (gets "/v1/ipam/v4/pool/*") "reject" false "" 4 }} +{{ $line }} +{{- end}} + if (internal_peer) then { reject_tunnel_routes(); } @@ -78,6 +73,7 @@ filter calico_kernel_programming { {{- end}} {{- end}} + {{- if exists $network_key}}{{$network := getv $network_key}} {{- range $line := ippoolsFilterBIRDFunc (gets "/v1/ipam/v4/pool/*") "" true $network 4 }} {{ $line }} diff --git a/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/export_only/explicit_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/export_only/global_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step1/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_deletion/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/filter_names/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/filter_names/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_names/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_names/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/filter_names/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/filter_names/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_names/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_names/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/filter_names/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/filter_names/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/filter_names/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/filter_names/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/import_only/explicit_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/import_only/global_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/match_interface/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/match_interface/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_interface/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_interface/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/match_interface/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/match_interface/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_interface/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_interface/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/match_operators/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/match_operators/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_operators/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_operators/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/match_operators/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/match_operators/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_operators/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_operators/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/match_operators/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/match_operators/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_operators/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_operators/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/match_source/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/match_source/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_source/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_source/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/match_source/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/match_source/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/match_source/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/match_source/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/multi_filter/explicit_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/multi_filter/global_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/node_mesh/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/node_mesh/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/node_mesh/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/node_mesh/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/node_mesh/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/single_filter/explicit_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/single_filter/global_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v4_only/explicit_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_aggr.cfg b/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_aggr.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v4_only/global_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v6_only/explicit_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird_ipam.cfg b/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/bgpfilter/v6_only/global_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/global-external/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/global-external/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/global-external/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/global-external/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/global-external/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/global-external/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/global-external/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/global-external/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/global-ipv6/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/global/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/global/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/global/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/global/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/global/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/global/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/global/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/global/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/keepnexthop-global/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/keepnexthop/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as-global-ipv6/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as-global/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as-global/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as-global/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as-global/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as-global/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as-global/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as-global/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as-global/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as-ipv6/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local-as/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local-as/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/local-as/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local-as/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/local_bgp_peer/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/route_reflector/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/route_reflector/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/route_reflector/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/route_reflector/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/route_reflector/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/route_reflector/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/route_reflector/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/route_reflector/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/route_reflector_v6_by_ip/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/selectors/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/selectors/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/selectors/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/selectors/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/selectors/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/selectors/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/selectors/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/selectors/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/selectors/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/specific_node/bird6_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/specific_node/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/explicit_peering/specific_node/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/specific_node/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/explicit_peering/specific_node/bird_ipam.cfg b/confd/tests/compiled_templates/explicit_peering/specific_node/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/explicit_peering/specific_node/bird_ipam.cfg +++ b/confd/tests/compiled_templates/explicit_peering/specific_node/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ignored_interfaces/bird6_ipam.cfg b/confd/tests/compiled_templates/ignored_interfaces/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/ignored_interfaces/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/ignored_interfaces/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ignored_interfaces/bird_aggr.cfg b/confd/tests/compiled_templates/ignored_interfaces/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/ignored_interfaces/bird_aggr.cfg +++ b/confd/tests/compiled_templates/ignored_interfaces/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/ignored_interfaces/bird_ipam.cfg b/confd/tests/compiled_templates/ignored_interfaces/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/ignored_interfaces/bird_ipam.cfg +++ b/confd/tests/compiled_templates/ignored_interfaces/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/bgp-export/bird.cfg b/confd/tests/compiled_templates/mesh/bgp-export/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/bgp-export/bird.cfg +++ b/confd/tests/compiled_templates/mesh/bgp-export/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/bgp-export/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/bgp-export/bird6_ipam.cfg index e8fdfebb07d..ffd817c9c3c 100644 --- a/confd/tests/compiled_templates/mesh/bgp-export/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/bgp-export/bird6_ipam.cfg @@ -1,9 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ - if (net ~ 2002:102::/64) then { reject; } # BGP export is disabled. -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -25,9 +20,8 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (net ~ 2002:102::/64) then { reject; } # BGP export is disabled. + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/bgp-export/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/bgp-export/bird_ipam.cfg index 105a59547cb..2f662cdab79 100644 --- a/confd/tests/compiled_templates/mesh/bgp-export/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/bgp-export/bird_ipam.cfg @@ -1,9 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ - if (net ~ 192.168.2.0/24) then { reject; } # BGP export is disabled. -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -25,9 +20,8 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (net ~ 192.168.2.0/24) then { reject; } # BGP export is disabled. + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/communities/bird.cfg b/confd/tests/compiled_templates/mesh/communities/bird.cfg index 597f9eb0d82..736a0c8698d 100644 --- a/confd/tests/compiled_templates/mesh/communities/bird.cfg +++ b/confd/tests/compiled_templates/mesh/communities/bird.cfg @@ -89,3 +89,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/communities/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/communities/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/communities/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/communities/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/communities/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/communities/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/communities/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/communities/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/communities/step2/bird.cfg b/confd/tests/compiled_templates/mesh/communities/step2/bird.cfg index d59821d9f16..c40910916fd 100644 --- a/confd/tests/compiled_templates/mesh/communities/step2/bird.cfg +++ b/confd/tests/compiled_templates/mesh/communities/step2/bird.cfg @@ -88,3 +88,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/communities/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/communities/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/communities/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/communities/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/communities/step2/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/communities/step2/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/communities/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/communities/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/hash/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/hash/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/hash/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/hash/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/hash/bird_aggr.cfg b/confd/tests/compiled_templates/mesh/hash/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/mesh/hash/bird_aggr.cfg +++ b/confd/tests/compiled_templates/mesh/hash/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/mesh/hash/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/hash/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/hash/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/hash/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/ipip-always/bird.cfg b/confd/tests/compiled_templates/mesh/ipip-always/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/ipip-always/bird.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-always/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/ipip-always/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/ipip-always/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/ipip-always/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-always/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/ipip-always/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/ipip-always/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/mesh/ipip-always/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-always/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird.cfg b/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird.cfg index 2d6a504ea4c..01307b00df4 100644 --- a/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_6 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird_ipam.cfg index c76bff0f382..102c6373120 100644 --- a/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-cross-subnet/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/ipip-off/bird.cfg b/confd/tests/compiled_templates/mesh/ipip-off/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/ipip-off/bird.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-off/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/ipip-off/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/ipip-off/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/mesh/ipip-off/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-off/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/ipip-off/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/ipip-off/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/ipip-off/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/ipip-off/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/password/step1/bird.cfg b/confd/tests/compiled_templates/mesh/password/step1/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/password/step1/bird.cfg +++ b/confd/tests/compiled_templates/mesh/password/step1/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/password/step1/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/password/step1/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/mesh/password/step1/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/password/step1/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/password/step1/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/password/step1/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/password/step1/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/password/step1/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/password/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/password/step2/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/mesh/password/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/password/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/password/step2/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/password/step2/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/password/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/password/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/password/step3/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/password/step3/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/mesh/password/step3/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/password/step3/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/password/step3/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/password/step3/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/password/step3/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/password/step3/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/restart-time/bird.cfg b/confd/tests/compiled_templates/mesh/restart-time/bird.cfg index 49860d3188d..af5881a7f44 100644 --- a/confd/tests/compiled_templates/mesh/restart-time/bird.cfg +++ b/confd/tests/compiled_templates/mesh/restart-time/bird.cfg @@ -84,3 +84,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { passive on; graceful restart time 10; } + + diff --git a/confd/tests/compiled_templates/mesh/restart-time/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/restart-time/bird6_ipam.cfg index 64a578bc047..94ba3ce5199 100644 --- a/confd/tests/compiled_templates/mesh/restart-time/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/restart-time/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/restart-time/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/restart-time/bird_ipam.cfg index 3ca4ae7db92..cf88b7a78ec 100644 --- a/confd/tests/compiled_templates/mesh/restart-time/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/restart-time/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird.cfg b/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird.cfg index a37b6ce6c38..e0c7c224e84 100644 --- a/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird.cfg +++ b/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird.cfg @@ -84,3 +84,5 @@ protocol bgp Node_10_192_0_4 from bgp_template { reject; }; # Only want to export routes for workloads. } + + diff --git a/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/route-reflector-mesh-enabled/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird.cfg b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird6_ipam.cfg index 4c7bd2a20a5..8aa26c5b6ca 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird_ipam.cfg index c0a4898029c..9f19a9dae7a 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird.cfg b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-exclude-node/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird_ipam.cfg index f6d5c12d54b..c4ed32970a3 100644 --- a/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes-no-ipv4-address/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes/bird.cfg b/confd/tests/compiled_templates/mesh/static-routes/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/static-routes/bird.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/static-routes/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes/bird6_ipam.cfg index df4f18fe663..0de187af88d 100644 --- a/confd/tests/compiled_templates/mesh/static-routes/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes/bird_ipam.cfg index f49735015b9..bedb7840336 100644 --- a/confd/tests/compiled_templates/mesh/static-routes/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes/step2/bird.cfg b/confd/tests/compiled_templates/mesh/static-routes/step2/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/static-routes/step2/bird.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes/step2/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/static-routes/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/mesh/static-routes/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/static-routes/step2/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/static-routes/step2/bird_ipam.cfg index cb7dcf8318b..9793102a805 100644 --- a/confd/tests/compiled_templates/mesh/static-routes/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/static-routes/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/vxlan-always/bird.cfg b/confd/tests/compiled_templates/mesh/vxlan-always/bird.cfg index 83cba658e0c..78e57248c29 100644 --- a/confd/tests/compiled_templates/mesh/vxlan-always/bird.cfg +++ b/confd/tests/compiled_templates/mesh/vxlan-always/bird.cfg @@ -82,3 +82,5 @@ protocol bgp Mesh_10_192_0_4 from bgp_template { }; # Only want to export routes for workloads. passive on; } + + diff --git a/confd/tests/compiled_templates/mesh/vxlan-always/bird6_ipam.cfg b/confd/tests/compiled_templates/mesh/vxlan-always/bird6_ipam.cfg index 14d183d493c..71344bb0244 100644 --- a/confd/tests/compiled_templates/mesh/vxlan-always/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/vxlan-always/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/mesh/vxlan-always/bird_ipam.cfg b/confd/tests/compiled_templates/mesh/vxlan-always/bird_ipam.cfg index 3aec5a40637..43c9a973206 100644 --- a/confd/tests/compiled_templates/mesh/vxlan-always/bird_ipam.cfg +++ b/confd/tests/compiled_templates/mesh/vxlan-always/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/next_hop_mode/global_peers/bird6_ipam.cfg b/confd/tests/compiled_templates/next_hop_mode/global_peers/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/next_hop_mode/global_peers/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/next_hop_mode/global_peers/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/next_hop_mode/global_peers/bird_ipam.cfg b/confd/tests/compiled_templates/next_hop_mode/global_peers/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/next_hop_mode/global_peers/bird_ipam.cfg +++ b/confd/tests/compiled_templates/next_hop_mode/global_peers/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird6_ipam.cfg b/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird_ipam.cfg b/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird_ipam.cfg +++ b/confd/tests/compiled_templates/next_hop_mode/route_reflectors/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password-deadlock/bird6_ipam.cfg b/confd/tests/compiled_templates/password-deadlock/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password-deadlock/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password-deadlock/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password-deadlock/bird_ipam.cfg b/confd/tests/compiled_templates/password-deadlock/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password-deadlock/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password-deadlock/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step1/bird6_ipam.cfg b/confd/tests/compiled_templates/password/step1/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password/step1/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password/step1/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step1/bird_ipam.cfg b/confd/tests/compiled_templates/password/step1/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password/step1/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password/step1/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/password/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step2/bird_ipam.cfg b/confd/tests/compiled_templates/password/step2/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step3/bird6_ipam.cfg b/confd/tests/compiled_templates/password/step3/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password/step3/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password/step3/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step3/bird_ipam.cfg b/confd/tests/compiled_templates/password/step3/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password/step3/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password/step3/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step4/bird6_ipam.cfg b/confd/tests/compiled_templates/password/step4/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password/step4/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password/step4/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step4/bird_ipam.cfg b/confd/tests/compiled_templates/password/step4/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password/step4/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password/step4/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step5/bird6_ipam.cfg b/confd/tests/compiled_templates/password/step5/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password/step5/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password/step5/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step5/bird_ipam.cfg b/confd/tests/compiled_templates/password/step5/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password/step5/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password/step5/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step6/bird6_ipam.cfg b/confd/tests/compiled_templates/password/step6/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/password/step6/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/password/step6/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/password/step6/bird_ipam.cfg b/confd/tests/compiled_templates/password/step6/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/password/step6/bird_ipam.cfg +++ b/confd/tests/compiled_templates/password/step6/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reachable_by/global_peers/bird6_ipam.cfg b/confd/tests/compiled_templates/reachable_by/global_peers/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/reachable_by/global_peers/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/reachable_by/global_peers/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reachable_by/global_peers/bird_aggr.cfg b/confd/tests/compiled_templates/reachable_by/global_peers/bird_aggr.cfg index 62b03ecd63c..0de4d8f58d9 100644 --- a/confd/tests/compiled_templates/reachable_by/global_peers/bird_aggr.cfg +++ b/confd/tests/compiled_templates/reachable_by/global_peers/bird_aggr.cfg @@ -11,7 +11,6 @@ protocol static { route 10.225.0.5/32 via 10.224.0.1; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/reachable_by/global_peers/bird_ipam.cfg b/confd/tests/compiled_templates/reachable_by/global_peers/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/reachable_by/global_peers/bird_ipam.cfg +++ b/confd/tests/compiled_templates/reachable_by/global_peers/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reachable_by/route_reflectors/bird6_ipam.cfg b/confd/tests/compiled_templates/reachable_by/route_reflectors/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/reachable_by/route_reflectors/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/reachable_by/route_reflectors/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_aggr.cfg b/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_aggr.cfg index e868c2cb4dc..608fc9fcb58 100644 --- a/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_aggr.cfg +++ b/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_aggr.cfg @@ -11,7 +11,6 @@ protocol static { route 10.225.0.5/32 via 10.224.0.1; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_ipam.cfg b/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_ipam.cfg +++ b/confd/tests/compiled_templates/reachable_by/route_reflectors/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reverse_peering/auto/bird6_ipam.cfg b/confd/tests/compiled_templates/reverse_peering/auto/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/reverse_peering/auto/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/reverse_peering/auto/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reverse_peering/auto/bird_ipam.cfg b/confd/tests/compiled_templates/reverse_peering/auto/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/reverse_peering/auto/bird_ipam.cfg +++ b/confd/tests/compiled_templates/reverse_peering/auto/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reverse_peering/manual/bird6_ipam.cfg b/confd/tests/compiled_templates/reverse_peering/manual/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/reverse_peering/manual/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/reverse_peering/manual/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/reverse_peering/manual/bird_ipam.cfg b/confd/tests/compiled_templates/reverse_peering/manual/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/reverse_peering/manual/bird_ipam.cfg +++ b/confd/tests/compiled_templates/reverse_peering/manual/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird6_ipam.cfg b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird_ipam.cfg b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird_ipam.cfg +++ b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step1/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird6_ipam.cfg b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird_ipam.cfg b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird_ipam.cfg +++ b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step2/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird6_ipam.cfg b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird_ipam.cfg b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird_ipam.cfg +++ b/confd/tests/compiled_templates/sourceaddr_gracefulrestart/step3/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ttl_security/explicit_node/bird6_ipam.cfg b/confd/tests/compiled_templates/ttl_security/explicit_node/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/ttl_security/explicit_node/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/ttl_security/explicit_node/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ttl_security/explicit_node/bird_aggr.cfg b/confd/tests/compiled_templates/ttl_security/explicit_node/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/ttl_security/explicit_node/bird_aggr.cfg +++ b/confd/tests/compiled_templates/ttl_security/explicit_node/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/ttl_security/explicit_node/bird_ipam.cfg b/confd/tests/compiled_templates/ttl_security/explicit_node/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/ttl_security/explicit_node/bird_ipam.cfg +++ b/confd/tests/compiled_templates/ttl_security/explicit_node/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ttl_security/global/bird6_ipam.cfg b/confd/tests/compiled_templates/ttl_security/global/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/ttl_security/global/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/ttl_security/global/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ttl_security/global/bird_aggr.cfg b/confd/tests/compiled_templates/ttl_security/global/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/ttl_security/global/bird_aggr.cfg +++ b/confd/tests/compiled_templates/ttl_security/global/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/ttl_security/global/bird_ipam.cfg b/confd/tests/compiled_templates/ttl_security/global/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/ttl_security/global/bird_ipam.cfg +++ b/confd/tests/compiled_templates/ttl_security/global/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ttl_security/peer_selector/bird6_ipam.cfg b/confd/tests/compiled_templates/ttl_security/peer_selector/bird6_ipam.cfg index a4ddeb21e47..2024928a158 100644 --- a/confd/tests/compiled_templates/ttl_security/peer_selector/bird6_ipam.cfg +++ b/confd/tests/compiled_templates/ttl_security/peer_selector/bird6_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); } diff --git a/confd/tests/compiled_templates/ttl_security/peer_selector/bird_aggr.cfg b/confd/tests/compiled_templates/ttl_security/peer_selector/bird_aggr.cfg index 5a623513074..9d86b3b0205 100644 --- a/confd/tests/compiled_templates/ttl_security/peer_selector/bird_aggr.cfg +++ b/confd/tests/compiled_templates/ttl_security/peer_selector/bird_aggr.cfg @@ -8,7 +8,6 @@ protocol static { route 192.168.221.64/26 blackhole; } - # Aggregation of routes on this host; export the block, nothing beneath it. function calico_aggr () { diff --git a/confd/tests/compiled_templates/ttl_security/peer_selector/bird_ipam.cfg b/confd/tests/compiled_templates/ttl_security/peer_selector/bird_ipam.cfg index 735fc295b8c..6fe41fd331b 100644 --- a/confd/tests/compiled_templates/ttl_security/peer_selector/bird_ipam.cfg +++ b/confd/tests/compiled_templates/ttl_security/peer_selector/bird_ipam.cfg @@ -1,8 +1,4 @@ # Generated by confd -function reject_disabled_pools () -{ -} - function reject_tunnel_routes () { # Don't export tunnel routes to other nodes, Felix programs them. # IPIP routes are handled by Bird, and it does not re-advertise them. @@ -24,9 +20,7 @@ function reject_local_routes () { function calico_export_to_bgp_peers(bool internal_peer) { # filter code terminates when it calls `accept;` or `reject;`, - # call reject_disabled_pools() first, then reject_tunnel_routes(), - # then apply_communities() and then calico_aggr() - reject_disabled_pools(); + if (internal_peer) then { reject_tunnel_routes(); }