Handle aliases without broadcast on FreeBSD

This commit is contained in:
Jamie Cameron
2007-12-19 20:35:10 +00:00
parent 3838d2b810
commit 910fbaa275
2 changed files with 3 additions and 2 deletions

View File

@@ -36,3 +36,4 @@ Added support for VLANs and channel bonding on Debian, thanks to Tim Oberfoell.
Boot-time network interfaces can have comments on Redhat-based systems.
The list of interfaces is now separated into active and boot time using tabs.
The Apply Configuration button on FreeBSD now properly deletes virtual interfaces that should no longer exist.
Handle alias interfaces with no broadcast address on FreeBSD.

View File

@@ -53,11 +53,11 @@ foreach $l (@lines) {
local %vtaken = map { $_->{'virtual'}, 1 }
grep { $_->{'name'} eq $vifc{'name'} &&
$_->{'virtual'} ne "" } @boot;
while($l =~ s/inet\s+(\S+)\s+netmask\s+(\S+)\s+broadcast\s+(\S+)//) {
while($l =~ s/inet\s+(\S+)\s+netmask\s+(\S+)(\s+broadcast\s+(\S+))?//) {
local %vifc = %ifc;
$vifc{'address'} = $1;
$vifc{'netmask'} = &parse_hex($2);
$vifc{'broadcast'} = $3;
$vifc{'broadcast'} = $4;
$vifc{'up'} = 1;
$vifc{'edit'} = $ifc{'edit'};
local $boot = $boot{$vifc{'address'}};