From b14bf469da6bd14dbe307a29fcf535fd1a8ad751 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 14 Dec 2024 13:48:02 -0500 Subject: [PATCH] libvirt-10.6.0-6.fc41 Fix DHCP response checksum when using nftables firewall Permit forward mode=open when network has no IP (bz 2255266) Signed-off-by: Cole Robinson --- ...orward-mode-open-when-a-network-has-.patch | 51 +++++++++++++++++++ libvirt.spec | 11 +++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 0010-network-permit-forward-mode-open-when-a-network-has-.patch diff --git a/0010-network-permit-forward-mode-open-when-a-network-has-.patch b/0010-network-permit-forward-mode-open-when-a-network-has-.patch new file mode 100644 index 0000000..b50a2b4 --- /dev/null +++ b/0010-network-permit-forward-mode-open-when-a-network-has-.patch @@ -0,0 +1,51 @@ +From 114c0ec656e879ab4d67919914bb24cf5993106d Mon Sep 17 00:00:00 2001 +Message-ID: <114c0ec656e879ab4d67919914bb24cf5993106d.1734201785.git.crobinso@redhat.com> +From: Laine Stump +Date: Mon, 2 Sep 2024 16:13:08 -0400 +Subject: [PATCH] network: permit when a network has no + IP address +Content-type: text/plain + +The whole point of is to supress libvirt from +adding any firewall rules for a network, and someone might want to +create a network with no IP address (i.e. they don't want the guests +to have connectivity to the host via this interface) and no firewall +rules (they don't want any, or they want to add their own). So there's +no reason to fail when a network has and also +has no IP address. + +Kind-of-Resolves: https://gitlab.com/libvirt/libvirt/-/issues/588 +Signed-off-by: Laine Stump +Reviewed-by: Martin Kletzander +Signed-off-by: Cole Robinson +--- + src/conf/network_conf.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c +index 5cf419acf1..320e1b089a 100644 +--- a/src/conf/network_conf.c ++++ b/src/conf/network_conf.c +@@ -1789,7 +1789,6 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, + + case VIR_NETWORK_FORWARD_ROUTE: + case VIR_NETWORK_FORWARD_NAT: +- case VIR_NETWORK_FORWARD_OPEN: + /* It's pointless to specify L3 forwarding without specifying + * the network we're on. + */ +@@ -1806,8 +1805,10 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, + def->name); + return NULL; + } ++ break; + +- if (def->forward.type == VIR_NETWORK_FORWARD_OPEN && def->forward.nifs) { ++ case VIR_NETWORK_FORWARD_OPEN: ++ if (def->forward.nifs) { + /* an open network by definition can't place any restrictions + * on what traffic is allowed or where it goes, so specifying + * a forwarding device is nonsensical. +-- +2.47.1 + diff --git a/libvirt.spec b/libvirt.spec index a4ee1eb..f292510 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -289,7 +289,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 10.6.0 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1 URL: https://libvirt.org/ @@ -302,6 +302,8 @@ Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz Patch0001: 0001-virarptable-Properly-calculate-rtattr-length.patch Patch0002: 0002-virarptable-Fix-check-for-message-length.patch Patch0003: 0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch + +# Fix DHCP response checksum when using nftables firewall Patch0004: 0004-util-use-a-single-flags-arg-for-virNetDevBandwidthSe.patch Patch0005: 0005-util-make-it-optional-to-clear-existing-tc-qdiscs-fi.patch Patch0006: 0006-util-put-the-command-that-adds-a-tx-filter-qdisc-int.patch @@ -309,6 +311,9 @@ Patch0007: 0007-util-don-t-re-add-the-qdisc-used-for-tx-filters-if-i.patch Patch0008: 0008-util-add-new-tc-layer-for-virFirewallCmd-objects.patch Patch0009: 0009-network-add-tc-filter-rule-to-nftables-backend-to-fi.patch +# Permit forward mode=open when network has no IP (bz 2255266) +Patch: 0010-network-permit-forward-mode-open-when-a-network-has-.patch + Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -2633,6 +2638,10 @@ exit 0 %changelog +* Sat Dec 14 2024 Cole Robinson - 10.6.0-6 +- Fix DHCP response checksum when using nftables firewall +- Permit forward mode=open when network has no IP (bz 2255266) + * Tue Sep 24 2024 Cole Robinson - 10.6.0-5 - Rebuild for new wireshark