diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-06-13 14:48:40 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-06-13 14:48:40 +0000 |
commit | 517feb1c30c1a70e64c4deef05b811413d7cbfe1 (patch) | |
tree | a01ddca5a7f0fadbea714640417f4b15a3e32541 /etc/inc | |
parent | 35380504627cde962d1f509e494a0ba7112a0333 (diff) | |
download | pfsense-517feb1c30c1a70e64c4deef05b811413d7cbfe1.zip pfsense-517feb1c30c1a70e64c4deef05b811413d7cbfe1.tar.gz |
Iterate the vlan entries by number, the rest of the code still relies on this.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 19b63e3..8632aaf 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -48,11 +48,15 @@ function interfaces_loopback_configure() { function interfaces_vlan_configure() { global $config; + $i = 0; if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { - - foreach ($config['vlans']['vlan'] as $vlan) + foreach ($config['vlans']['vlan'] as $vlan) { + if(empty($vlan['vlanif'])) { + $vlan['vlanif'] = "vlan{$i}"; + } /* XXX: Maybe we should report any errors?! */ interface_vlan_configure($vlan['if'], $vlan['tag'], $vlan['vlanif']); + } } } |