Commit 4a592629 authored by AdSchellevis's avatar AdSchellevis

small fix in captive portal rule generation

parent e4e8e26f
......@@ -130,7 +130,7 @@ class Rules
$this->rules[] = "# Allow traffic to this hosts static ip's ( 1001..1999 ) ";
$this->rules[] = "#======================================================================================";
foreach ($this->config->object()->interfaces->children() as $interface => $content) {
if ($interface != "wan" && $content->ipaddr != "dhcp") {
if ($interface != "wan" && $content->ipaddr != "dhcp" && trim($content->ipaddr) != "") {
// only keep state of dns traffic to prevent dns resolver failures
$this->rules[] = "add ".$rulenum++." allow udp from any to ".
$content->ipaddr." dst-port 53 keep-state";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment