diff options
author | Chris Buechler <cmb@pfsense.org> | 2009-02-08 21:11:57 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2009-02-08 21:35:27 -0500 |
commit | a6185636871e00cb7c90d88a07e1f664b719f104 (patch) | |
tree | 72a24a649bc4f831eda7aa83692563d94952034e /etc/inc/interfaces.inc | |
parent | 4e47b62eaa8dc228968fe500b78a5c206ab01c57 (diff) | |
download | pfsense-a6185636871e00cb7c90d88a07e1f664b719f104.zip pfsense-a6185636871e00cb7c90d88a07e1f664b719f104.tar.gz |
add support for IP-less interfaces (primarily for assigning tun interfaces for filtering purposes).
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 0bcfd16..a70919d 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -275,6 +275,9 @@ function interfaces_optional_configure_if($opti) { /* if user has selected DHCP type then act accordingly */ if($optcfg['ipaddr'] == "dhcp") { interfaces_opt_dhcp_configure("opt{$opti}"); + } elseif ($optcfg['ipaddr'] == "none") { + /* hidden trick for IP-less interfaces */ + mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) . " up"); } else { mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) . " " . escapeshellarg($optcfg['ipaddr'] . "/" . $optcfg['subnet'])); |