]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Correct MAC representation to match iptables output
authorKevin Benton <blak111@gmail.com>
Mon, 5 Oct 2015 13:37:40 +0000 (06:37 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Tue, 6 Oct 2015 07:15:02 +0000 (07:15 +0000)
commit5cab062465af06be3827de4e7f9014ab1040bdbf
treef0ab0d55fd45033bbb193334345b3176af556757
parent3829ec5b80cebab654be05805050bb7b274ba693
Correct MAC representation to match iptables output

We were previously using the netaddr's mac_unix format
(which leaves off leading 0's) to generate iptables rules
based on MAC addresses. While iptables accepts this format,
it's not returned this way in the output so the iptables
rule matching code would never find the match for these
rules, causing the loss of counters on these rules on every
reload.

This patch corrects this with a custom dialect that matches
the iptables format.

Closes-Bug: #1502901
Change-Id: Ia45ebde8c4684e12030469323e18367a54d1518b
neutron/agent/linux/iptables_firewall.py
neutron/tests/unit/agent/linux/test_iptables_firewall.py