You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2018/04/19 15:12:28 UTC

[incubator-trafficcontrol] branch master updated: Fixes hardcoded bond0 check in the ISO generation API. This fixes #2150.

This is an automated email from the ASF dual-hosted git repository.

neuman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 14af816  Fixes hardcoded bond0 check in the ISO generation API. This fixes #2150.
14af816 is described below

commit 14af8167efa6b926386eee76f180c592f07f6e6f
Author: Jeff Elsloo <je...@cable.comcast.com>
AuthorDate: Thu Apr 19 09:01:02 2018 -0600

    Fixes hardcoded bond0 check in the ISO generation API. This fixes #2150.
---
 traffic_ops/app/lib/API/Iso.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_ops/app/lib/API/Iso.pm b/traffic_ops/app/lib/API/Iso.pm
index 56c9dfd..c42cef7 100644
--- a/traffic_ops/app/lib/API/Iso.pm
+++ b/traffic_ops/app/lib/API/Iso.pm
@@ -157,7 +157,7 @@ sub generate_iso {
 	# BOND_DEVICE='em0'
 	# BONDOPTS='mode=802.3ad,lacp_rate=fast,xmit_hash_policy=layer3+4'
 	my $network_string = "IPADDR=\"$ipaddr\"\nNETMASK=\"$netmask\"\nGATEWAY=\"$gateway\"\nDEVICE=\"$interface_name\"\nMTU=\"$interface_mtu\"\nNAMESERVER=\"$nameservers\"\nHOSTNAME=\"$fqdn\"\nNETWORKING_IPV6=\"yes\"\nIPV6ADDR=\"$ip6_address\"\nIPV6_DEFAULTGW=\"$ip6_gateway\"\nDHCP=\"$dhcp\"";
-	if ($interface_name eq 'bond0'){
+	if ($interface_name =~ m/^bond\d+/) {
 		$network_string = "IPADDR=\"$ipaddr\"\nNETMASK=\"$netmask\"\nGATEWAY=\"$gateway\"\nBOND_DEVICE=\"$interface_name\"\nMTU=\"$interface_mtu\"\nNAMESERVER=\"$nameservers\"\nHOSTNAME=\"$fqdn\"\nNETWORKING_IPV6=\"yes\"\nIPV6ADDR=\"$ip6_address\"\nIPV6_DEFAULTGW=\"$ip6_gateway\"\nBONDING_OPTS=\"miimon=100 mode=4 lacp_rate=fast xmit_hash_policy=layer3+4\"\nDHCP=\"$dhcp\"";
 	}
 	# Write out the networking config:

-- 
To stop receiving notification emails like this one, please contact
neuman@apache.org.