Skip to content

Commit

Permalink
Merge pull request #38 from woutervb/master
Browse files Browse the repository at this point in the history
Bug fix, handling interface options in shorewall6
  • Loading branch information
jcameron committed Jun 15, 2012
2 parents cdaf70c + 19de0a5 commit 71a8f49
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions shorewall6/shorewall6-lib.pl
Expand Up @@ -598,8 +598,6 @@ sub interfaces_row
{
return ( $_[1],
$_[0] eq '-' ? $text{'list_any'} : $_[0],
$_[2] eq 'detect' ? $text{'list_auto'} :
$_[2] eq '-' || $_[2] eq '' ? $text{'list_none'} : $_[2],
$_[3] ? $_[3] : $text{'list_none'} );
}

Expand All @@ -625,18 +623,19 @@ sub interfaces_form
&zone_field("zone", $_[0], 0, 1);
print "</td> </tr>\n";


# options
local %opts = map { $_, 1 } split(/,/, $_[2]);
local %opts = map { $_, 1 } split(/,/, $_[3]);
print "<tr> <td valign=top><b>$text{'interfaces_2'}</b></td> <td colspan=3>\n";
&options_input("opts", $_[2], \@interfaces_opts);
&options_input("opts", $_[3], \@interfaces_opts);
print "</td> </tr>\n";
}

sub interfaces_validate
{
$in{'iface'} =~ /^[a-z]+\d*(\.\d+)?$/ ||
$in{'iface'} =~ /^[a-z]+\+$/ || &error($text{'interfaces_eiface'});
return ( $in{'zone'}, $in{'iface'},
return ( $in{'zone'}, $in{'iface'}, '-',
join(",", split(/\0/, $in{'opts'})) );
}

Expand Down

0 comments on commit 71a8f49

Please sign in to comment.