Skip to content
Snippets Groups Projects
Commit 62fefebd authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

fix bug wrong adding rule ebtables

parent d9336830
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ def drop_ebtables_rule(switch_name, mac_address):
:param mac_address: the output address to be dropped
"""
try:
subprocess.run(["sudo", "ebtables", "-I", "FORWARD", "--logical-in", switch_name, "-d", mac_address, "-j DROP"], check=True)
subprocess.run(["sudo", "ebtables", "-I", "FORWARD", "--logical-in", switch_name, "-d", mac_address, "-j", "DROP"], check=True)
return True
except subprocess.CalledProcessError as e:
print(f"Error executing command: {e}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment