linux-cp: don't drain nl-messages during processing 39/43639/2
authorАртем Глазычев <[email protected]>
Tue, 26 Aug 2025 12:04:58 +0000 (15:04 +0300)
committerMatthew Smith <[email protected]>
Thu, 4 Sep 2025 12:44:46 +0000 (12:44 +0000)
When we process the incoming netlink message queue and have NEW_LINK for a VLAN interface, we call lcp_itf_pair_add.
Internally, drain is called, which corrupts the original vector (probably due to reallocation)

Type: fix

Change-Id: I0487bfb2939a04d8d3c156725086fedd6e9c72c7
Signed-off-by: Artem Glazychev <[email protected]>
src/plugins/linux-cp/lcp_nl.c

index 55d2ea5..95e1adc 100644 (file)
@@ -756,7 +756,8 @@ lcp_nl_drain_messages (void)
 void
 lcp_nl_pair_add_cb (lcp_itf_pair_t *pair)
 {
-  lcp_nl_drain_messages ();
+  if (!lcp_get_netlink_processing_active ())
+    lcp_nl_drain_messages ();
 }
 
 static clib_error_t *