From 910fbaa275caf72105eb4216cc7cbafde0bfc441 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 19 Dec 2007 20:35:10 +0000 Subject: [PATCH] Handle aliases without broadcast on FreeBSD --- net/CHANGELOG | 1 + net/freebsd-lib.pl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/CHANGELOG b/net/CHANGELOG index 60601d93f..b5e669b82 100644 --- a/net/CHANGELOG +++ b/net/CHANGELOG @@ -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. diff --git a/net/freebsd-lib.pl b/net/freebsd-lib.pl index f18771536..80f436eda 100644 --- a/net/freebsd-lib.pl +++ b/net/freebsd-lib.pl @@ -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'}};