Merge "Install more-specific ICMPv6 rule in DVR routers"
This commit is contained in:
commit
4895cac7bd
|
@ -29,6 +29,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron.common import constants
|
||||
|
||||
|
||||
class OVSDVRProcessMixin(object):
|
||||
"""Common logic for br-tun and br-phys' DVR_PROCESS tables.
|
||||
|
@ -58,6 +60,7 @@ class OVSDVRProcessMixin(object):
|
|||
priority=3,
|
||||
dl_vlan=vlan_tag,
|
||||
proto='icmp6',
|
||||
icmp_type=constants.ICMPV6_TYPE_RA,
|
||||
dl_src=gateway_mac,
|
||||
actions='drop')
|
||||
|
||||
|
@ -65,6 +68,7 @@ class OVSDVRProcessMixin(object):
|
|||
self.delete_flows(table=self.dvr_process_table_id,
|
||||
dl_vlan=vlan_tag,
|
||||
proto='icmp6',
|
||||
icmp_type=constants.ICMPV6_TYPE_RA,
|
||||
dl_src=gateway_mac)
|
||||
|
||||
def install_dvr_process(self, vlan_tag, vif_mac, dvr_mac_address):
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
import mock
|
||||
|
||||
from neutron.common import constants
|
||||
|
||||
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent \
|
||||
import ovs_test_base
|
||||
|
||||
|
@ -112,7 +114,8 @@ class OVSDVRProcessTestMixin(object):
|
|||
expected = [
|
||||
call.add_flow(table=self.dvr_process_table_id,
|
||||
proto='icmp6', dl_src=gateway_mac, actions='drop',
|
||||
priority=3, dl_vlan=vlan_tag),
|
||||
priority=3, dl_vlan=vlan_tag,
|
||||
icmp_type=constants.ICMPV6_TYPE_RA),
|
||||
]
|
||||
self.assertEqual(expected, self.mock.mock_calls)
|
||||
|
||||
|
@ -124,7 +127,8 @@ class OVSDVRProcessTestMixin(object):
|
|||
expected = [
|
||||
call.delete_flows(table=self.dvr_process_table_id,
|
||||
dl_vlan=vlan_tag, dl_src=gateway_mac,
|
||||
proto='icmp6'),
|
||||
proto='icmp6',
|
||||
icmp_type=constants.ICMPV6_TYPE_RA),
|
||||
]
|
||||
self.assertEqual(expected, self.mock.mock_calls)
|
||||
|
||||
|
|
Loading…
Reference in New Issue