From 2a7bc81ae302b02e8e0d4eec7db82c1ca15b7f7a Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Fri, 8 Mar 2024 09:27:40 +0100 Subject: vnet: fix ARP for unnumbered On unnumbered interfaces, ARP fails because there is no attached route. Allow replies to peer-to-peer addresses on unnumbered interfaces: eg. 192.0.2.1/32 <-> 192.0.2.2/32 Type: fix Change-Id: Ibeb8d8ebc8d58d5bfb0724739a17694e0217356e Signed-off-by: Pim van Pelt --- test/test_neighbor.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/test_neighbor.py b/test/test_neighbor.py index 7338eff86d3..6fcf13f8261 100644 --- a/test/test_neighbor.py +++ b/test/test_neighbor.py @@ -432,14 +432,24 @@ class ARPTestCase(VppTestCase): self.assertEqual(unnum[0].ip_sw_if_index, self.pg1.sw_if_index) self.assertEqual(unnum[0].sw_if_index, self.pg2.sw_if_index) - # - # We should respond to ARP requests for the unnumbered to address - # once an attached route to the source is known - # - self.send_and_assert_no_replies( - self.pg2, p, "ARP req for unnumbered address - no source" + # Allow for ARP requests from point-to-point ethernet neighbors + # without an attached route on pg2 + self.pg2.add_stream(p) + self.pg_enable_capture(self.pg_interfaces) + self.pg_start() + + rx = self.pg2.get_capture(1) + self.verify_arp_resp( + rx[0], + self.pg2.local_mac, + self.pg2.remote_mac, + self.pg1.local_ip4, + self.pg2.remote_hosts[3].ip4, ) + # + # Allow for ARP requests from neighbors on unnumbered with + # an attached route on pg2 attached_host = VppIpRoute( self, self.pg2.remote_hosts[3].ip4, -- cgit 1.2.3-korg