summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-24 16:27:39 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-24 16:27:39 -0700
commit15d866861cf80cc188c44c88db49c4d24d2f5613 (patch)
treeac873b6c81e69439bfba36a299349973faf534a9
parent07ac603a29d1157d0ed0d1629c2bf620b8846ef0 (diff)
downloadvyatta-cfg-15d866861cf80cc188c44c88db49c4d24d2f5613.tar.gz
vyatta-cfg-15d866861cf80cc188c44c88db49c4d24d2f5613.zip
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
-rw-r--r--scripts/vyatta-interfaces.pl8
1 files changed, 5 insertions, 3 deletions
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;
}