summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc16
1 files changed, 15 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 3559c0b..c3e9652 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3717,4 +3717,18 @@ function find_dns_aliases() {
}
}
-?> \ No newline at end of file
+function is_fqdn($fqdn) {
+ $hostname = false;
+ if(preg_match("/[-A-Z0-9\.]+\.[-A-Z0-9\.]+/i", $fqdn)) {
+ $hostname = true;
+ }
+ if(preg_match("/\.\./", $fqdn)) {
+ $hostname = false;
+ }
+ if(preg_match("/^\./i", $fqdn)) {
+ $hostname = false;
+ }
+ return($hostname);
+}
+
+?>
OpenPOWER on IntegriCloud