From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2F78399285 for ; Thu, 20 Apr 2023 23:37:16 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CB8F62FB85 for ; Thu, 20 Apr 2023 23:37:15 +0200 (CEST) Received: from bastionodiso.odiso.net (bastionodiso.odiso.net [IPv6:2a0a:1580:2000::2d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 20 Apr 2023 23:37:15 +0200 (CEST) Received: from kvmformation3.odiso.net (formationkvm3.odiso.net [10.3.94.12]) by bastionodiso.odiso.net (Postfix) with ESMTP id E59E77BB5; Thu, 20 Apr 2023 23:37:14 +0200 (CEST) Received: by kvmformation3.odiso.net (Postfix, from userid 0) id E457FD16C9; Thu, 20 Apr 2023 23:37:14 +0200 (CEST) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Thu, 20 Apr 2023 23:37:10 +0200 Message-Id: <20230420213711.687478-2-aderumier@odiso.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230420213711.687478-1-aderumier@odiso.com> References: <20230420213711.687478-1-aderumier@odiso.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy HEADER_FROM_DIFFERENT_DOMAINS 0.25 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH ifupdown2 1/2] patch : vlan: fix vlan-protocol query check X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2023 21:37:16 -0000 upstream: https://github.com/CumulusNetworks/ifupdown2/pull/258 Signed-off-by: Alexandre Derumier --- debian/patches/series | 3 +- ...-check-vlan-protocol-for-not-dotted-.patch | 88 +++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch diff --git a/debian/patches/series b/debian/patches/series index ccfd03d..a7c8da8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,4 +12,5 @@ pve/0011-d-rules-drop-now-default-with-systemd.patch pve/0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch pve/0013-postinst-reload-network-config-on-first-install.patch pve/0014-fix-pointopoint-regression.patch -upstream/0001-ovs-add-support-for-fakebridge.patch \ No newline at end of file +upstream/0001-ovs-add-support-for-fakebridge.patch +upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch \ No newline at end of file diff --git a/debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch b/debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch new file mode 100644 index 0000000..402c5e2 --- /dev/null +++ b/debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch @@ -0,0 +1,88 @@ +From e50a7ccadb460bf923d841d620080f351fd74d9d Mon Sep 17 00:00:00 2001 +From: Alexandre Derumier +Date: Thu, 20 Apr 2023 11:48:11 +0200 +Subject: [PATCH] vlan: query_check: check vlan-protocol for not dotted + interface + +--- + ifupdown2/addons/vlan.py | 44 +++++++++++++++++++++------------------- + 1 file changed, 23 insertions(+), 21 deletions(-) + +diff --git a/ifupdown2/addons/vlan.py b/ifupdown2/addons/vlan.py +index 584fe6e..3b045dc 100644 +--- a/ifupdown2/addons/vlan.py ++++ b/ifupdown2/addons/vlan.py +@@ -224,10 +224,13 @@ class vlan(Addon, moduleBase): + def _query_check(self, ifaceobj, ifaceobjcurr): + if not self.cache.link_exists(ifaceobj.name): + return ++ ++ ifname = ifaceobj.name ++ cached_vlan_info_data = self.cache.get_link_info_data(ifname) ++ + if '.' not in ifaceobj.name: + # if vlan name is not in the dot format, check its running state + +- ifname = ifaceobj.name + cached_vlan_raw_device = self.cache.get_lower_device_ifname(ifname) + + # +@@ -239,8 +242,6 @@ class vlan(Addon, moduleBase): + cached_vlan_raw_device != ifaceobj.get_attr_value_first('vlan-raw-device') + ) + +- cached_vlan_info_data = self.cache.get_link_info_data(ifname) +- + # + # vlan-id + # +@@ -252,27 +253,28 @@ class vlan(Addon, moduleBase): + cached_vlan_id_str = str(cached_vlan_id) + ifaceobjcurr.update_config_with_status('vlan-id', cached_vlan_id_str, vlanid_config != cached_vlan_id_str) + +- # +- # vlan-protocol +- # +- protocol_config = ifaceobj.get_attr_value_first('vlan-protocol') +- if protocol_config: ++ # ++ # vlan-protocol (dot or not dot format) ++ # ++ protocol_config = ifaceobj.get_attr_value_first('vlan-protocol') ++ if protocol_config: + +- cached_vlan_protocol = cached_vlan_info_data.get(Link.IFLA_VLAN_PROTOCOL) ++ cached_vlan_protocol = cached_vlan_info_data.get(Link.IFLA_VLAN_PROTOCOL) + +- if protocol_config.upper() != cached_vlan_protocol.upper(): +- ifaceobjcurr.update_config_with_status( +- 'vlan-protocol', +- cached_vlan_protocol, +- 1 +- ) +- else: +- ifaceobjcurr.update_config_with_status( +- 'vlan-protocol', +- protocol_config, +- 0 +- ) ++ if protocol_config.upper() != cached_vlan_protocol.upper(): ++ ifaceobjcurr.update_config_with_status( ++ 'vlan-protocol', ++ cached_vlan_protocol, ++ 1 ++ ) ++ else: ++ ifaceobjcurr.update_config_with_status( ++ 'vlan-protocol', ++ protocol_config, ++ 0 ++ ) + ++ if '.' not in ifaceobj.name: + # + # vlan-bridge-binding + # +-- +2.30.2 + -- 2.30.2