Merge "Consume constant from neutron-lib: DHCPV6_CLIENT_PORT"
This commit is contained in:
commit
418e3f398b
@ -1569,7 +1569,7 @@ class DeviceManager(object):
|
||||
ipv4_rule = ('-p udp -m udp --dport %d -j CHECKSUM --checksum-fill'
|
||||
% constants.DHCP_RESPONSE_PORT)
|
||||
ipv6_rule = ('-p udp -m udp --dport %d -j CHECKSUM --checksum-fill'
|
||||
% n_const.DHCPV6_CLIENT_PORT)
|
||||
% constants.DHCPV6_CLIENT_PORT)
|
||||
iptables_mgr.ipv4['mangle'].add_rule('POSTROUTING', ipv4_rule)
|
||||
iptables_mgr.ipv6['mangle'].add_rule('POSTROUTING', ipv6_rule)
|
||||
iptables_mgr.apply()
|
||||
|
@ -187,9 +187,6 @@ IP_ALLOWED_VERSIONS = [lib_constants.IP_VERSION_4, lib_constants.IP_VERSION_6]
|
||||
PORT_RANGE_MIN = 1
|
||||
PORT_RANGE_MAX = 65535
|
||||
|
||||
# TODO(bence romsics): move this to neutron_lib.constants
|
||||
DHCPV6_CLIENT_PORT = 546
|
||||
|
||||
# Configuration values for accept_ra sysctl, copied from linux kernel
|
||||
# networking (netdev) tree, file Documentation/networking/ip-sysctl.txt
|
||||
#
|
||||
|
@ -33,7 +33,6 @@ from neutron.agent.linux import dhcp
|
||||
from neutron.agent.linux import interface
|
||||
from neutron.agent.metadata import driver as metadata_driver
|
||||
from neutron.common import config as common_config
|
||||
from neutron.common import constants as n_const
|
||||
from neutron.common import utils
|
||||
from neutron.conf.agent import common as config
|
||||
from neutron.conf.agent import dhcp as dhcp_config
|
||||
@ -1734,7 +1733,7 @@ class TestDeviceManager(base.BaseTestCase):
|
||||
def test_setup_calls_fill_dhcp_udp_checksums_v6(self):
|
||||
self._test_setup_helper(False)
|
||||
rule = ('-p udp -m udp --dport %d -j CHECKSUM --checksum-fill'
|
||||
% n_const.DHCPV6_CLIENT_PORT)
|
||||
% const.DHCPV6_CLIENT_PORT)
|
||||
expected = [mock.call.add_rule('POSTROUTING', rule)]
|
||||
self.mangle_inst_v6.assert_has_calls(expected)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user