* [pve-devel] [PATCH ifupdown2 1/6] patch: patch5: fix code nit
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
@ 2023-05-15 22:47 ` Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 2/6] patch: remove old upstreamed patches Alexandre Derumier
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexandre Derumier @ 2023-05-15 22:47 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
...-up-vxlan-interfaces-when-ifreload_down.patch | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch b/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
index 63494c9..a0c6788 100644
--- a/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
+++ b/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
@@ -1,4 +1,4 @@
-From 2c38d0a157c8946f35a7da1c7c05484d33e6986f Mon Sep 17 00:00:00 2001
+From 1926699b02882bc5ed659d4debce2a0127d2edf0 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Wed, 5 Jun 2019 14:47:05 +0200
Subject: [PATCH 6/7] ifreload: down/up vxlan && vlan interfaces when
@@ -16,22 +16,24 @@ fix: https://github.com/CumulusNetworks/ifupdown2/issues/50
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
- ifupdown2/ifupdown/ifupdownmain.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ ifupdown2/ifupdown/ifupdownmain.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py
-index b4e1864..9313573 100644
+index b73c742..65fd67e 100644
--- a/ifupdown2/ifupdown/ifupdownmain.py
+++ b/ifupdown2/ifupdown/ifupdownmain.py
-@@ -2274,7 +2274,7 @@ class ifupdownMain:
+@@ -2355,7 +2355,9 @@ class ifupdownMain:
% (newifaceobjlist[objidx].name,
ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind)))
ifacedownlist.append(newifaceobjlist[objidx].name)
- if not down_changed:
-+ if not down_changed and ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind) != 'vxlan' and ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind) != 'vlan':
++
++ ifacelink_kind = ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind)
++ if not down_changed and ifacelink_kind != 'vxlan' and ifacelink_kind != 'vlan':
continue
if len(newifaceobjlist) != len(lastifaceobjlist):
ifacedownlist.append(ifname)
--
-2.20.1
+2.30.2
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH ifupdown2 2/6] patch: remove old upstreamed patches
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 1/6] patch: patch5: fix code nit Alexandre Derumier
@ 2023-05-15 22:47 ` Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 3/6] patch: reorder patches Alexandre Derumier
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexandre Derumier @ 2023-05-15 22:47 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
...-subinterface-in-a-vlan-aware-bridge.patch | 49 -----------
.../pve/0014-fix-pointopoint-regression.patch | 28 ------
debian/patches/series | 6 +-
.../0001-ovs-add-support-for-fakebridge.patch | 57 ------------
...-check-vlan-protocol-for-not-dotted-.patch | 88 -------------------
5 files changed, 1 insertion(+), 227 deletions(-)
delete mode 100644 debian/patches/pve/0003-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch
delete mode 100644 debian/patches/pve/0014-fix-pointopoint-regression.patch
delete mode 100644 debian/patches/upstream/0001-ovs-add-support-for-fakebridge.patch
delete mode 100644 debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch
diff --git a/debian/patches/pve/0003-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch b/debian/patches/pve/0003-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch
deleted file mode 100644
index d9f190e..0000000
--- a/debian/patches/pve/0003-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 8187e6e4a8cea198d86c4df8117335b7b93047d0 Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier@odiso.com>
-Date: Mon, 1 Apr 2019 09:17:11 +0200
-Subject: [PATCH 4/7] allow vlan subinterface in a vlan-aware bridge
-
-for stacked/qinq vlan, it's perfectly fine to have a vlan-aware bridge with a tagged interface port
-
-fix:
-https://github.com/CumulusNetworks/ifupdown2/issues/92
-
-sample config:
-
-auto eth0.2
-iface eth0.2 inet manual
-
-auto bridge
-iface bridge inet manual
- bridge-ports eth0.2
- bridge-stp off
- bridge-fd 0
- bridge-vlan-aware yes
-
-bridge 8000.c81f66f8688c no eth0.2
-
-Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- ifupdown2/addons/bridge.py | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
-index 35944ac..f353d6c 100644
---- a/ifupdown2/addons/bridge.py
-+++ b/ifupdown2/addons/bridge.py
-@@ -890,11 +890,6 @@ class bridge(Addon, moduleBase):
- result = True
- for port_name in ports:
- port_obj_l = ifaceobj_getfunc(port_name)
-- if port_obj_l and port_obj_l[0].link_kind & ifaceLinkKind.VLAN:
-- self.logger.error('%s: %s: vlan sub-interface is not '
-- 'supported in a vlan-aware bridge'
-- % (ifaceobj.name, port_name))
-- result = False
- if (port_obj_l and
- port_obj_l[0].get_attr_value('bridge-arp-nd-suppress') and
- self.arp_nd_suppress_only_on_vxlan and
---
-2.20.1
-
diff --git a/debian/patches/pve/0014-fix-pointopoint-regression.patch b/debian/patches/pve/0014-fix-pointopoint-regression.patch
deleted file mode 100644
index 68ee3a0..0000000
--- a/debian/patches/pve/0014-fix-pointopoint-regression.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 416e7623eb92524c7100aebc7b7265056737813d Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier@odiso.com>
-Date: Mon, 26 Jul 2021 08:05:38 +0200
-Subject: [PATCH] fix pointopoint regression
-
-partially revert ba5437b9ecf9aa1401ac985ebf97009cc3114481
-
-https://forum.proxmox.com/threads/hetzner-pve-7-0-problems-after-reboot-maybe-ifupdown2.92935/
-Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
----
- ifupdown2/lib/nlcache.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/ifupdown2/lib/nlcache.py b/ifupdown2/lib/nlcache.py
-index 9350ced..08f1108 100644
---- a/ifupdown2/lib/nlcache.py
-+++ b/ifupdown2/lib/nlcache.py
-@@ -3172,7 +3172,6 @@ class NetlinkListenerWithCache(nllistener.NetlinkManagerWithListener, BaseObject
-
- if peer:
- log_msg.append("peer %s" % peer)
-- peer = ipnetwork.IPAddress(peer)
-
- packet.add_attribute(Address.IFA_ADDRESS, peer)
- packet_prefixlen = peer.prefixlen
---
-2.30.2
-
diff --git a/debian/patches/series b/debian/patches/series
index a7c8da8..ac79b43 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
pve/0002-add-dummy-mtu-bridgevlanport-modules.patch
-pve/0003-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch
pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
pve/0006-config-tuning.patch
@@ -10,7 +9,4 @@ pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch
pve/0010-postinst-rm-update-network-config-compatibility.patch
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
-upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch
\ No newline at end of file
+pve/0013-postinst-reload-network-config-on-first-install.patch
\ No newline at end of file
diff --git a/debian/patches/upstream/0001-ovs-add-support-for-fakebridge.patch b/debian/patches/upstream/0001-ovs-add-support-for-fakebridge.patch
deleted file mode 100644
index 7e9eb67..0000000
--- a/debian/patches/upstream/0001-ovs-add-support-for-fakebridge.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 39b395b1fd41e5ac4066c5afd19b6ab9c17b8b14 Mon Sep 17 00:00:00 2001
-From: alexandre derumier <aderumier@odiso.com>
-Date: Thu, 1 Sep 2022 19:18:21 +0200
-Subject: [PATCH] addons: openvswitch : add support for fakebridge.
-
-Fake bridge are are ovsbridge child of a parent bridge with a specific vlan tag.
-
-```
-auto br-parent
-iface br-parent inet manual
- ovs_type OVSBridge
-
-auto br-fakev10
-iface br-fakev10 inet manual
- ovs_type OVSBridge
- ovs_bridge br-parent
- ovs_options br-parent 10
-
-```
----
- ifupdown2/addons/openvswitch.py | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py
-index 2c9a76f7..0a124ba2 100644
---- a/ifupdown2/addons/openvswitch.py
-+++ b/ifupdown2/addons/openvswitch.py
-@@ -74,6 +74,10 @@ class openvswitch(Addon, moduleBase):
- "required": False,
- "example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
- },
-+ 'ovs-bridge': {
-+ 'help': 'Optional parent bridge for fake bridges',
-+ 'required': False,
-+ },
- }
- }
-
-@@ -147,13 +151,17 @@ def _addbridge (self, ifaceobj):
- ovsextra = ifaceobj.get_attr_value('ovs-extra')
- ovsmtu = ifaceobj.get_attr_value_first ('ovs-mtu')
- ovsportscondoneregex = self._get_ovs_port_condone_regex(ifaceobj)
-+ ovsparent = ifaceobj.get_attr_value_first ('ovs-bridge')
-
- cmd_list = []
-
- cmd = "--may-exist add-br %s"%(iface)
-+ if ovsparent is not None and ovsoptions:
-+ cmd = cmd + " %s" %(ovsoptions)
-+
- cmd_list.append(cmd)
-
-- if ovsoptions:
-+ if ovsparent is None and ovsoptions:
- cmd = "set bridge %s %s" %(iface, ovsoptions)
- cmd_list.append(cmd)
-
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
deleted file mode 100644
index 402c5e2..0000000
--- a/debian/patches/upstream/0001-vlan-query_check-check-vlan-protocol-for-not-dotted-.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-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
-
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH ifupdown2 3/6] patch: reorder patches
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 1/6] patch: patch5: fix code nit Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 2/6] patch: remove old upstreamed patches Alexandre Derumier
@ 2023-05-15 22:47 ` Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 4/6] patch: add ipv6 slaac support upstream patch Alexandre Derumier
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexandre Derumier @ 2023-05-15 22:47 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
...-veth-fwpr-interfaces-from-bridge-on.patch | 14 +++++-----
...add-dummy-mtu-bridgevlanport-modules.patch | 11 ++++----
...ridge-is-tap-veth-are-still-plugged.patch} | 10 +++----
...vxlan-vlan-interfaces-when-ifreload.patch} | 2 +-
...-tuning.patch => 0005-config-tuning.patch} | 12 ++++-----
...rvice-fix-dependencies-and-ordering.patch} | 26 +++++++++----------
...orts-condone-regex-exclude-tap-veth.patch} | 13 +++++-----
...-allow-vlan-tag-inside-vxlan-tunnel.patch} | 14 +++++-----
...update-network-config-compatibility.patch} | 8 +++---
...rules-drop-now-default-with-systemd.patch} | 10 ++++---
...stallsystemd-override-for-compat-12.patch} | 13 +++++++---
...oad-network-config-on-first-install.patch} | 14 +++++-----
debian/patches/series | 21 ++++++++-------
13 files changed, 92 insertions(+), 76 deletions(-)
rename debian/patches/pve/{0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch => 0003-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch} (87%)
rename debian/patches/pve/{0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch => 0004-ifreload-down-up-vxlan-vlan-interfaces-when-ifreload.patch} (95%)
rename debian/patches/pve/{0006-config-tuning.patch => 0005-config-tuning.patch} (82%)
rename debian/patches/pve/{0007-networking.service-fix-dependencies-and-ordering.patch => 0006-networking.service-fix-dependencies-and-ordering.patch} (77%)
rename debian/patches/pve/{0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch => 0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch} (80%)
rename debian/patches/pve/{0009-allow-vlan-tag-inside-vxlan-tunnel.patch => 0008-allow-vlan-tag-inside-vxlan-tunnel.patch} (70%)
rename debian/patches/pve/{0010-postinst-rm-update-network-config-compatibility.patch => 0009-postinst-rm-update-network-config-compatibility.patch} (94%)
rename debian/patches/pve/{0011-d-rules-drop-now-default-with-systemd.patch => 0010-d-rules-drop-now-default-with-systemd.patch} (73%)
rename debian/patches/pve/{0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch => 0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch} (65%)
rename debian/patches/pve/{0013-postinst-reload-network-config-on-first-install.patch => 0012-postinst-reload-network-config-on-first-install.patch} (66%)
diff --git a/debian/patches/pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch b/debian/patches/pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
index 36b256e..287cf70 100644
--- a/debian/patches/pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
+++ b/debian/patches/pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
@@ -1,8 +1,8 @@
-From e048d4f3c6516c4b7519112de13f79f70d56d44b Mon Sep 17 00:00:00 2001
+From 76e402e8b446861adf45f8ece54d616808586b71 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Wed, 16 May 2018 02:11:45 +0200
-Subject: [PATCH] don't remove (tap|veth|fwpr) interfaces from bridge on ifup
- bridge
+Subject: [PATCH 01/12] don't remove (tap|veth|fwpr) interfaces from bridge on
+ ifup bridge
as proxmox don't defined them in /etc/network/interfaces
@@ -13,10 +13,10 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 file changed, 4 insertions(+)
diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
-index d990b66..365e87d 100644
+index 954e462..ff98b18 100644
--- a/ifupdown2/addons/bridge.py
+++ b/ifupdown2/addons/bridge.py
-@@ -439,6 +439,7 @@ class bridge(Addon, moduleBase):
+@@ -443,6 +443,7 @@ class bridge(Bridge, moduleBase):
"bridge-ports-condone-regex": {
"help": "bridge ports to ignore/condone when reloading config / removing interfaces",
"required": False,
@@ -24,7 +24,7 @@ index d990b66..365e87d 100644
"example": ["bridge-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
},
"bridge-vlan-vni-map": {
-@@ -1013,6 +1014,9 @@ class bridge(Addon, moduleBase):
+@@ -1152,6 +1153,9 @@ class bridge(Bridge, moduleBase):
# up a compiled regex to be used in a match later. This way we try to avoid
# a race condition where an (possibly VM) interface is created after this
# function has been called but before the bridgeports are validated.
@@ -35,5 +35,5 @@ index d990b66..365e87d 100644
if get_string:
return bridge_port_condone_regex
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0002-add-dummy-mtu-bridgevlanport-modules.patch b/debian/patches/pve/0002-add-dummy-mtu-bridgevlanport-modules.patch
index c9e22d5..73c047d 100644
--- a/debian/patches/pve/0002-add-dummy-mtu-bridgevlanport-modules.patch
+++ b/debian/patches/pve/0002-add-dummy-mtu-bridgevlanport-modules.patch
@@ -1,7 +1,7 @@
-From a8368f92c36cd810933c3c5319c148976cc65a82 Mon Sep 17 00:00:00 2001
+From 1cead3cbb02f7058846a6f7b7a42d875b27ee64a Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Fri, 15 Jun 2018 00:36:03 +0200
-Subject: [PATCH 2/7] add dummy mtu, bridgevlanport modules
+Subject: [PATCH 02/12] add dummy mtu, bridgevlanport modules
As pve-manager package still provide ifupdown custom bridgevlanport && mtu script,
we can override them with ifupdown2 addon scripts, doing nothing.
@@ -10,6 +10,7 @@ we can override them with ifupdown2 addon scripts, doing nothing.
exist with same name)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
etc/network/ifupdown2/addons.conf | 2 ++
ifupdown2/addons/bridgevlanport.py | 17 +++++++++++++++++
@@ -19,10 +20,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
create mode 100644 ifupdown2/addons/mtu.py
diff --git a/etc/network/ifupdown2/addons.conf b/etc/network/ifupdown2/addons.conf
-index c43d377..e3639a7 100644
+index 726d63a..a8f2317 100644
--- a/etc/network/ifupdown2/addons.conf
+++ b/etc/network/ifupdown2/addons.conf
-@@ -19,6 +19,8 @@ up,dhcp
+@@ -20,6 +20,8 @@ up,dhcp
up,address
up,addressvirtual
up,usercmds
@@ -78,5 +79,5 @@ index 0000000..efdf569
+
+ _modinfo = {'mhelp' : 'dummy package to override proxmox script'}
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch b/debian/patches/pve/0003-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
similarity index 87%
rename from debian/patches/pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
rename to debian/patches/pve/0003-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
index 5196004..0490dc3 100644
--- a/debian/patches/pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
+++ b/debian/patches/pve/0003-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
@@ -1,7 +1,7 @@
-From 3daa281c155da9da166627e35114283665f01669 Mon Sep 17 00:00:00 2001
+From 397b92e6c2978a7c2f62542ec5560fadba3f296a Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Thu, 13 Jun 2019 14:34:59 +0200
-Subject: [PATCH 5/7] don't remove bridge is tap|veth are still plugged
+Subject: [PATCH 03/12] don't remove bridge is tap|veth are still plugged
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
@@ -10,10 +10,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py
-index 01163e2..b4e1864 100644
+index 51f5460..b73c742 100644
--- a/ifupdown2/ifupdown/ifupdownmain.py
+++ b/ifupdown2/ifupdown/ifupdownmain.py
-@@ -2191,7 +2191,15 @@ class ifupdownMain:
+@@ -2272,7 +2272,15 @@ class ifupdownMain:
# append it to the down list
newifaceobjlist = new_ifaceobjdict.get(ifname)
if not newifaceobjlist:
@@ -31,5 +31,5 @@ index 01163e2..b4e1864 100644
# If ifaceobj was present in the old interfaces file,
# and does not have a config in the new interfaces file
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch b/debian/patches/pve/0004-ifreload-down-up-vxlan-vlan-interfaces-when-ifreload.patch
similarity index 95%
rename from debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
rename to debian/patches/pve/0004-ifreload-down-up-vxlan-vlan-interfaces-when-ifreload.patch
index a0c6788..a8ca532 100644
--- a/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
+++ b/debian/patches/pve/0004-ifreload-down-up-vxlan-vlan-interfaces-when-ifreload.patch
@@ -1,7 +1,7 @@
From 1926699b02882bc5ed659d4debce2a0127d2edf0 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Wed, 5 Jun 2019 14:47:05 +0200
-Subject: [PATCH 6/7] ifreload: down/up vxlan && vlan interfaces when
+Subject: [PATCH 04/12] ifreload: down/up vxlan && vlan interfaces when
ifreload_down_changed=0
almost all attributes of vxlan interfaces can't be updated
diff --git a/debian/patches/pve/0006-config-tuning.patch b/debian/patches/pve/0005-config-tuning.patch
similarity index 82%
rename from debian/patches/pve/0006-config-tuning.patch
rename to debian/patches/pve/0005-config-tuning.patch
index 2ac0a9f..4d46f0b 100644
--- a/debian/patches/pve/0006-config-tuning.patch
+++ b/debian/patches/pve/0005-config-tuning.patch
@@ -1,7 +1,7 @@
-From 902cfb815abd85b9813f73c2bb0a5ea0fe70c03c Mon Sep 17 00:00:00 2001
+From 3d974bdaed34ce3d05cdbcef271021a80d0ae881 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 31 Dec 2018 10:49:48 +0100
-Subject: [PATCH] config tuning
+Subject: [PATCH 05/12] config tuning
multiple_vlan_aware_bridge_support=1
@@ -12,10 +12,10 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/etc/network/ifupdown2/ifupdown2.conf b/etc/network/ifupdown2/ifupdown2.conf
-index ecdd94f..c974077 100644
+index bc1acb9..4939186 100644
--- a/etc/network/ifupdown2/ifupdown2.conf
+++ b/etc/network/ifupdown2/ifupdown2.conf
-@@ -45,7 +45,7 @@ addon_python_modules_support=1
+@@ -53,7 +53,7 @@ addon_python_modules_support=1
# By default ifupdown2 only supports a single vlan filtering bridge
# on the system. Set this flag to 1 to support multiple vlan
# filtering bridges
@@ -24,12 +24,12 @@ index ecdd94f..c974077 100644
# ifquery check status strings.
# By default `ifquery --check` prints the check and
-@@ -88,4 +88,4 @@ adjust_logical_dev_mtu=1
+@@ -96,4 +96,4 @@ adjust_logical_dev_mtu=1
# if this directory doesn't exists ifupdown2 will create it
# if directory creation fails or state_dir variable is empty
# state_dir will default to /var/tmp/network/
-state_dir=/var/tmp/network/
+state_dir=/run/network/
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0007-networking.service-fix-dependencies-and-ordering.patch b/debian/patches/pve/0006-networking.service-fix-dependencies-and-ordering.patch
similarity index 77%
rename from debian/patches/pve/0007-networking.service-fix-dependencies-and-ordering.patch
rename to debian/patches/pve/0006-networking.service-fix-dependencies-and-ordering.patch
index 66d1e18..48acf09 100644
--- a/debian/patches/pve/0007-networking.service-fix-dependencies-and-ordering.patch
+++ b/debian/patches/pve/0006-networking.service-fix-dependencies-and-ordering.patch
@@ -1,7 +1,7 @@
-From e8ce294b4db6039216b72e353a51d1bac0c5313d Mon Sep 17 00:00:00 2001
+From 154c536c711de1c09edbd880820da01c5b457a6c Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Thu, 30 Jan 2020 12:48:23 +0100
-Subject: [PATCH] networking.service: fix dependencies and ordering
+Subject: [PATCH 06/12] networking.service: fix dependencies and ordering
IMPORTANT: DO NOT REMOVE IF UNSURE!
@@ -15,11 +15,12 @@ BIG WARNING HERE IS DONE BECAUSE IT WAS ALREADY REMOVED BY MISTAKE
ONCE!!
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/ifupdown2-pre.service | 13 +++++++++++++
- debian/ifupdown2.networking.service | 8 ++++++--
+ debian/ifupdown2.networking.service | 8 +++++---
debian/rules | 1 +
- 3 files changed, 20 insertions(+), 2 deletions(-)
+ 3 files changed, 19 insertions(+), 3 deletions(-)
create mode 100644 debian/ifupdown2-pre.service
diff --git a/debian/ifupdown2-pre.service b/debian/ifupdown2-pre.service
@@ -42,23 +43,22 @@ index 0000000..b129a62
+EnvironmentFile=-/etc/default/networking
+ExecStart=/bin/udevadm settle
diff --git a/debian/ifupdown2.networking.service b/debian/ifupdown2.networking.service
-index 32f21f6..a49d1ba 100644
+index cdb3065..ee5f17a 100644
--- a/debian/ifupdown2.networking.service
+++ b/debian/ifupdown2.networking.service
-@@ -2,8 +2,11 @@
- Description=Network initialization
- Documentation=man:interfaces(5) man:ifup(8) man:ifdown(8)
- DefaultDependencies=no
--Before=shutdown.target
+@@ -5,8 +5,9 @@ DefaultDependencies=no
+ After=local-fs.target network-pre.target
+ Before=shutdown.target network.target network-online.target
Conflicts=shutdown.target
+-Wants=systemd-udev-settle.service
+-After=systemd-udev-settle.service
+Requires=ifupdown2-pre.service
+Wants=network.target
+After=local-fs.target network-pre.target systemd-sysctl.service systemd-modules-load.service ifupdown2-pre.service
-+Before=network.target shutdown.target network-online.target
[Service]
Type=oneshot
-@@ -16,4 +19,5 @@ ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
+@@ -19,4 +20,5 @@ ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
ExecReload=/usr/share/ifupdown2/sbin/start-networking reload
[Install]
@@ -78,5 +78,5 @@ index ea6f434..fcb304f 100755
override_dh_systemd_start:
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch b/debian/patches/pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
similarity index 80%
rename from debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
rename to debian/patches/pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
index 4cfdbf6..3904561 100644
--- a/debian/patches/pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
+++ b/debian/patches/pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
@@ -1,7 +1,8 @@
-From cfe5feada5532830a53031138c471541ebec813d Mon Sep 17 00:00:00 2001
+From 014e11b7f0eaeb901ada42eaf7a0cc257d85885c Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Sun, 17 May 2020 15:46:36 +0200
-Subject: [PATCH] openvswitch : ovs-ports-condone-regex : exclude tap|veth|fwln
+Subject: [PATCH 07/12] openvswitch : ovs-ports-condone-regex : exclude
+ tap|veth|fwln
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
@@ -9,10 +10,10 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
1 file changed, 3 insertions(+)
diff --git a/ifupdown2/addons/openvswitch.py b/ifupdown2/addons/openvswitch.py
-index 468d7df..48beef3 100644
+index 0a124ba..40fc36a 100644
--- a/ifupdown2/addons/openvswitch.py
+++ b/ifupdown2/addons/openvswitch.py
-@@ -65,6 +65,7 @@ class openvswitch(Addon, moduleBase):
+@@ -71,6 +71,7 @@ class openvswitch(Addon, moduleBase):
},
'ovs-ports-condone-regex': {
"help": "ovs ports to ignore/condone when reloading config / removing interfaces",
@@ -20,7 +21,7 @@ index 468d7df..48beef3 100644
"required": False,
"example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
},
-@@ -101,6 +102,8 @@ class openvswitch(Addon, moduleBase):
+@@ -116,6 +117,8 @@ class openvswitch(Addon, moduleBase):
def _get_ovs_port_condone_regex(self, ifaceobj, get_string = False):
ovs_port_condone_regex = ifaceobj.get_attr_value_first('ovs-ports-condone-regex')
@@ -30,5 +31,5 @@ index 468d7df..48beef3 100644
if get_string:
return ovs_port_condone_regex
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch b/debian/patches/pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch
similarity index 70%
rename from debian/patches/pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch
rename to debian/patches/pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch
index 7a42f41..9ef0bda 100644
--- a/debian/patches/pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch
+++ b/debian/patches/pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch
@@ -1,24 +1,26 @@
-From 14a29c0ef26946a4721103a943249d5c3e74a865 Mon Sep 17 00:00:00 2001
+From 779d3700fb583b87b03ad2b12d55442058e7d79b Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Mon, 21 Sep 2020 08:47:25 +0200
-Subject: [PATCH] allow vlan tag inside vxlan tunnel
+Subject: [PATCH 08/12] allow vlan tag inside vxlan tunnel
Cumulus forbid it, but it's totally valid.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
- ifupdown2/addons/bridge.py | 5 -----
- 1 file changed, 5 deletions(-)
+ ifupdown2/addons/bridge.py | 7 -------
+ 1 file changed, 7 deletions(-)
diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
-index f9c789d..72c7a2f 100644
+index ff98b18..f21424e 100644
--- a/ifupdown2/addons/bridge.py
+++ b/ifupdown2/addons/bridge.py
-@@ -1602,11 +1602,6 @@ class bridge(Bridge, moduleBase):
+@@ -1718,13 +1718,6 @@ class bridge(Bridge, moduleBase):
because kernel does honor vid info flags during deletes.
"""
- if not isbridge and (bportifaceobj.link_kind & ifaceLinkKind.VXLAN and not bportifaceobj.link_privflags & ifaceLinkPrivFlags.SINGLE_VXLAN):
+- self.config_check_bridge_vni_svi_limit(bportifaceobj, ifaceobj_getfunc, pvid)
+-
- if not vids or not pvid or len(vids) > 1 or vids[0] != pvid:
- self._error_vxlan_in_vlan_aware_br(bportifaceobj,
- bportifaceobj.upperifaces[0])
diff --git a/debian/patches/pve/0010-postinst-rm-update-network-config-compatibility.patch b/debian/patches/pve/0009-postinst-rm-update-network-config-compatibility.patch
similarity index 94%
rename from debian/patches/pve/0010-postinst-rm-update-network-config-compatibility.patch
rename to debian/patches/pve/0009-postinst-rm-update-network-config-compatibility.patch
index 226728f..05aa1ee 100644
--- a/debian/patches/pve/0010-postinst-rm-update-network-config-compatibility.patch
+++ b/debian/patches/pve/0009-postinst-rm-update-network-config-compatibility.patch
@@ -1,7 +1,7 @@
-From 723bfd8e3ed7a6140a411260a4881ed886efc829 Mon Sep 17 00:00:00 2001
+From 2fe84449da923d01de8bbed84f4f8ce15548225f Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Fri, 21 Feb 2020 10:01:59 +0100
-Subject: [PATCH] postinst/rm : update network config compatibility
+Subject: [PATCH 09/12] postinst/rm : update network config compatibility
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
@@ -12,7 +12,7 @@ Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
create mode 100644 debian/ifupdown2.preinst
diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
-index 3689256..5162109 100644
+index 3689256..b7de485 100644
--- a/debian/ifupdown2.postinst
+++ b/debian/ifupdown2.postinst
@@ -85,6 +85,25 @@ postinst_remove_diverts()
@@ -114,5 +114,5 @@ index 0000000..aa8653e
+
+exit 0
--
-2.20.1
+2.30.2
diff --git a/debian/patches/pve/0011-d-rules-drop-now-default-with-systemd.patch b/debian/patches/pve/0010-d-rules-drop-now-default-with-systemd.patch
similarity index 73%
rename from debian/patches/pve/0011-d-rules-drop-now-default-with-systemd.patch
rename to debian/patches/pve/0010-d-rules-drop-now-default-with-systemd.patch
index 3b5c762..b1a8ab6 100644
--- a/debian/patches/pve/0011-d-rules-drop-now-default-with-systemd.patch
+++ b/debian/patches/pve/0010-d-rules-drop-now-default-with-systemd.patch
@@ -1,15 +1,16 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From fb44a9192381498ec4f0fbf89c717d07c8fb5dc2 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Mon, 24 May 2021 12:32:46 +0200
-Subject: [PATCH] d/rules: drop now default "with=systemd"
+Subject: [PATCH 10/12] d/rules: drop now default "with=systemd"
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/rules b/debian/rules
-index ea6f434..dfd25f7 100755
+index fcb304f..ec1b214 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@ export PYBUILD_NAME=ifupdown2
@@ -21,3 +22,6 @@ index ea6f434..dfd25f7 100755
override_dh_installman:
./ifupdown2/man/genmanpages.sh ./ifupdown2/man ./man
+--
+2.30.2
+
diff --git a/debian/patches/pve/0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch b/debian/patches/pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
similarity index 65%
rename from debian/patches/pve/0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch
rename to debian/patches/pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
index b3679e1..ac24d3c 100644
--- a/debian/patches/pve/0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch
+++ b/debian/patches/pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
@@ -1,18 +1,20 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From ff810060d779488ba093bfad67b6cd36071ebdfd Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Tue, 25 May 2021 10:34:16 +0200
-Subject: [PATCH] d/rules: add dh_installsystemd override for compat >= 12
+Subject: [PATCH 11/12] d/rules: add dh_installsystemd override for compat >=
+ 12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/rules | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/debian/rules b/debian/rules
-index ea6f434..6ab542a 100755
+index ec1b214..6539b24 100755
--- a/debian/rules
+++ b/debian/rules
-@@ -23,5 +23,9 @@ override_dh_systemd_start:
+@@ -24,5 +24,9 @@ override_dh_systemd_start:
override_dh_systemd_enable:
dh_systemd_enable --name=networking
@@ -22,3 +24,6 @@ index ea6f434..6ab542a 100755
+
override_dh_compress:
dh_compress -X.py
+--
+2.30.2
+
diff --git a/debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch b/debian/patches/pve/0012-postinst-reload-network-config-on-first-install.patch
similarity index 66%
rename from debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch
rename to debian/patches/pve/0012-postinst-reload-network-config-on-first-install.patch
index 72df52c..d5e94ca 100644
--- a/debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch
+++ b/debian/patches/pve/0012-postinst-reload-network-config-on-first-install.patch
@@ -1,18 +1,20 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From 9f8dfcaf862738b7439d5b0cb0d76dc24c3b50bc Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Tue, 6 Jul 2021 13:11:24 +0200
-Subject: [PATCH] postinst: reload network config on first install
+Subject: [PATCH 12/12] postinst: reload network config on first install
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
- debian/ifupdown2.postinst | 2 ++
- 1 file changed, 2 insertions(+)
+ debian/ifupdown2.postinst | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
-index b7de485..eaade7c 100644
+index b7de485..0137ea8 100644
--- a/debian/ifupdown2.postinst
+++ b/debian/ifupdown2.postinst
-@@ -113,7 +113,9 @@ case "$1" in
+@@ -111,8 +111,10 @@ case "$1" in
+ process_udev
chmod +x /usr/share/ifupdown2/__main__.py
postinst_remove_diverts
- if [ -f "/tmp/.ifupdown2-first-install" ]; then
diff --git a/debian/patches/series b/debian/patches/series
index ac79b43..d548398 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,12 +1,13 @@
pve/0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
pve/0002-add-dummy-mtu-bridgevlanport-modules.patch
-pve/0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
-pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
-pve/0006-config-tuning.patch
-pve/0007-networking.service-fix-dependencies-and-ordering.patch
-pve/0008-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
-pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch
-pve/0010-postinst-rm-update-network-config-compatibility.patch
-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
\ No newline at end of file
+pve/0003-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
+pve/0004-ifreload-down-up-vxlan-vlan-interfaces-when-ifreload.patch
+pve/0005-config-tuning.patch
+pve/0006-networking.service-fix-dependencies-and-ordering.patch
+pve/0007-openvswitch-ovs-ports-condone-regex-exclude-tap-veth.patch
+pve/0008-allow-vlan-tag-inside-vxlan-tunnel.patch
+pve/0009-postinst-rm-update-network-config-compatibility.patch
+pve/0010-d-rules-drop-now-default-with-systemd.patch
+pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
+pve/0012-postinst-reload-network-config-on-first-install.patch
+
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH ifupdown2 4/6] patch: add ipv6 slaac support upstream patch
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
` (2 preceding siblings ...)
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 3/6] patch: reorder patches Alexandre Derumier
@ 2023-05-15 22:47 ` Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 5/6] patch: remove lacp bond min-links=0 warning Alexandre Derumier
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexandre Derumier @ 2023-05-15 22:47 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/patches/series | 2 +-
...6-slaac-support-inet6-auto-accept_ra.patch | 626 ++++++++++++++++++
2 files changed, 627 insertions(+), 1 deletion(-)
create mode 100644 debian/patches/upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
diff --git a/debian/patches/series b/debian/patches/series
index d548398..8edf054 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,4 +10,4 @@ pve/0009-postinst-rm-update-network-config-compatibility.patch
pve/0010-d-rules-drop-now-default-with-systemd.patch
pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
pve/0012-postinst-reload-network-config-on-first-install.patch
-
+upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
\ No newline at end of file
diff --git a/debian/patches/upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch b/debian/patches/upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
new file mode 100644
index 0000000..1e7e126
--- /dev/null
+++ b/debian/patches/upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
@@ -0,0 +1,626 @@
+From ac2462f9426fcfcecf3e9d9647c5bb128b44a111 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier@odiso.com>
+Date: Tue, 9 May 2023 17:48:14 +0200
+Subject: [PATCH] add ipv6 slaac support (inet6 auto && accept_ra)
+
+This should fix a lot of users request in the forum,
+and also fix upgrade from ifupdown1 to ifupdown2 if user have "inet6 auto" in configuration.
+(default on stock debian install, this break pbs install on top of stock debian)
+
+upstream pull request:
+
+https://github.com/CumulusNetworks/ifupdown2/pull/259
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+---
+ etc/network/ifupdown2/addons.conf | 2 +
+ ifupdown2/addons/address.py | 104 +++++++++++++--
+ ifupdown2/addons/auto.py | 168 ++++++++++++++++++++++++
+ ifupdown2/addons/dhcp.py | 18 +--
+ ifupdown2/ifupdown/iface.py | 4 +
+ ifupdown2/ifupdown/networkinterfaces.py | 2 +-
+ ifupdown2/lib/nlcache.py | 63 ++++++++-
+ ifupdown2/man/interfaces.5.rst | 9 ++
+ ifupdown2/nlmanager/nlpacket.py | 24 +++-
+ 9 files changed, 368 insertions(+), 26 deletions(-)
+ create mode 100644 ifupdown2/addons/auto.py
+
+diff --git a/etc/network/ifupdown2/addons.conf b/etc/network/ifupdown2/addons.conf
+index 726d63a..67de25f 100644
+--- a/etc/network/ifupdown2/addons.conf
++++ b/etc/network/ifupdown2/addons.conf
+@@ -15,6 +15,7 @@ pre-up,mstpctl
+ pre-up,tunnel
+ pre-up,vrf
+ pre-up,ethtool
++pre-up,auto
+ pre-up,address
+ up,dhcp
+ up,address
+@@ -28,6 +29,7 @@ pre-down,usercmds
+ pre-down,vxrd
+ pre-down,dhcp
+ down,ppp
++down,auto
+ down,addressvirtual
+ down,address
+ down,usercmds
+diff --git a/ifupdown2/addons/address.py b/ifupdown2/addons/address.py
+index e71a26f..11e4512 100644
+--- a/ifupdown2/addons/address.py
++++ b/ifupdown2/addons/address.py
+@@ -188,6 +188,19 @@ class address(AddonWithIpBlackList, moduleBase):
+ 'default': 'off',
+ 'example': ['arp-accept on']
+ },
++ 'accept-ra': {
++ 'help': 'accept ipv6 router advertisement',
++ 'validvals': ['0', '1', '2'],
++ 'default': '0',
++ 'example': ['accept-ra 1']
++ },
++ 'autoconf': {
++ 'help': 'enable ipv6 slaac autoconfiguratoin',
++ 'validvals': ['0', '1'],
++ 'default': '0',
++ 'example': ['autoconf 1']
++ },
++
+ }
+ }
+
+@@ -256,6 +269,16 @@ class address(AddonWithIpBlackList, moduleBase):
+ attr="check_l3_svi_ip_forwarding")
+ )
+
++ try:
++ self.default_accept_ra = str(self.sysctl_get('net.ipv6.conf.all.accept_ra'))
++ except Exception:
++ self.default_accept_ra = 1
++
++ try:
++ self.default_autoconf = str(self.sysctl_get('net.ipv6.conf.all.autoconf'))
++ except Exception:
++ self.default_autoconf = 1
++
+ def __policy_get_default_mtu(self):
+ default_mtu = policymanager.policymanager_api.get_attr_default(
+ module_name=self.__class__.__name__,
+@@ -627,21 +650,31 @@ class address(AddonWithIpBlackList, moduleBase):
+ if force_reapply:
+ self.__add_ip_addresses_with_attributes(ifaceobj, ifname, user_config_ip_addrs_list)
+ return
++
++ purge_dynamic_v6_addresses = True
++ running_autoconf = self.cache.get_link_inet6_autoconf(ifaceobj)
++ if running_autoconf == '1' and not squash_addr_config:
++ purge_dynamic_v6_addresses = False
++
+ try:
+- # if primary address is not same, there is no need to keep any, reset all addresses.
+- if ordered_user_configured_ips and running_ip_addrs and ordered_user_configured_ips[0] != running_ip_addrs[0]:
+- self.logger.info("%s: primary ip changed (from %s to %s) we need to purge all ip addresses and re-add them"
+- % (ifname, ordered_user_configured_ips[0], running_ip_addrs[0]))
+- skip_addrs = []
++ # if primary ipv4 address is not same, there is no need to keep any, reset all ipv4 addresses.
++ if user_ip4 and running_ip_addrs and running_ip_addrs[0].version == 4 and user_ip4[0] != running_ip_addrs[0]:
++ self.logger.info("%s: primary ipv4 changed (from %s to %s) we need to purge all ipv4 addresses and re-add them"
++ % (ifname, user_ip4[0], running_ip_addrs[0]))
++ skip_addrs = user_ip6
+ else:
+ skip_addrs = ordered_user_configured_ips
+
+ if anycast_ip:
+ skip_addrs.append(anycast_ip)
+
++ ip_flags = self.cache.get_ip_addresses_flags(ifname)
+ for addr in running_ip_addrs:
+ if addr in skip_addrs:
+ continue
++ # don't purge dynamic ipv6 ip if autoconf is enabled
++ if addr.version == 6 and not purge_dynamic_v6_addresses and addr in ip_flags and not ip_flags[addr] & 0x80:
++ continue
+ self.netlink.addr_del(ifname, addr)
+ except Exception as e:
+ self.log_warn(str(e))
+@@ -872,7 +905,9 @@ class address(AddonWithIpBlackList, moduleBase):
+ netconf_ipv4_forwarding = self.cache.get_netconf_forwarding(socket.AF_INET, ifname)
+ netconf_ipv6_forwarding = self.cache.get_netconf_forwarding(socket.AF_INET6, ifname)
+
+- if not ifaceobj.upperifaces and not ifaceobj.get_attr_value('address') and (ifaceobj.addr_method and "dhcp" not in ifaceobj.addr_method):
++ if ( not ifaceobj.upperifaces and not ifaceobj.get_attr_value('address') and
++ ifaceobj.addr_method and "dhcp" not in ifaceobj.addr_method and "auto" not in ifaceobj.addr_method):
++
+ if netconf_ipv4_forwarding:
+ self.sysctl_write_forwarding_value_to_proc(ifname, "ipv4", 0)
+ if netconf_ipv6_forwarding:
+@@ -979,6 +1014,41 @@ class address(AddonWithIpBlackList, moduleBase):
+ ifaceobj.status = ifaceStatus.ERROR
+ self.logger.error('%s: %s' %(ifaceobj.name, str(e)))
+
++ addr_method = ifaceobj.addr_method
++ if addr_method not in ["auto"]:
++
++ try:
++ running_accept_ra = self.cache.get_link_inet6_accept_ra(ifaceobj)
++ if running_accept_ra == '':
++ running_accept_ra = self.default_accept_ra
++ accept_ra = ifaceobj.get_attr_value_first('accept-ra')
++ if accept_ra is None:
++ accept_ra = self.default_accept_ra
++
++ if running_accept_ra != accept_ra:
++ self.sysctl_set('net.ipv6.conf.%s.accept_ra'
++ %('/'.join(ifaceobj.name.split("."))),
++ accept_ra)
++ self.cache.update_link_inet6_accept_ra(ifaceobj.name, accept_ra)
++
++ running_autoconf = self.cache.get_link_inet6_autoconf(ifaceobj)
++ if running_autoconf == '':
++ running_autoconf = self.default_autoconf
++ autoconf = ifaceobj.get_attr_value_first('autoconf')
++ if autoconf is None:
++ autoconf = self.default_autoconf
++
++ if running_autoconf != autoconf:
++ self.sysctl_set('net.ipv6.conf.%s.autoconf'
++ %('/'.join(ifaceobj.name.split("."))),
++ autoconf)
++ self.cache.update_link_inet6_autoconf(ifaceobj.name, autoconf)
++
++ except Exception as e:
++ if not setting_default_value:
++ ifaceobj.status = ifaceStatus.ERROR
++ self.logger.error('%s: %s' %(ifaceobj.name, str(e)))
++
+ def process_mtu(self, ifaceobj, ifaceobj_getfunc):
+
+ if ifaceobj.link_privflags & ifaceLinkPrivFlags.OPENVSWITCH:
+@@ -1016,7 +1086,7 @@ class address(AddonWithIpBlackList, moduleBase):
+ # no need to go further during perfmode (boot)
+ return
+
+- if not user_configured_ipv6_addrgen and ifaceobj.addr_method in ["dhcp", "ppp"]:
++ if not user_configured_ipv6_addrgen and ifaceobj.addr_method in ["dhcp", "ppp", "auto"]:
+ return
+
+ if not user_configured_ipv6_addrgen:
+@@ -1213,7 +1283,7 @@ class address(AddonWithIpBlackList, moduleBase):
+ if not self.cache.link_exists(ifaceobj.name):
+ return
+ addr_method = ifaceobj.addr_method
+- if addr_method not in ["dhcp", "ppp"]:
++ if addr_method not in ["dhcp", "ppp", "auto"]:
+ if ifaceobj.get_attr_value_first('address-purge')=='no':
+ addrlist = ifaceobj.get_attr_value('address')
+ for addr in addrlist or []:
+@@ -1326,6 +1396,22 @@ class address(AddonWithIpBlackList, moduleBase):
+ ifaceobjcurr.update_config_with_status('mpls-enable',
+ running_mpls_enable,
+ mpls_enable != running_mpls_enable)
++
++ accept_ra = ifaceobj.get_attr_value_first('accept-ra')
++ if accept_ra:
++ running_accept_ra = self.cache.get_link_inet6_accept_ra(ifaceobj)
++
++ ifaceobjcurr.update_config_with_status('accept_ra',
++ running_accept_ra,
++ accept_ra != running_accept_ra)
++
++ autoconf = ifaceobj.get_attr_value_first('autoconf')
++ if autoconf:
++ running_autoconf = self.cache.get_link_inet6_autoconf(ifaceobj)
++
++ ifaceobjcurr.update_config_with_status('autoconf',
++ running_autoconf,
++ autoconf != running_autoconf)
+ return
+
+ def query_check_ipv6_addrgen(self, ifaceobj, ifaceobjcurr):
+@@ -1380,7 +1466,7 @@ class address(AddonWithIpBlackList, moduleBase):
+
+ def _query_check_address(self, ifaceobj, ifaceobjcurr, ifaceobj_getfunc):
+ """ ifquery-check: attribute: "address" """
+- if ifaceobj.addr_method in ["dhcp", "ppp"]:
++ if ifaceobj.addr_method in ["dhcp", "ppp", "auto"]:
+ return
+
+ if ifaceobj_getfunc:
+diff --git a/ifupdown2/addons/auto.py b/ifupdown2/addons/auto.py
+new file mode 100644
+index 0000000..02e6ca4
+--- /dev/null
++++ b/ifupdown2/addons/auto.py
+@@ -0,0 +1,168 @@
++#!/usr/bin/env python3
++#
++
++import re
++import time
++import socket
++
++try:
++ from ifupdown2.lib.addon import Addon
++ from ifupdown2.lib.log import LogManager
++
++ import ifupdown2.ifupdown.policymanager as policymanager
++ import ifupdown2.ifupdown.ifupdownflags as ifupdownflags
++
++ from ifupdown2.ifupdown.iface import *
++ from ifupdown2.ifupdown.utils import utils
++
++ from ifupdown2.ifupdownaddons.modulebase import moduleBase
++except (ImportError, ModuleNotFoundError):
++ from lib.addon import Addon
++ from lib.log import LogManager
++
++ import ifupdown.policymanager as policymanager
++ import ifupdown.ifupdownflags as ifupdownflags
++
++ from ifupdown.iface import *
++ from ifupdown.utils import utils
++
++ from ifupdownaddons.modulebase import moduleBase
++
++
++class auto(Addon, moduleBase):
++ """ ifupdown2 addon module to configure slaac on inet6 interface """
++
++ def __init__(self, *args, **kargs):
++ Addon.__init__(self)
++ moduleBase.__init__(self, *args, **kargs)
++
++ def syntax_check(self, ifaceobj, ifaceobj_getfunc):
++ return self.is_auto_allowed_on(ifaceobj, syntax_check=True)
++
++ def is_auto_allowed_on(self, ifaceobj, syntax_check):
++ if ifaceobj.addr_method and 'auto' in ifaceobj.addr_method:
++ return utils.is_addr_ip_allowed_on(ifaceobj, syntax_check=True)
++ return True
++
++ def _up(self, ifaceobj):
++
++ if ifaceobj.link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN:
++ self.logger.info("%s: skipping auto configuration: link-down yes" % ifaceobj.name)
++ return
++
++ try:
++ if 'inet6' in ifaceobj.addr_family:
++ running_accept_ra = self.cache.get_link_inet6_accept_ra(ifaceobj)
++ if running_accept_ra != '2':
++ accept_ra = '2'
++ self.sysctl_set('net.ipv6.conf.%s.accept_ra'
++ %('/'.join(ifaceobj.name.split("."))),
++ accept_ra)
++ self.cache.update_link_inet6_accept_ra(ifaceobj.name, accept_ra)
++
++ running_autoconf = self.cache.get_link_inet6_autoconf(ifaceobj)
++ if running_autoconf != '1':
++ autoconf = '1'
++ self.sysctl_set('net.ipv6.conf.%s.autoconf'
++ %('/'.join(ifaceobj.name.split("."))),
++ autoconf)
++ self.cache.update_link_inet6_autoconf(ifaceobj.name, autoconf)
++
++ except Exception as e:
++ self.logger.error("%s: %s" % (ifaceobj.name, str(e)))
++ ifaceobj.set_status(ifaceStatus.ERROR)
++
++ def _down(self, ifaceobj):
++ if 'inet6' in ifaceobj.addr_family:
++ self.cache.force_address_flush_family(ifaceobj.name, socket.AF_INET6)
++ self.netlink.link_down(ifaceobj.name)
++
++ def _query_check(self, ifaceobj, ifaceobjcurr):
++ if not self.cache.link_exists(ifaceobj.name):
++ return
++ ifaceobjcurr.addr_family = ifaceobj.addr_family
++ ifaceobjcurr.addr_method = 'auto'
++
++ inet6conf = self.cache.get_link_inet6_conf(ifaceobj.name)
++ if inet6conf['accept_ra'] == 2 and inet6conf['autoconf'] == 1:
++ ifaceobjcurr.status = ifaceStatus.SUCCESS
++ else:
++ ifaceobjcurr.status = ifaceStatus.ERROR
++
++ def _query_running(self, ifaceobjrunning):
++ pass
++
++ _run_ops = {'pre-up' : _up,
++ 'up' : _up,
++ 'down' : _down,
++ 'pre-down' : _down,
++ 'query-checkcurr' : _query_check,
++ 'query-running' : _query_running }
++
++ def get_ops(self):
++ """ returns list of ops supported by this module """
++ return list(self._run_ops.keys())
++
++ def run(self, ifaceobj, operation, query_ifaceobj=None, **extra_args):
++ """ run dhcp configuration on the interface object passed as argument
++
++ Args:
++ **ifaceobj** (object): iface object
++
++ **operation** (str): any of 'up', 'down', 'query-checkcurr',
++ 'query-running'
++
++ Kwargs:
++ **query_ifaceobj** (object): query check ifaceobject. This is only
++ valid when op is 'query-checkcurr'. It is an object same as
++ ifaceobj, but contains running attribute values and its config
++ status. The modules can use it to return queried running state
++ of interfaces. status is success if the running state is same
++ as user required state in ifaceobj. error otherwise.
++ """
++ op_handler = self._run_ops.get(operation)
++ if not op_handler:
++ return
++ try:
++ if (operation != 'query-running' and ifaceobj.addr_method != 'auto'):
++ return
++ except Exception:
++ return
++ if not self.is_auto_allowed_on(ifaceobj, syntax_check=False):
++ return
++
++ log_manager = LogManager.get_instance()
++
++ syslog_log_level = logging.INFO
++ disable_syslog_on_exit = None
++
++ if operation in ["up", "down"]:
++ # if syslog is already enabled we shouldn't disable it
++ if log_manager.is_syslog_enabled():
++ # save current syslog level
++ syslog_log_level = log_manager.get_syslog_log_level()
++ # prevent syslog from being disabled on exit
++ disable_syslog_on_exit = False
++ else:
++ # enabling syslog
++ log_manager.enable_syslog()
++ # syslog will be disabled once we are done
++ disable_syslog_on_exit = True
++
++ # update the current syslog handler log level if higher than INFO
++ if syslog_log_level >= logging.INFO:
++ log_manager.set_level_syslog(logging.INFO)
++
++ self.logger.info("%s: enabling syslog for auto configuration" % ifaceobj.name)
++
++ try:
++ if operation == 'query-checkcurr':
++ op_handler(self, ifaceobj, query_ifaceobj)
++ else:
++ op_handler(self, ifaceobj)
++ finally:
++ # disable syslog handler or re-set the proper log-level
++ if disable_syslog_on_exit is True:
++ log_manager.get_instance().disable_syslog()
++ elif disable_syslog_on_exit is False:
++ log_manager.set_level_syslog(syslog_log_level)
+diff --git a/ifupdown2/addons/dhcp.py b/ifupdown2/addons/dhcp.py
+index a5bf860..22bbdb4 100644
+--- a/ifupdown2/addons/dhcp.py
++++ b/ifupdown2/addons/dhcp.py
+@@ -193,20 +193,10 @@ class dhcp(Addon, moduleBase):
+ self.logger.info('dhclient6 already running on %s. '
+ 'Not restarting.' % ifaceobj.name)
+ else:
+- accept_ra = ifaceobj.get_attr_value_first('accept_ra')
+- if accept_ra:
+- # XXX: Validate value
+- self.sysctl_set('net.ipv6.conf.%s' %ifaceobj.name +
+- '.accept_ra', accept_ra)
+- autoconf = ifaceobj.get_attr_value_first('autoconf')
+- if autoconf:
+- # XXX: Validate value
+- self.sysctl_set('net.ipv6.conf.%s' %ifaceobj.name +
+- '.autoconf', autoconf)
+- try:
+- self.dhclientcmd.stop6(ifaceobj.name, duid=dhcp6_duid)
+- except Exception:
+- pass
++ try:
++ self.dhclientcmd.stop6(ifaceobj.name, duid=dhcp6_duid)
++ except Exception:
++ pass
+ #add delay before starting IPv6 dhclient to
+ #make sure the configured interface/link is up.
+ if timeout > 1:
+diff --git a/ifupdown2/ifupdown/iface.py b/ifupdown2/ifupdown/iface.py
+index 07bd067..325e6c3 100644
+--- a/ifupdown2/ifupdown/iface.py
++++ b/ifupdown2/ifupdown/iface.py
+@@ -289,6 +289,8 @@ class ifaceJsonEncoder(json.JSONEncoder):
+ if o.addr_method:
+ if 'inet' in o.addr_family and 'dhcp' in o.addr_method:
+ retifacedict['addr_method'] = 'dhcp'
++ elif 'inet6' in o.addr_family and 'auto' in o.addr_method:
++ retifacedict['addr_method'] = 'auto'
+ else:
+ retifacedict['addr_method'] = o.addr_method
+ if o.addr_family:
+@@ -843,6 +845,8 @@ class iface():
+ # both inet and inet6 addr_family
+ if addr_method and family == 'inet' and 'dhcp' in addr_method:
+ addr_method = 'dhcp'
++ elif addr_method and family == 'inet6' and 'auto' in addr_method:
++ addr_method = 'auto'
+ self._dump_pretty(family, first,
+ addr_method=addr_method,
+ with_status=with_status,
+diff --git a/ifupdown2/ifupdown/networkinterfaces.py b/ifupdown2/ifupdown/networkinterfaces.py
+index 2bebe39..3803590 100644
+--- a/ifupdown2/ifupdown/networkinterfaces.py
++++ b/ifupdown2/ifupdown/networkinterfaces.py
+@@ -30,7 +30,7 @@ class networkInterfaces():
+ """ debian ifupdown /etc/network/interfaces file parser """
+
+ _addrfams = {'inet' : ['static', 'manual', 'loopback', 'dhcp', 'dhcp6', 'ppp', 'tunnel'],
+- 'inet6' : ['static', 'manual', 'loopback', 'dhcp', 'dhcp6', 'ppp', 'tunnel']}
++ 'inet6' : ['static', 'manual', 'loopback', 'dhcp', 'dhcp6', 'ppp', 'tunnel', 'auto']}
+ # tunnel is part of the address family for backward compatibility but is not required.
+
+ def __init__(self, interfacesfile='/etc/network/interfaces',
+diff --git a/ifupdown2/lib/nlcache.py b/ifupdown2/lib/nlcache.py
+index 0b1c6d2..0d2f624 100644
+--- a/ifupdown2/lib/nlcache.py
++++ b/ifupdown2/lib/nlcache.py
+@@ -152,7 +152,7 @@ class _NetlinkCache:
+ Address.IFA_ANYCAST,
+ # Address.IFA_CACHEINFO,
+ Address.IFA_MULTICAST,
+- # Address.IFA_FLAGS
++ Address.IFA_FLAGS
+ )
+
+ def __init__(self):
+@@ -1179,6 +1179,52 @@ class _NetlinkCache:
+ except TypeError as e:
+ return self.__handle_type_error(inspect.currentframe().f_code.co_name, ifname, str(e), return_value=0)
+
++ def get_link_inet6_conf(self, ifname):
++ try:
++ with self._cache_lock:
++ return self._link_cache[ifname].attributes[Link.IFLA_AF_SPEC].value[socket.AF_INET6][Link.IFLA_INET6_CONF]
++ except (KeyError, AttributeError):
++ return False
++ except TypeError as e:
++ return self.__handle_type_error(inspect.currentframe().f_code.co_name, ifname, str(e), return_value=False)
++
++ def get_link_inet6_accept_ra(self, ifaceobj):
++ inet6conf = self.get_link_inet6_conf(ifaceobj.name)
++ if inet6conf and 'accept_ra' in inet6conf:
++ accept_ra = str(inet6conf['accept_ra'])
++ else:
++ accept_ra = ''
++ return accept_ra
++
++ def get_link_inet6_autoconf(self, ifaceobj):
++ inet6conf = self.get_link_inet6_conf(ifaceobj.name)
++ if inet6conf and 'autoconf' in inet6conf:
++ autoconf = str(inet6conf['autoconf'])
++ else:
++ autoconf = ''
++ return autoconf
++
++ def update_link_inet6_accept_ra(self, ifname, accept_ra):
++ try:
++ with self._cache_lock:
++ try:
++ self._link_cache[ifname].attributes[Link.IFLA_AF_SPEC].value[socket.AF_INET6][Link.IFLA_INET6_CONF]['accept_ra'] = accept_ra
++ except Exception as e:
++ pass
++ except Exception:
++ pass
++
++ def update_link_inet6_autoconf(self, ifname, autoconf):
++ try:
++ with self._cache_lock:
++ try:
++ self._link_cache[ifname].attributes[Link.IFLA_AF_SPEC].value[socket.AF_INET6][Link.IFLA_INET6_CONF]['autoconf'] = autoconf
++ except Exception as e:
++ pass
++ except Exception:
++ pass
++
++
+ #####################################################
+ #####################################################
+ #####################################################
+@@ -1745,6 +1791,21 @@ class _NetlinkCache:
+ except (KeyError, AttributeError):
+ return addresses
+
++ def get_ip_addresses_flags(self, ifname: str) -> dict:
++ addresses = {}
++ try:
++ with self._cache_lock:
++ intf_addresses = self._addr_cache[ifname]
++ for addr in intf_addresses.get(4, []):
++ addresses[addr.attributes[Address.IFA_ADDRESS].value] = addr.attributes[Address.IFA_FLAGS].value
++
++ for addr in intf_addresses.get(6, []):
++ addresses[addr.attributes[Address.IFA_ADDRESS].value] = addr.attributes[Address.IFA_FLAGS].value
++
++ return addresses
++ except (KeyError, AttributeError):
++ return addresses
++
+ def link_has_ip(self, ifname):
+ try:
+ with self._cache_lock:
+diff --git a/ifupdown2/man/interfaces.5.rst b/ifupdown2/man/interfaces.5.rst
+index 262d726..ca461ea 100644
+--- a/ifupdown2/man/interfaces.5.rst
++++ b/ifupdown2/man/interfaces.5.rst
+@@ -106,6 +106,12 @@ METHODS
+ The dhcp Method
+ This method may be used to obtain an address via DHCP.
+
++ **inet6** address family interfaces can use the following method:
++
++ The auto Method
++ This method may be used to obtain an address via SLAAC.
++
++
+ BUILTIN INTERFACES
+ ==================
+ **iface** sections for some interfaces like physical interfaces or vlan
+@@ -131,6 +137,9 @@ EXAMPLES
+ address 192.168.2.0/24
+ address 2001:dee:eeee:1::4/128
+
++ auto eth3
++ iface eth3 inet auto
++
+ # source files from a directory /etc/network/interfaces.d
+ source /etc/network/interfaces.d/*
+
+diff --git a/ifupdown2/nlmanager/nlpacket.py b/ifupdown2/nlmanager/nlpacket.py
+index 8972c76..0090529 100644
+--- a/ifupdown2/nlmanager/nlpacket.py
++++ b/ifupdown2/nlmanager/nlpacket.py
+@@ -1818,6 +1818,15 @@ class AttributeIFLA_AF_SPEC(Attribute):
+ */
+
+ """
++ #only first attributes used in any kernel.
++ ipv6_devconf = ['forwarding',
++ 'hop_limit',
++ 'mtu6',
++ 'accept_ra',
++ 'accept_redirects',
++ 'autoconf',
++ ]
++
+ self.decode_length_type(data)
+ self.value = {}
+
+@@ -1896,8 +1905,21 @@ class AttributeIFLA_AF_SPEC(Attribute):
+ (inet6_attr_length, inet6_attr_type) = unpack('=HH', sub_attr_data[:4])
+ inet6_attr_end = padded_length(inet6_attr_length)
+
++ if inet6_attr_type == Link.IFLA_INET6_CONF:
++ inet6conf_data = sub_attr_data[4:inet6_attr_end]
++ index = 0
++ result = {}
++ while inet6conf_data:
++ (value, undef) = unpack('=HH', inet6conf_data[:4])
++ result[ipv6_devconf[index]] = value
++ inet6conf_data = inet6conf_data[4:]
++ index = index + 1
++ if index >= len(ipv6_devconf):
++ inet6_attr[inet6_attr_type] = result
++ break
++
+ # 1 byte attr
+- if inet6_attr_type == Link.IFLA_INET6_ADDR_GEN_MODE:
++ elif inet6_attr_type == Link.IFLA_INET6_ADDR_GEN_MODE:
+ inet6_attr[inet6_attr_type] = self.decode_one_byte_attribute(sub_attr_data)
+
+ # nlmanager doesn't support multiple kernel version
+--
+2.30.2
+
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH ifupdown2 5/6] patch: remove lacp bond min-links=0 warning
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
` (3 preceding siblings ...)
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 4/6] patch: add ipv6 slaac support upstream patch Alexandre Derumier
@ 2023-05-15 22:47 ` Alexandre Derumier
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 6/6] bump version to 3.2.0-1+pmx1 Alexandre Derumier
2023-05-20 14:22 ` [pve-devel] applied: [PATCH ifupdown2 0/6] bump to 3.2.0 Thomas Lamprecht
6 siblings, 0 replies; 8+ messages in thread
From: Alexandre Derumier @ 2023-05-15 22:47 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
...bond-remove-bond-min-links-0-warning.patch | 33 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 34 insertions(+)
create mode 100644 debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch
diff --git a/debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch b/debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch
new file mode 100644
index 0000000..089b315
--- /dev/null
+++ b/debian/patches/pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch
@@ -0,0 +1,33 @@
+From df1e76e6bcdca3044ee9d53ddb62a71bedf4b8a6 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier@odiso.com>
+Date: Tue, 16 May 2023 00:33:36 +0200
+Subject: [PATCH] lacp bond: remove bond-min-links=0 warning
+
+This is only cumulus specific
+
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+---
+ ifupdown2/addons/bond.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
+index 74d2cab..4a555cc 100644
+--- a/ifupdown2/addons/bond.py
++++ b/ifupdown2/addons/bond.py
+@@ -610,13 +610,6 @@ class bond(Addon, moduleBase):
+ # if we need to reset the mode to system default
+ ifla_info_data[Link.IFLA_BOND_MODE] = ifla_bond_mode
+
+- if ifla_bond_mode == 4: # 802.3ad
+- min_links = ifla_info_data.get(Link.IFLA_BOND_MIN_LINKS)
+- if min_links is None:
+- min_links = self.cache.get_link_info_data_attribute(ifname, Link.IFLA_BOND_MIN_LINKS)
+- # get_min_links_nl may return None so we need to strictly check 0
+- if min_links == 0:
+- self.logger.warning('%s: attribute bond-min-links is set to \'0\'' % ifname)
+ else:
+ # IFLA_BOND_AD_LACP_RATE and IFLA_BOND_AD_LACP_BYPASS only for 802.3ad mode (4)
+ for nl_attr, attr_name in self._bond_lacp_attrs:
+--
+2.30.2
+
diff --git a/debian/patches/series b/debian/patches/series
index 8edf054..ab3863c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,4 +10,5 @@ pve/0009-postinst-rm-update-network-config-compatibility.patch
pve/0010-d-rules-drop-now-default-with-systemd.patch
pve/0011-d-rules-add-dh_installsystemd-override-for-compat-12.patch
pve/0012-postinst-reload-network-config-on-first-install.patch
+pve/0013-lacp-bond-remove-bond-min-links-0-warning.patch
upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
\ No newline at end of file
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH ifupdown2 6/6] bump version to 3.2.0-1+pmx1
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
` (4 preceding siblings ...)
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 5/6] patch: remove lacp bond min-links=0 warning Alexandre Derumier
@ 2023-05-15 22:47 ` Alexandre Derumier
2023-05-20 14:22 ` [pve-devel] applied: [PATCH ifupdown2 0/6] bump to 3.2.0 Thomas Lamprecht
6 siblings, 0 replies; 8+ messages in thread
From: Alexandre Derumier @ 2023-05-15 22:47 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
debian/changelog | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2105f15..e84b171 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+ifupdown2 (3.2.0-1+pmx1) bullseye; urgency=medium
+
+ * update to 3.2.0 upstream release
+
+ * remove old upstreamed patches
+
+ * add ipv6 slaac support (inet6 auto / accept_ra)
+
+ * remove lacp bond min-links=0 warning
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 15 May 2023 21:10:04 +0200
+
ifupdown2 (3.1.0-1+pmx3) bullseye; urgency=medium
* fix a point-to-point regression introduced in 3.1
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] applied: [PATCH ifupdown2 0/6] bump to 3.2.0
2023-05-15 22:47 [pve-devel] [PATCH ifupdown2 0/6] bump to 3.2.0 Alexandre Derumier
` (5 preceding siblings ...)
2023-05-15 22:47 ` [pve-devel] [PATCH ifupdown2 6/6] bump version to 3.2.0-1+pmx1 Alexandre Derumier
@ 2023-05-20 14:22 ` Thomas Lamprecht
6 siblings, 0 replies; 8+ messages in thread
From: Thomas Lamprecht @ 2023-05-20 14:22 UTC (permalink / raw)
To: Proxmox VE development discussion, Alexandre Derumier
Am 16/05/2023 um 00:47 schrieb Alexandre Derumier:
> This patch series bump version to 3.2.0.
>
> This need update of proxmox ifupdown2 mirror to last master
> a0522546b848435115a20eb647f87ade01761a33 commit , as
> the 3.2.0 tagged version is missing 1 patch fix.
FYI: After checking out the submodule at that commit, it can add
be added as normal commit change in the outer repository, that way
you can already send it along to ensure that the one applying
it doesn't forgets to do that (or chooses a wrong commit by mistake).
>
> I have remove old upstreamed patches,
> and add a new patch for ipv6 slaac support.
>
> I only have tested with debian11 currently.
>
>
> Alexandre Derumier (6):
> patch: patch5: fix code nit
> patch: remove old upstreamed patches
> patch: reorder patches
> patch: add ipv6 slaac support upstream patch
> patch: remove lacp bond min-links=0 warning
> bump version to 3.2.0-1+pmx1
applied, thanks!
FYI: I reworked the build system a bit, i.e., merged upstreams debian/ into ours
and dropped our patches related to that. This means that we have check if there
are any packaging specific changes on new releases, but also allows us to build
source pacakages for clean building and to make changes w.r.t. packaging much
easier. So if anything has to change in the debian/ folder in the future you can
just edit that directly in the top-level one, no need for patches there any more.
^ permalink raw reply [flat|nested] 8+ messages in thread