Skip to content

Commit 5ed3246

Browse files
raveningRakesh Venkatesh
andauthored
Fix iptable rules in ubuntu 20 for bridge name (#5318)
In ubuntu20 the interface name contains @ synbol and because of that even the iptable rules for brdige name contains this symbol which causes ping issues. Remove the @ symbol from iptable rule to fix the issue Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
1 parent 6446797 commit 5ed3246

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/vm/network/security_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def destroy_network_rules_for_nic(vm_name, vm_ip, vm_mac, vif, sec_ips):
185185
logging.debug("Ignoring failure to delete ebtable rules for vm: " + vm_name)
186186

187187
def get_bridge_physdev(brname):
188-
physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: vnet/ {print $2}' | head -1 | cut -d ':' -f1" % brname)
188+
physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: vnet/ {print $2}' | head -1 | cut -d ':' -f1 | cut -d '@' -f1" % brname)
189189
return physdev.strip()
190190

191191

0 commit comments

Comments
 (0)