Преглед изворни кода

qos-scripts: Allow classification by the traffic's source interface

This adds a "srciface" option that can be used on classification
rules in /etc/config/qos.  This is useful to allow prioritization
based on the local network from which the traffic originates, for
example to deprioritize traffic from a guest network.

Signed-off-by: Michael Marley <[email protected]>

SVN-Revision: 48446
Felix Fietkau пре 10 година
родитељ
комит
269ab387ff
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

+ 3 - 0
package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

@@ -141,6 +141,9 @@ parse_matching_rule() {
 					append "$var" "-i $device"
 					append "$var" "-i $device"
 				fi
 				fi
 			;;
 			;;
+			*:srciface)
+				append "$var" "-i $value"
+			;;
 			1:pktsize)
 			1:pktsize)
 				value="$(echo "$value" | sed -e 's,-,:,g')"
 				value="$(echo "$value" | sed -e 's,-,:,g')"
 				add_insmod xt_length
 				add_insmod xt_length