diff --git a/bird/files/common-policy.conf b/bird/files/common-policy.conf index 9eef2f50380ca2ab08fc194f4fbecd60aaf2f2a6..3426971a469ff36e4457089741288c49fdb725fb 100644 --- a/bird/files/common-policy.conf +++ b/bird/files/common-policy.conf @@ -1,3 +1,5 @@ +define RETN_CUSTOMERS_ONLY = (9002,65535); + function honor_graceful_shutdown() { if (65535, 0) ~ bgp_community then { bgp_local_pref = 0; diff --git a/bird/files/routing-policy4.conf b/bird/files/routing-policy4.conf index 19f48b00e852e7fc3ebb95cc4cf27317602ead66..4cc06d8da4beae9948b0364727ebb509b9cf1523 100644 --- a/bird/files/routing-policy4.conf +++ b/bird/files/routing-policy4.conf @@ -187,6 +187,10 @@ int path_prepend; bgp_path.prepend(AS_ffffm); } + if ("global-transit" = rt_scope) || ("metro-transit" = rt_scope) || ("bilateral-global-transit" = rt_scope) || ("bilateral-metro-transit" = rt_scope) then { + bgp_community.add(RETN_CUSTOMERS_ONLY); + } + if ("metro-transit" = rt_scope) || ("metro-peering" = rt_scope) then { if (ORIGINATE ~ bgp_community) then { if (LOCAL_METRO ~ bgp_community) then { diff --git a/bird/files/routing-policy6.conf b/bird/files/routing-policy6.conf index dfecaa415f536bf64e9fa9eab2ebf6e05efaca93..1334e9de6786bc94d499511b89adb3dd49ae155b 100644 --- a/bird/files/routing-policy6.conf +++ b/bird/files/routing-policy6.conf @@ -233,6 +233,10 @@ int path_prepend; bgp_path.prepend(AS_ffffm); } + if ("global-transit" = rt_scope) || ("metro-transit" = rt_scope) || ("bilateral-global-transit" = rt_scope) || ("bilateral-metro-transit" = rt_scope) then { + bgp_community.add(RETN_CUSTOMERS_ONLY); + } + if ("metro-transit" = rt_scope) || ("metro-peering" = rt_scope) then { if (ORIGINATE ~ bgp_community) then { if (LOCAL_METRO ~ bgp_community) then {