From c6822b3ad5a0b93d784d24fe7a0703616aae8ba5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 7 Feb 2006 04:21:02 +0000 Subject: [PATCH] webif: add validation for single ports SVN-Revision: 3173 --- openwrt/package/webif/files/usr/lib/webif/validate.awk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openwrt/package/webif/files/usr/lib/webif/validate.awk b/openwrt/package/webif/files/usr/lib/webif/validate.awk index 69f77c6da6..60b5915e24 100644 --- a/openwrt/package/webif/files/usr/lib/webif/validate.awk +++ b/openwrt/package/webif/files/usr/lib/webif/validate.awk @@ -70,6 +70,14 @@ $1 == "mac" { } } +$1 == "port" { + valid_type = 1 + if (value !~ /^[0-9]*$/) { + valid = 0 + verr = "@TR<>" + } +} + $1 == "ports" { valid_type = 1 n = split(value ",", ports, ",") -- 2.30.2