mirror of
https://git.proxmox.com/git/ifupdown2
synced 2025-04-28 15:50:46 +00:00
patch : vlan: fix vlan-protocol query check
upstream: https://github.com/CumulusNetworks/ifupdown2/pull/258 Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
7aa3a5e6b6
commit
3c4e774f5e
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -13,3 +13,4 @@ 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
|
||||
upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch
|
88
debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch
vendored
Normal file
88
debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
From e50a7ccadb460bf923d841d620080f351fd74d9d Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Derumier <aderumier@odiso.com>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user