Skip to content

Commit

Permalink
Make default MTU clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Aug 27, 2008
1 parent 26f7e07 commit 9a32259
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion net/edit_bifc.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ else {

# MTU
if (&can_edit("mtu", $b) && $access{'mtu'}) {
$mtufield = &ui_textbox("mtu", $b ? $b->{'mtu'} : $config{'def_mtu'},8);
$mtufield = &ui_opt_textbox(
"mtu", $b ? $b->{'mtu'} : $config{'def_mtu'}, 8);
}
else {
$mtufield = $b && $b->{'mtu'} ? $b->{'mtu'} : undef;
Expand Down
5 changes: 3 additions & 2 deletions net/save_bifc.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ else {
}
elsif (&can_edit("mtu", $b) && $access{'mtu'}) {
$auto && !$in{'mtu'} ||
$in{'mtu'} =~ /^\d*$/ ||
$in{'mtu_def'} ||
$in{'mtu'} =~ /^\d+$/ ||
&error(&text('bifc_emtu', $in{'mtu'}));
$b->{'mtu'} = $in{'mtu'};
$b->{'mtu'} = $in{'mtu_def'} ? undef : $in{'mtu'};
}

if ($in{'new'} && !$access{'up'} ||
Expand Down

0 comments on commit 9a32259

Please sign in to comment.