diff options
author | Vladimir Isaev <visaev@netgate.com> | 2020-02-18 15:26:12 +0300 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-02-20 09:12:52 +0000 |
commit | 1284f8c71da8ec35cba04351cf62cba7bdd7f847 (patch) | |
tree | 54cd46d45e4503c030737871431a35c60e1164e8 /test | |
parent | f145c15631ba62e798395499f83a2f8a91ae83c7 (diff) |
ip-neighbor: Fix aging timeout
Before this patch VPP checked age for ARP/NDP records every 1e5 seconds
for any configured aging time. This is 27 hours and it looks like
misprint because 1e5 is the number of 10us ticks in a second.
Also time to wait is now difference between aging time and time alive
for nodes in alive state.
Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ib5baa85032a44402d5f48c1145245260a42c7bae
Diffstat (limited to 'test')
-rw-r--r-- | test/test_neighbor.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/test_neighbor.py b/test/test_neighbor.py index d1fb8f83582..7157839127b 100644 --- a/test/test_neighbor.py +++ b/test/test_neighbor.py @@ -1731,7 +1731,7 @@ class NeighborAgeTestCase(VppTestCase): # # Set the neighbor configuration: # limi = 200 - # age = 2 seconds + # age = 0 seconds # recycle = false # self.vapi.ip_neighbor_config(af=vaf.ADDRESS_IP4, @@ -1809,6 +1809,27 @@ class NeighborAgeTestCase(VppTestCase): af=vaf.ADDRESS_IP4)) # + # load up some neighbours again with 2s aging enabled + # they should be removed after 10s (2s age + 4s for probes + gap) + # + for ii in range(10): + VppNeighbor(self, + self.pg0.sw_if_index, + self.pg0.remote_hosts[ii].mac, + self.pg0.remote_hosts[ii].ip4).add_vpp_config() + self.sleep(10) + self.assertFalse(self.vapi.ip_neighbor_dump(sw_if_index=0xffffffff, + af=vaf.ADDRESS_IP4)) + + # + # check if we can set age and recycle with empty neighbor list + # + self.vapi.ip_neighbor_config(af=vaf.ADDRESS_IP4, + max_number=200, + max_age=1000, + recycle=True) + + # # load up some neighbours again, then disable the aging # they should still be there in 10 seconds time # |