mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5280: fix issue in getBroadcastUriFromBridge
This commit is contained in:
parent
1fe8efc85f
commit
96842475d9
|
|
@ -1682,14 +1682,14 @@ ServerResource {
|
|||
|
||||
private String getBroadcastUriFromBridge(String brName) {
|
||||
String pif= matchPifFileInDirectory(brName);
|
||||
Pattern pattern = Pattern.compile("(\\D+)(\\d+)");
|
||||
Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)");
|
||||
Matcher matcher = pattern.matcher(pif);
|
||||
if(matcher.find()) {
|
||||
if (brName.startsWith("brvx")){
|
||||
return BroadcastDomainType.Vxlan.toUri(matcher.group(2)).toString();
|
||||
}
|
||||
else{
|
||||
return BroadcastDomainType.Vlan.toUri(matcher.group(2)).toString();
|
||||
return BroadcastDomainType.Vlan.toUri(matcher.group(4)).toString();
|
||||
}
|
||||
} else {
|
||||
s_logger.debug("failed to get vNet id from bridge " + brName
|
||||
|
|
|
|||
Loading…
Reference in New Issue