]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd,tests: Modify import-check to require underlying prefixes to exist
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 15 Apr 2020 12:21:11 +0000 (08:21 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 28 Apr 2020 19:57:53 +0000 (15:57 -0400)
Modify the import-check command to require the underlying prefix
to exist in the rib.  General consensus is that this is the correct
behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
20 files changed:
bgpd/bgp_vty.c
tests/topotests/all-protocol-startup/r1/bgpd.conf
tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf
tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf
tests/topotests/bfd-topo1/r1/bgpd.conf
tests/topotests/bfd-topo1/r2/bgpd.conf
tests/topotests/bfd-topo1/r3/bgpd.conf
tests/topotests/bfd-topo1/r4/bgpd.conf
tests/topotests/bfd-vrf-topo1/r1/bgpd.conf
tests/topotests/bfd-vrf-topo1/r2/bgpd.conf
tests/topotests/bfd-vrf-topo1/r3/bgpd.conf
tests/topotests/bfd-vrf-topo1/r4/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf
tests/topotests/lib/bgp.py

index f565fa1746b33dc3685ae872ad4a04f7ca5e0332..d7c18ee0ad77207aaf92374b0f1828a00eeefcf6 100644 (file)
 #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", },
index 7a7bba7ae756c11e77be9eac85be75c0987c8b12..e000b4e625d691c10bb35b338488bce7ec635613 100644 (file)
@@ -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
+!
index f69b3c4ba31e24b5caee0cb30275426f792e8f2d..82b189b29205b554867ba6ec4698e8d53b46487c 100644 (file)
@@ -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
index 51b611b2a7f7e5c06e1e05d7607624f92dfa4095..e566e08f7df311f697f13f77d87d0f931fc11bf5 100644 (file)
@@ -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
index 87f20d29e9ba73261206e8b4e0a0826d24e62837..25e16a6e0c89090f8987825b456a5f12376d4e89 100644 (file)
@@ -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
index f87e12f0a79cd7f59908029933f20c692e00ca43..693fb93411c06140c78c752f8a2ba609913c8a1c 100644 (file)
@@ -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
index 0340e067f1d1b4d70f0e87087c6fb266b2763429..7584f988039e804406b16855bc0369a3f6d685c0 100644 (file)
@@ -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
index 980d927e9707eaa296b726b7c7da6de4a2b6602c..3c68e7eec9bbaa1cc6a371c7c477866dd389b92e 100644 (file)
@@ -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
index 136e53a43fb642902ec8d9168dfa7cd5898713a7..439c58fb2a45730f17b6e79e8cff7f978a77e6c8 100644 (file)
@@ -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
index 2bd13e22b2a470fbbad0307c5eb727ca4fa82bc1..4fac25d7bb6df3f602716faf25944faf1cc60488 100644 (file)
@@ -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
index c0cd45f7fe15eacfd88cdba1cea5fdaf9cf2c501..052707ae1bfc3e0a93c4d8e294bbb80f75aafe52 100644 (file)
@@ -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
index fe1185768dd5ef8b9a7b7fa5d9fd3fcec7201474..bcb0a17c019a6e770008353321ea8fa7c43ef4fe 100644 (file)
@@ -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
index 4ce87f773b1bf2901951712140f2f52b607737ae..c1bb7e3d15cef7d6b7ed986229d87a53b3e302ca 100644 (file)
@@ -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
index 0d5ec148b1f1a5d2307e09a5cb1581f5966cb726..c889a4c5967bdc4501c7143ac3c45ee71cd80145 100644 (file)
@@ -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
index d58b9b1c90807db0169ea7541e2221620c5efc07..36dd97190e1629b0b3f19243040285b5b7bd2d07 100644 (file)
@@ -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
index 3786350996f6aacf8f0fc53224245baa617e4068..c3309d8c75567d1efde2696ff29c5f969a6aa802 100644 (file)
@@ -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
index ffe2d54f58aaf0d92c5234ebc480f71fa79308f0..54401bfb2f00cae64910b0c39f25ec5347239edc 100644 (file)
@@ -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
index 31a00b8f739867d4c8980b4530a3ead811a35a2a..f742fede1a4b9db3bf5a2c14c2d7f3d6582dbf71 100644 (file)
@@ -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
index f57f96bec40dd910baf22336b69acebc672e7c3a..91311f32c5b2adcd4c3037e281ebdea163cdfc6c 100644 (file)
@@ -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
index cafba60abf6d36fad93e1a76199335090f66592a..87765e4db5f55dd8dfc71d3108241d963df35d79 100644 (file)
@@ -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