diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-24 16:27:39 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-24 16:27:39 -0700 |
commit | 15d866861cf80cc188c44c88db49c4d24d2f5613 (patch) | |
tree | ac873b6c81e69439bfba36a299349973faf534a9 | |
parent | 07ac603a29d1157d0ed0d1629c2bf620b8846ef0 (diff) | |
download | vyatta-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.pl | 8 |
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; } |