diff -Nru neutron-17.2.0/debian/changelog neutron-17.2.0/debian/changelog --- neutron-17.2.0/debian/changelog 2021-07-28 23:00:48.000000000 +0200 +++ neutron-17.2.0/debian/changelog 2021-09-17 15:03:48.000000000 +0200 @@ -1,3 +1,9 @@ +neutron (2:17.2.0-0ubuntu1~cloud1ubuntu1) focal; urgency=medium + + * Trivial: check if ipv6 is available for IptablesManager (LP: #1915480) + + -- Alin-Gabriel Serdean Fri, 17 Sep 2021 15:03:48 +0200 + neutron (2:17.2.0-0ubuntu1~cloud1) focal-victoria; urgency=medium * d/p/revert-l3-ha-retry-when-setting-ha-router-gw-status.patch: Revert diff -Nru neutron-17.2.0/debian/patches/6adfdd74.diff neutron-17.2.0/debian/patches/6adfdd74.diff --- neutron-17.2.0/debian/patches/6adfdd74.diff 1970-01-01 01:00:00.000000000 +0100 +++ neutron-17.2.0/debian/patches/6adfdd74.diff 2021-09-17 15:03:48.000000000 +0200 @@ -0,0 +1,55 @@ +From 6adfdd74f4ae4ca2426602c8041eab354975b3ac Mon Sep 17 00:00:00 2001 +From: Alin-Gabriel Serdean +Date: Fri, 13 Aug 2021 11:43:02 +0300 +Subject: [PATCH] Trivial: check if ipv6 is available for IptablesManager + +Conflicts: + neutron/agent/ovn/metadata/agent.py + +To resolve conflict, rearrange alphabetically the imports from +oslo_utils. + +Change-Id: I3caf131041a852671a556b064c641fe34f8f5ed0 +Closes-Bug: #1915480 +(cherry picked from commit 6cf71cbd6a71b4849470874379877c7ca2a8fc25) +--- + +diff --git a/neutron/agent/linux/dhcp.py b/neutron/agent/linux/dhcp.py +index a8a6b16..84293f8 100644 +--- a/neutron/agent/linux/dhcp.py ++++ b/neutron/agent/linux/dhcp.py +@@ -1798,9 +1798,9 @@ + + def fill_dhcp_udp_checksums(self, namespace): + """Ensure DHCP reply packets always have correct UDP checksums.""" +- iptables_mgr = iptables_manager.IptablesManager(use_ipv6=True, +- nat=False, +- namespace=namespace) ++ iptables_mgr = iptables_manager.IptablesManager( ++ use_ipv6=netutils.is_ipv6_enabled(), nat=False, ++ namespace=namespace) + ipv4_rule = ('-p udp -m udp --dport %d -j CHECKSUM --checksum-fill' + % constants.DHCP_CLIENT_PORT) + ipv6_rule = ('-p udp -m udp --dport %d -j CHECKSUM --checksum-fill' +diff --git a/neutron/agent/ovn/metadata/agent.py b/neutron/agent/ovn/metadata/agent.py +index 9b709af..b406263 100644 +--- a/neutron/agent/ovn/metadata/agent.py ++++ b/neutron/agent/ovn/metadata/agent.py +@@ -19,6 +19,7 @@ + from neutron_lib import constants as n_const + from oslo_concurrency import lockutils + from oslo_log import log ++from oslo_utils import netutils + from oslo_utils import uuidutils + from ovsdbapp.backend.ovs_idl import event as row_event + from ovsdbapp.backend.ovs_idl import vlog +@@ -390,7 +391,8 @@ + return + + iptables_mgr = iptables_manager.IptablesManager( +- use_ipv6=True, nat=False, namespace=namespace, external_lock=False) ++ use_ipv6=netutils.is_ipv6_enabled(), nat=False, ++ namespace=namespace, external_lock=False) + rule = '-p tcp -m tcp -j CHECKSUM --checksum-fill' + iptables_mgr.ipv4['mangle'].add_rule('POSTROUTING', rule, wrap=False) + iptables_mgr.apply() diff -Nru neutron-17.2.0/debian/patches/series neutron-17.2.0/debian/patches/series --- neutron-17.2.0/debian/patches/series 2021-07-28 23:00:38.000000000 +0200 +++ neutron-17.2.0/debian/patches/series 2021-09-17 15:03:48.000000000 +0200 @@ -1,2 +1,3 @@ skip-iptest.patch revert-l3-ha-retry-when-setting-ha-router-gw-status.patch +6adfdd74.diff