From 15d866861cf80cc188c44c88db49c4d24d2f5613 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 24 Oct 2008 16:27:39 -0700 Subject: Fix dhcp on bonding Add more hacks to already fragile code that depends on interface name. When next type is added this needs to be reworked. Bugfix 3835 --- scripts/vyatta-interfaces.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 0c219c1..760cd4f 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -119,7 +119,9 @@ sub is_dhcp_enabled { my $config = new VyattaConfig; - if ($intf =~ m/^eth/) { + # FIXME: this is wrong and depends on name of interface -> type + # which is not dependable + if ($intf =~ m/^eth/ || $intf =~ m/^bond/) { if ($intf =~ m/(\w+)\.(\d+)/) { $config->setLevel("interfaces ethernet $1 vif $2"); } else { @@ -129,8 +131,8 @@ sub is_dhcp_enabled { $config->setLevel("interfaces bridge $intf"); } else { # - # currently we only support dhcp on ethernet - # and bridge interfaces. + # FIXME: currently we only support dhcp on ethernet + # and bridge interfaces (what about wireles, ...???) # return 0; } -- cgit v1.2.3