arp: update error reason when checking for proxy-arp 06/37106/2
authorBenoît Ganne <bganne@cisco.com>
Mon, 12 Sep 2022 15:56:16 +0000 (17:56 +0200)
committerNeale Ranns <neale@graphiant.com>
Mon, 19 Sep 2022 01:25:15 +0000 (01:25 +0000)
When we follow arp feature arc for proxy-arp, we should still update
the error reason in case proxy-arp cannot handle the arp request and
drops it.

Type: improvement

Change-Id: I046df017ca2056cfc12af0f0a968b401058bcd6d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/arp/arp.c
test/test_neighbor.py

index 6319f88..ce3eb39 100644 (file)
@@ -658,7 +658,6 @@ arp_reply (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
 
        next_feature:
          vnet_feature_next (&next0, p0);
-         goto enqueue;
 
        drop:
          p0->error = node->errors[error0];
index 503b1f1..58d98a3 100644 (file)
@@ -1762,6 +1762,10 @@ class ARPTestCase(VppTestCase):
         #
         self.pg2.configure_ipv4_neighbors()
 
+        cntr = self.statistics.get_err_counter(
+            "/err/arp-reply/l3_dst_address_not_local"
+        )
+
         for op in ["is-at", "who-has"]:
             p1 = [
                 (
@@ -1793,7 +1797,7 @@ class ARPTestCase(VppTestCase):
 
         # they are all dropped because the subnet's don't match
         self.assertEqual(
-            4,
+            cntr + 4,
             self.statistics.get_err_counter("/err/arp-reply/l3_dst_address_not_local"),
         )