diff -Nru neutron-16.4.0/debian/changelog neutron-16.4.0/debian/changelog --- neutron-16.4.0/debian/changelog 2021-07-28 23:20:43.000000000 +0200 +++ neutron-16.4.0/debian/changelog 2021-09-14 18:25:11.000000000 +0200 @@ -1,3 +1,9 @@ +neutron (2:16.4.0-0ubuntu4) focal; urgency=medium + + * Trivial: check if ipv6 is available for IptablesManager (LP: 1915480). + + -- Alin-Gabriel Serdean Tue, 14 Sep 2021 18:25:11 +0200 + neutron (2:16.4.0-0ubuntu3) focal; urgency=medium * d/p/revert-l3-ha-retry-when-setting-ha-router-gw-status.patch: Revert diff -Nru neutron-16.4.0/debian/patches/b6a6065.diff neutron-16.4.0/debian/patches/b6a6065.diff --- neutron-16.4.0/debian/patches/b6a6065.diff 1970-01-01 01:00:00.000000000 +0100 +++ neutron-16.4.0/debian/patches/b6a6065.diff 2021-09-14 18:25:11.000000000 +0200 @@ -0,0 +1,55 @@ +From b6a6065f9f90f83f80e3a3a997bf382b38763b29 Mon Sep 17 00:00:00 2001 +From: Alin-Gabriel Serdean +Date: Fri, 13 Aug 2021 11:13:20 +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 96aab3b..d947518 100644 +--- a/neutron/agent/linux/dhcp.py ++++ b/neutron/agent/linux/dhcp.py +@@ -1799,9 +1799,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_RESPONSE_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 2fa8e2d..0dda323 100644 +--- a/neutron/agent/ovn/metadata/agent.py ++++ b/neutron/agent/ovn/metadata/agent.py +@@ -18,6 +18,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 +@@ -372,7 +373,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()