luci-mod-network: fix default policy for bondig device
authorNicolò Veronese <[email protected]>
Sun, 4 May 2025 16:13:50 +0000 (18:13 +0200)
committerPaul Donald <[email protected]>
Sat, 17 May 2025 10:22:01 +0000 (12:22 +0200)
This fixes the missing policy option in UCI when selecting 'active-backup'
 as the required policy.

This has been discussed on issue #7683.

Signed-off-by: Nicolò Veronese <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index 477fab26e41067db142c88f1b7c60921984f0b2c..c342d3ce92716f9d147f40d7ef7848f2c861b0ee 100644 (file)
@@ -619,7 +619,7 @@ return baseclass.extend({
                o.depends('type', 'bonding');
 
                o = this.replaceOption(s, 'devgeneral', form.ListValue, 'policy', _('Bonding Policy'));
-               o.default = 'active-backup';
+               o.default = 'balance-rr';
                o.value('active-backup', _('Active backup'));
                o.value('balance-rr', _('Round robin'));
                o.value('balance-xor', _('Transmit hash - balance-xor'));
@@ -660,7 +660,7 @@ return baseclass.extend({
                                return 'balance-alb';
 
                        default:
-                               return 'active-backup';
+                               return 'balance-rr';
                        }
                };
                o.depends('type', 'bonding');