about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2022-08-25 09:45:35 -0400
committerJeremy Bicha <jeremy.bicha@canonical.com>2022-08-25 13:25:31 -0400
commitfbdb119adaa44ca41dcab1b4fcd4cb119fd71ef9 (patch)
treec0bd6ac60efc0e96f656fd9dda83db041b595513
parent323dc7d39bc03ee50e0d934d4cc3124a6fb251f7 (diff)
Cherry-pick 2 patches to fix bonding regressions found by netplan autopkgtests
LP: #1987001
-rw-r--r--debian/patches/bond-fix-missing-assignment-of-lp_interval_has.patch30
-rw-r--r--debian/patches/libnm-utils-fix-typo-in-bond-ad_select-bandwidth-mode.patch28
-rw-r--r--debian/patches/series3
3 files changed, 60 insertions, 1 deletions
diff --git a/debian/patches/bond-fix-missing-assignment-of-lp_interval_has.patch b/debian/patches/bond-fix-missing-assignment-of-lp_interval_has.patch
new file mode 100644
index 00000000..989d7ac7
--- /dev/null
+++ b/debian/patches/bond-fix-missing-assignment-of-lp_interval_has.patch
@@ -0,0 +1,30 @@
+From: Fernando Fernandez Mancera <ffmancera@riseup.net>
+Date: Thu, 25 Aug 2022 15:18:08 +0200
+Subject: bond: fix missing assignment of lp_interval_has
+
+The variable `lp_interval` was being assigned instead of
+`lp_interval_has`. The `lp_interval` bond option was not being set
+correctly.
+
+https://bugs.launchpad.net/network-manager/+bug/1987001
+
+Fixes: e064eb9d1361 ('bond: use netlink to set bond options')
+(cherry picked from commit 7d4307e8dfdd6c8d33d35147d593259fbaf0f7bf)
+(cherry picked from commit 1b704e2f425ec4199386a8530b60ffbe14898025)
+---
+ src/core/devices/nm-device-bond.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/devices/nm-device-bond.c b/src/core/devices/nm-device-bond.c
+index 41473ab..44bb316 100644
+--- a/src/core/devices/nm-device-bond.c
++++ b/src/core/devices/nm-device-bond.c
+@@ -461,7 +461,7 @@ _platform_lnk_bond_init_from_setting(NMSettingBond *s_bond, NMPlatformLnkBond *p
+     props->peer_notif_delay_has = (props->miimon || props->arp_interval) && props->peer_notif_delay;
+     props->arp_all_targets_has  = props->arp_interval && props->arp_all_targets;
+     props->resend_igmp_has      = props->resend_igmp != 1;
+-    props->lp_interval          = props->lp_interval != 1;
++    props->lp_interval_has      = props->lp_interval != 1;
+     props->tlb_dynamic_lb_has   = NM_IN_SET(props->mode, NM_BOND_MODE_TLB, NM_BOND_MODE_ALB);
+ }
+ 
diff --git a/debian/patches/libnm-utils-fix-typo-in-bond-ad_select-bandwidth-mode.patch b/debian/patches/libnm-utils-fix-typo-in-bond-ad_select-bandwidth-mode.patch
new file mode 100644
index 00000000..b5f8a0be
--- /dev/null
+++ b/debian/patches/libnm-utils-fix-typo-in-bond-ad_select-bandwidth-mode.patch
@@ -0,0 +1,28 @@
+From: Fernando Fernandez Mancera <ffmancera@riseup.net>
+Date: Thu, 25 Aug 2022 15:21:44 +0200
+Subject: libnm-utils: fix typo in bond ad_select bandwidth mode
+
+The correct spelling is `bandwidth` instead of `bandwith`.
+
+https://bugs.launchpad.net/network-manager/+bug/1987001
+
+Fixes: 32870d823379 ('libnm-utils: convert string bond opts to int')
+(cherry picked from commit 5f3237acab03de4a3e9d57f50a180c5e4f6af6ca)
+(cherry picked from commit f693bc6b71247dd645522ed452035cb0d4d2a795)
+---
+ src/libnm-core-aux-intern/nm-libnm-core-utils.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libnm-core-aux-intern/nm-libnm-core-utils.c b/src/libnm-core-aux-intern/nm-libnm-core-utils.c
+index ba05b6c..4fdf9d6 100644
+--- a/src/libnm-core-aux-intern/nm-libnm-core-utils.c
++++ b/src/libnm-core-aux-intern/nm-libnm-core-utils.c
+@@ -51,7 +51,7 @@ NM_UTILS_STRING_TABLE_LOOKUP_DEFINE(
+         }
+     },
+     { return NM_BOND_AD_SELECT_STABLE; },
+-    {"bandwith", NM_BOND_AD_SELECT_BANDWIDTH},
++    {"bandwidth", NM_BOND_AD_SELECT_BANDWIDTH},
+     {"count", NM_BOND_AD_SELECT_COUNT},
+     {"stable", NM_BOND_AD_SELECT_STABLE}, );
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 1f293f47..6006cfcb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,4 +4,5 @@ Force-online-state-with-unmanaged-devices.patch
 Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch
 Update-dnsmasq-parameters.patch
 ubuntu_revert_systemd.patch
-
+bond-fix-missing-assignment-of-lp_interval_has.patch
+libnm-utils-fix-typo-in-bond-ad_select-bandwidth-mode.patch