END
;
# Fill the table header with all activated zones
foreach (@zones) {
my $uc = uc $_;
- my $dev_name = $ethsettings{"${uc}_DEV"};
+ my $dev_name = $ethsettings{"${uc}_DEV"};
- if ($dev_name eq "") { # If the zone is not activated, don't show it
- next;
- }
+ if ($dev_name eq "") { # If the zone is not activated, don't show it
+ next;
+ }
- # If the zone is in PPP mode, don't show a mode dropdown
- if ($uc eq "RED") {
+ # If the zone is in PPP mode, don't show a mode dropdown
+ if ($uc eq "RED") {
my $red_type = $ethsettings{"RED_TYPE"};
my $red_restricted = ($uc eq "RED" && ! ($red_type eq "STATIC" || $red_type eq "DHCP"));
@@ -360,49 +360,49 @@ print "
";
my $slightlygrey = "";
foreach (@nics) {
- my $mac = $_->[0];
+ my $mac = $_->[0];
my $nic = $_->[1];
- my $wlan = $_->[2];
+ my $wlan = $_->[2];
print "
$nic $mac
";
- # Iterate through all zones and check if the current NIC is assigned to it
- foreach (@zones) {
- my $uc = uc $_;
- my $dev_name = $ethsettings{"${uc}_DEV"};
+ # Iterate through all zones and check if the current NIC is assigned to it
+ foreach (@zones) {
+ my $uc = uc $_;
+ my $dev_name = $ethsettings{"${uc}_DEV"};
- if ($dev_name eq "") { # Again, skip the zone if it is not activated
- next;
- }
+ if ($dev_name eq "") { # Again, skip the zone if it is not activated
+ next;
+ }
- if ($uc eq "RED") {
- my $red_type = $ethsettings{"RED_TYPE"};
- my $red_restricted = ($uc eq "RED" && ! ($red_type eq "STATIC" || $red_type eq "DHCP"));
+ if ($uc eq "RED") {
+ my $red_type = $ethsettings{"RED_TYPE"};
+ my $red_restricted = ($uc eq "RED" && ! ($red_type eq "STATIC" || $red_type eq "DHCP"));
- # VLANs/Bridging is not possible if the RED interface is set to PPP, PPPoE, VDSL, ...
- if ($red_restricted) {
- my $checked = "";
+ # VLANs/Bridging is not possible if the RED interface is set to PPP, PPPoE, VDSL, ...
+ if ($red_restricted) {
+ my $checked = "";
if ($mac eq $ethsettings{"${uc}_MACADDR"}) {
$checked = "checked";
}
print "
";
- next; # We're done here
- }
- }
+ next; # We're done here
+ }
+ }
- my %access_selected = ();
- my $zone_mode = $ethsettings{"${uc}_MODE"};
- my $zone_parent_dev = $vlansettings{"${uc}_PARENT_DEV"}; # ZONE_PARENT_DEV is set if this zone accesses any interface via a VLAN
- my $field_disabled = "disabled"; # Only enable the VLAN ID input field if the current access mode is VLAN
+ my %access_selected = ();
+ my $zone_mode = $ethsettings{"${uc}_MODE"};
+ my $zone_parent_dev = $vlansettings{"${uc}_PARENT_DEV"}; # ZONE_PARENT_DEV is set if this zone accesses any interface via a VLAN
+ my $field_disabled = "disabled"; # Only enable the VLAN ID input field if the current access mode is VLAN
my $zone_vlan_id = "";
- # If ZONE_PARENT_DEV is set to a NICs name (e.g. green0 or eth0) instead of a MAC address, we have to find out this NICs MAC address
- $zone_parent_dev = &Network::get_mac_by_name($zone_parent_dev);
+ # If ZONE_PARENT_DEV is set to a NICs name (e.g. green0 or eth0) instead of a MAC address, we have to find out this NICs MAC address
+ $zone_parent_dev = &Network::get_mac_by_name($zone_parent_dev);
- # If the current NIC is accessed by the current zone via a VLAN, the ZONE_PARENT_DEV option corresponds to the current NIC
- if ($mac eq $zone_parent_dev) {
+ # If the current NIC is accessed by the current zone via a VLAN, the ZONE_PARENT_DEV option corresponds to the current NIC
+ if ($mac eq $zone_parent_dev) {
$access_selected{"VLAN"} = "selected";
$field_disabled = "";
$zone_vlan_id = $vlansettings{"${uc}_VLAN_ID"};
@@ -422,36 +422,36 @@ foreach (@nics) {
$access_selected{"NATIVE"} = "selected";
}
- $access_selected{"NONE"} = ($access_selected{"NATIVE"} eq "") && ($access_selected{"VLAN"} eq "") ? "selected" : "";
+ $access_selected{"NONE"} = ($access_selected{"NATIVE"} eq "") && ($access_selected{"VLAN"} eq "") ? "selected" : "";
my $vlan_disabled = ($wlan) ? "disabled" : "";
- print <
-
-
-
+ print <
+
+
+
END
;
- }
+ }
- print "