Browse Source

Merge "Revert iptables TCP checksum-fill code" into stable/rocky

changes/37/657937/1
Zuul 3 years ago committed by Gerrit Code Review
parent
commit
de95bc658e
  1. 10
      neutron/agent/metadata/driver.py
  2. 7
      neutron/tests/unit/agent/metadata/test_driver.py

10
neutron/agent/metadata/driver.py

@ -195,14 +195,6 @@ class MetadataDriver(object):
{'interface_name': namespaces.INTERNAL_DEV_PREFIX + '+',
'port': port})]
@classmethod
def metadata_checksum_rules(cls, port):
return [('POSTROUTING', '-o %(interface_name)s '
'-p tcp -m tcp --sport %(port)s -j CHECKSUM '
'--checksum-fill' %
{'interface_name': namespaces.INTERNAL_DEV_PREFIX + '+',
'port': port})]
@classmethod
def _get_metadata_proxy_user_group(cls, conf):
user = conf.metadata_proxy_user or str(os.geteuid())
@ -299,8 +291,6 @@ def after_router_added(resource, event, l3_agent, **kwargs):
router.iptables_manager.ipv4['filter'].add_rule(c, r)
for c, r in proxy.metadata_nat_rules(proxy.metadata_port):
router.iptables_manager.ipv4['nat'].add_rule(c, r)
for c, r in proxy.metadata_checksum_rules(proxy.metadata_port):
router.iptables_manager.ipv4['mangle'].add_rule(c, r)
router.iptables_manager.apply()
if not isinstance(router, ha_router.HaRouter):

7
neutron/tests/unit/agent/metadata/test_driver.py

@ -52,13 +52,6 @@ class TestMetadataDriverRules(base.BaseTestCase):
rules,
metadata_driver.MetadataDriver.metadata_filter_rules(9697, '0x1'))
def test_metadata_checksum_rules(self):
rules = ('POSTROUTING', '-o qr-+ -p tcp -m tcp --sport 9697 '
'-j CHECKSUM --checksum-fill')
self.assertEqual(
[rules],
metadata_driver.MetadataDriver.metadata_checksum_rules(9697))
class TestMetadataDriverProcess(base.BaseTestCase):

Loading…
Cancel
Save