Revert "Allow '-' in the interface for dynamic zone."

This reverts commit b68b34b820.
This commit is contained in:
Tom Eastep 2012-09-30 16:25:35 -07:00
parent 4ef81041be
commit 30d4ba67cc

View File

@ -891,14 +891,8 @@ sub is_a_bridge( $ ) {
#
# Transform the passed interface name into a legal shell variable name.
#
sub unclean_name( $$ ) {
my ( $name, $allow_cash ) = @_;
$allow_cash ? $name =~ /[^-\w]/ : $name =~ /[^\w]/;
}
sub chain_base($;$) {
my ( $chain, $allow_dash ) = @_;
sub chain_base($) {
my $chain = $_[0];
my $name = $basemap{$chain};
#
# Return existing mapping, if any
@ -914,7 +908,7 @@ sub chain_base($;$) {
$chain =~ s/\+$//;
$chain =~ tr/./_/;
if ( $chain eq '' || $chain =~ /^[0-9]/ || unclean_name( $chain, $allow_cash ) ) {
if ( $chain eq '' || $chain =~ /^[0-9]/ || $chain =~ /[^\w]/ ) {
#
# Must map. Remove all illegal characters
#
@ -1845,7 +1839,7 @@ sub process_host( ) {
if ( $hosts eq 'dynamic' ) {
fatal_error "Vserver zones may not be dynamic" if $type & VSERVER;
require_capability( 'IPSET_MATCH', 'Dynamic nets', '');
my $physical = chain_base( physical_name $interface , 1 );
my $physical = chain_base( physical_name $interface );
my $set = $family == F_IPV4 ? "${zone}_${physical}" : "6_${zone}_${physical}";
$hosts = "+$set";
$optionsref->{dynamic} = 1;