Fix XXX. Do not allow DHCP out WAN if interface is not selected for DHCP.

This commit is contained in:
Scott Ullrich 2006-01-19 00:15:20 +00:00
parent 6f703733b6
commit 61438a1e2c

View File

@ -1520,15 +1520,16 @@ pass out quick on {$wancfg['if']} proto tcp from any to any port = 1723 flags S/
EOD;
}
$ipfrules .= <<<EOD
if ($wancfg['ipaddr'] == "dhcp") {
$ipfrules .= <<<EOD
# allow our DHCP client out to the WAN
# XXX - should be more restrictive
# (not possible at the moment - need 'me' like in ipfw)
anchor "wandhcp"
pass out quick on $wanif proto udp from any port = 68 to any port = 67 label "allow dhcp client out wan"
EOD;
}
if($config['interfaces']['lan']['bridge'] <> "wan" and $config['interfaces']['wan']['bridge'] <> "lan")
$ipfrules .= "block in $log quick on $wanif proto udp from any port = 67 to {$lansa_sn_combo} port = 68 label \"allow dhcp client out wan\"\n";