diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f565fa1746..d7c18ee0ad 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -73,8 +73,12 @@ #endif FRR_CFG_DEFAULT_BOOL(BGP_IMPORT_CHECK, - { .val_bool = true, .match_profile = "datacenter", }, - { .val_bool = false }, + { + .val_bool = false, + .match_profile = "traditional", + .match_version = "< 7.4", + }, + { .val_bool = true }, ) FRR_CFG_DEFAULT_BOOL(BGP_SHOW_HOSTNAME, { .val_bool = true, .match_profile = "datacenter", }, diff --git a/tests/topotests/all-protocol-startup/r1/bgpd.conf b/tests/topotests/all-protocol-startup/r1/bgpd.conf index 7a7bba7ae7..e000b4e625 100644 --- a/tests/topotests/all-protocol-startup/r1/bgpd.conf +++ b/tests/topotests/all-protocol-startup/r1/bgpd.conf @@ -5,6 +5,7 @@ router bgp 100 bgp router-id 192.168.0.1 bgp log-neighbor-changes no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.7.10 remote-as 100 neighbor 192.168.7.20 remote-as 200 neighbor fc00:0:0:8::1000 remote-as 100 @@ -48,4 +49,4 @@ line vty route-map LIES deny 10 match interface notpresent -! \ No newline at end of file +! diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf b/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf index f69b3c4ba3..82b189b292 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf +++ b/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf @@ -2,6 +2,7 @@ debug bgp neighbor-events router bgp 101 bgp router-id 10.254.254.1 no bgp ebgp-requires-policy + no bgp network import-check timers bgp 8 24 bgp graceful-restart neighbor 2001:db8:4::1 remote-as 102 diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf b/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf index 51b611b2a7..e566e08f7d 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf +++ b/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf @@ -2,6 +2,7 @@ debug bgp neighbor-events router bgp 102 bgp router-id 10.254.254.3 no bgp ebgp-requires-policy + no bgp network import-check timers bgp 20 60 bgp graceful-restart ! simulate NSF machine diff --git a/tests/topotests/bfd-topo1/r1/bgpd.conf b/tests/topotests/bfd-topo1/r1/bgpd.conf index 87f20d29e9..25e16a6e0c 100644 --- a/tests/topotests/bfd-topo1/r1/bgpd.conf +++ b/tests/topotests/bfd-topo1/r1/bgpd.conf @@ -1,5 +1,6 @@ router bgp 101 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.2 remote-as 102 neighbor 192.168.0.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-topo1/r2/bgpd.conf b/tests/topotests/bfd-topo1/r2/bgpd.conf index f87e12f0a7..693fb93411 100644 --- a/tests/topotests/bfd-topo1/r2/bgpd.conf +++ b/tests/topotests/bfd-topo1/r2/bgpd.conf @@ -1,5 +1,6 @@ router bgp 102 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.1 remote-as 101 neighbor 192.168.0.1 bfd neighbor 192.168.1.1 remote-as 103 diff --git a/tests/topotests/bfd-topo1/r3/bgpd.conf b/tests/topotests/bfd-topo1/r3/bgpd.conf index 0340e067f1..7584f98803 100644 --- a/tests/topotests/bfd-topo1/r3/bgpd.conf +++ b/tests/topotests/bfd-topo1/r3/bgpd.conf @@ -1,5 +1,6 @@ router bgp 103 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.1.2 remote-as 102 neighbor 192.168.1.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-topo1/r4/bgpd.conf b/tests/topotests/bfd-topo1/r4/bgpd.conf index 980d927e97..3c68e7eec9 100644 --- a/tests/topotests/bfd-topo1/r4/bgpd.conf +++ b/tests/topotests/bfd-topo1/r4/bgpd.conf @@ -1,5 +1,6 @@ router bgp 104 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.2.2 remote-as 102 neighbor 192.168.2.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf index 136e53a43f..439c58fb2a 100644 --- a/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf @@ -1,5 +1,6 @@ router bgp 101 vrf r1-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.2 remote-as 102 ! neighbor 192.168.0.2 ebgp-multihop 10 neighbor 192.168.0.2 bfd diff --git a/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf index 2bd13e22b2..4fac25d7bb 100644 --- a/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf @@ -1,5 +1,6 @@ router bgp 102 vrf r2-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.1 remote-as 101 neighbor 192.168.0.1 bfd neighbor 192.168.1.1 remote-as 103 diff --git a/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf index c0cd45f7fe..052707ae1b 100644 --- a/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf @@ -1,5 +1,6 @@ router bgp 103 vrf r3-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.1.2 remote-as 102 neighbor 192.168.1.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf index fe1185768d..bcb0a17c01 100644 --- a/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf @@ -1,5 +1,6 @@ router bgp 104 vrf r4-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.2.2 remote-as 102 neighbor 192.168.2.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf index 4ce87f773b..c1bb7e3d15 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf @@ -6,6 +6,7 @@ log stdout notifications log monitor notifications log commands router bgp 5226 + no bgp network import-check bgp router-id 99.0.0.1 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5226 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf index 0d5ec148b1..c889a4c596 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf @@ -6,6 +6,7 @@ log stdout notifications log monitor notifications log commands router bgp 5226 + no bgp network import-check bgp router-id 99.0.0.2 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5226 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf index d58b9b1c90..36dd97190e 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf @@ -6,6 +6,7 @@ log stdout notifications log monitor notifications log commands router bgp 5226 + no bgp network import-check bgp router-id 99.0.0.3 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5226 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf index 3786350996..c3309d8c75 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5227 + no bgp network import-check bgp router-id 99.0.0.1 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5227 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf index ffe2d54f58..54401bfb2f 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5227 + no bgp network import-check bgp router-id 99.0.0.2 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5227 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf index 31a00b8f73..f742fede1a 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5227 + no bgp network import-check bgp router-id 99.0.0.3 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5227 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf index f57f96bec4..91311f32c5 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5228 vrf ce4-cust2 + no bgp network import-check bgp router-id 99.0.0.4 no bgp ebgp-requires-policy neighbor 192.168.2.1 remote-as 5228 diff --git a/tests/topotests/lib/bgp.py b/tests/topotests/lib/bgp.py index cafba60abf..87765e4db5 100644 --- a/tests/topotests/lib/bgp.py +++ b/tests/topotests/lib/bgp.py @@ -219,6 +219,7 @@ def __create_bgp_global(tgen, input_dict, router, build=False): if router_id: config_data.append("bgp router-id {}".format(router_id)) + config_data.append("no bgp network import-check") return config_data