From 32c7d84d1e5f084d18cbca61ec93c8c2162ff13a Mon Sep 17 00:00:00 2001 From: Chitprasong Vilaysack Date: Wed, 6 May 2026 14:48:48 +0000 Subject: [PATCH] ci: cram: qos classification output interface update The X_PRPLWARE-COM_OutputInterface parameter change was not covered by any cram test. This commit adds a test to verify that changing X_PRPLWARE-COM_OutputInterface on an existing QoS classification updates the iptables mangle rule immediately without restarting tr181-qos. References: PPW-1346 Signed-off-by: Chitprasong Vilaysack --- .../046-qos-classification.t | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitlab/tests/cram/generic/acceleration-plan-components/046-qos-classification.t b/.gitlab/tests/cram/generic/acceleration-plan-components/046-qos-classification.t index e4ca9ff25c..52e74fd252 100644 --- a/.gitlab/tests/cram/generic/acceleration-plan-components/046-qos-classification.t +++ b/.gitlab/tests/cram/generic/acceleration-plan-components/046-qos-classification.t @@ -39,3 +39,27 @@ Check that the created firewall rule and routing policy are deleted in the LL AP $ R "ip rule | grep 500" [1] +Check that changing X_PRPLWARE-COM_OutputInterface updates the mangle table rule without restarting tr181-qos: + $ R "ba-cli 'QoS.Classification.lansubnet1.Enable = true'" > /dev/null + +Check initial rule has no output interface filter: + $ R "iptables -t mangle -nvL FORWARD_class | awk '/MARK/ {print \$6,\$7}'" + * * + +Set X_PRPLWARE-COM_OutputInterface to Logical.Interface.1 (resolves to wan): + $ R "ubus-cli 'QoS.Classification.lansubnet1.X_PRPLWARE-COM_OutputInterface=Logical.Interface.1.'" > /dev/null + +Check the rule now filters on output interface wan without tr181-qos restart: + $ R "iptables -t mangle -nvL FORWARD_class | awk '/MARK/ {print \$6,\$7}'" + * wan + +Change X_PRPLWARE-COM_OutputInterface to Logical.Interface.2 (resolves to br-lan): + $ R "ubus-cli 'QoS.Classification.lansubnet1.X_PRPLWARE-COM_OutputInterface=Logical.Interface.2.'" > /dev/null + +Check the rule reflects the new output interface (br-lan) without tr181-qos restart: + $ R "iptables -t mangle -nvL FORWARD_class | awk '/MARK/ {print \$6,\$7}'" + * br-lan + +Restore original configuration: + $ R "ba-cli 'QoS.Classification.lansubnet1.X_PRPLWARE-COM_OutputInterface = \"\"'" > /dev/null + $ R "ba-cli 'QoS.Classification.lansubnet1.Enable = false'" > /dev/null