Skip to content

Commit 7dbd06d

Browse files
committed
"ebtables-nft" MAC rule deletion failing
"ebtables-nft" is failing to delete the rule filtering by MAC address: Bridge chain: neutronMAC-test-veth024379, entries: 2, policy: DROP -i test-veth024379 --among-src fa:16:3e:47:87:0 -j RETURN -j DROP A workaround for this issue, that works with both "ebtables-nft" and "ebtables-legacy", is to flush the table and recreate the DROP rule. The MAC spoofing tables have two rules: the one filtering by MAC address and the default DROP rule. This workaround has the same effect as just deleting the filtering rule. Closes-Bug: #2038541 Change-Id: I38bd016c35d7a76d88c6eceec797d1cea84c45d1 (cherry picked from commit 1879d92)
1 parent 9200a6b commit 7dbd06d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

neutron/plugins/ml2/drivers/linuxbridge/agent/arp_protect.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ def _delete_vif_mac_rules(vif, current_rules):
201201
chain = _mac_chain_name(vif)
202202
for rule in current_rules:
203203
if '-i %s' % vif in rule and '--among-src' in rule:
204-
ebtables(['-D', chain] + rule.split())
204+
# Flush the table and recreate the default DROP rule.
205+
ebtables(['-F', chain])
206+
ebtables(['-A', chain, '-j', 'DROP'])
205207

206208

207209
def _delete_mac_spoofing_protection(vifs, current_rules, table, chain):

0 commit comments

Comments
 (0)