[PATCH v1 32/32] net/ntnic: revert untrusted loop bound

Serhii Iliushyk sil-plv at napatech.com
Thu Feb 20 23:03:56 CET 2025


The changes for untrusted loop bound breaks VLAN processing

This reverts commit 36cd2cb0eea49813dd59ee1df2eb592e8ae5b6b4.

Signed-off-by: Serhii Iliushyk <sil-plv at napatech.com>
---
 drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
index 70bff776be..43f45ebe34 100644
--- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
+++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
@@ -53,7 +53,7 @@ int interpret_raw_data(uint8_t *data, uint8_t *preserve, int size, struct rte_fl
 		goto interpret_end;
 
 	/* VLAN */
-	if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN) ||
+	while (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN) ||
 		ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_QINQ) ||
 		ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_QINQ1)) {
 		if (size - pkti == 0)
-- 
2.45.0



More information about the dev mailing list