diff options
author | Scott Ullrich <sullrich@G5.local> | 2009-10-25 20:06:29 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@G5.local> | 2009-10-25 20:06:29 -0400 |
commit | 77ccab82c0b354ee5fd7d877356f7f18f7d33071 (patch) | |
tree | 1fbe5cf0e55893dcfbec140246ae24ea9838b21d /etc | |
parent | 23557bc3f640fe5e0b0ebd3b416ab7a4fbb6f2b6 (diff) | |
download | pfsense-77ccab82c0b354ee5fd7d877356f7f18f7d33071.zip pfsense-77ccab82c0b354ee5fd7d877356f7f18f7d33071.tar.gz |
On second look, turn on PPP interfaces at the get_interfaces_with_gateway level
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 2 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 40 |
2 files changed, 23 insertions, 19 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 0b67a78..f7d10ae 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -945,7 +945,7 @@ function filter_nat_rules_generate() if ($numberofnathosts > 0): foreach ($FilterIflist as $if => $ifcfg) { update_filter_reload_status("Creating outbound rules {$if} - ({$ifcfg['descr']})"); - if (interface_has_gateway($if) or $config['interfaces'][$if]['serialport']) { + if (interface_has_gateway($if)) { $target = $ifcfg['ip']; /* do not nat tftp proxy */ $natrules .= "no nat on \${$ifcfg['descr']} to port tftp\n"; diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 4a38327..26687e8 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2572,28 +2572,32 @@ function get_interface_subnet($interface = "wan") /* return outside interfaces with a gateway */ function get_interfaces_with_gateway() { - global $config; + global $config; $ints = array(); /* loop interfaces, check config for outbound */ - foreach ($config['interfaces'] as $ifdescr => $ifname) { - switch ($ifname['ipaddr']) { - case "dhcp": - case "carpdev-dhcp": - case "pppoe": - case "pptp": - $ints[] = $ifdescr; - break; - default: - if ($ifname['pointtopoint']) - $ints[] = $ifdescr; - else if (!empty($ifname['gateway'])) - $ints[] = $ifdescr; - break; - } - } - return $ints; + foreach($config['interfaces'] as $ifdescr => $ifname) { + if($ifname['serialport']) { + $ints[] = $ifdescr; + continue; + } + switch ($ifname['ipaddr']) { + case "dhcp": + case "carpdev-dhcp": + case "pppoe": + case "pptp": + $ints[] = $ifdescr; + break; + default: + if ($ifname['pointtopoint']) + $ints[] = $ifdescr; + else if (!empty($ifname['gateway'])) + $ints[] = $ifdescr; + break; + } + } + return $ints; } /* return true if interface has a gateway */ |