luci-mod-network: exclude alias to self from device picker
authorJo-Philipp Wich <jo@mein.io>
Fri, 8 Dec 2023 12:01:13 +0000 (13:01 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 8 Dec 2023 12:02:49 +0000 (13:02 +0100)
Do not present alias to self as valid choice in the interface device picker.

Fixes: #6754
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 864bf25244a073bf85272524cd90df0a41629577)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index ebd9c05c56a3c7683d0736fc591dd33685184b20..ad2f21789e777f676ee48d9d0f019cbb884f3700 100644 (file)
@@ -588,6 +588,7 @@ return view.extend({
                                o.nobridges = false;
                                o.optional = false;
                                o.network = ifc.getName();
+                               o.exclude = '@' + ifc.getName();
 
                                o = s.taboption('general', form.Flag, 'auto', _('Bring up on boot'));
                                o.modalonly = true;