Skip to content

Commit f0b0b34

Browse files
committed
Fix leftover multicast route issue
1 parent a5c80e4 commit f0b0b34

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,11 @@ protected void deleteVnetBr(String brName, boolean deleteBr) {
383383
String scriptPath = null;
384384
if (cmdout != null && cmdout.contains("vxlan")) {
385385
scriptPath = _modifyVxlanPath;
386+
// Read the pif from the VXLAN device.
387+
String vxlanPif = getVxlanPif(vNetId);
388+
if (vxlanPif != null) {
389+
pName = vxlanPif;
390+
}
386391
} else {
387392
scriptPath = _modifyVlanPath;
388393
}
@@ -403,6 +408,10 @@ protected void deleteVnetBr(String brName, boolean deleteBr) {
403408
}
404409
}
405410

411+
protected String getVxlanPif(String vxlanId) {
412+
return Script.runSimpleBashScript("ip -d link show vxlan" + vxlanId + " | grep -o 'dev [^ ]*' | cut -d' ' -f2");
413+
}
414+
406415
private void deleteExistingLinkLocalRouteTable(String linkLocalBr) {
407416
Script command = new Script("/bin/bash", _timeout);
408417
command.add("-c");

0 commit comments

Comments
 (0)