[openwrt/openwrt] unetd: cli: fix editing service config attributes
LEDE Commits
lede-commits at lists.infradead.org
Thu Mar 13 03:23:19 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/228eb7f62ad3a3b4e9101a7a840b26aef469009e
commit 228eb7f62ad3a3b4e9101a7a840b26aef469009e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Mar 11 12:46:25 2025 +0100
unetd: cli: fix editing service config attributes
They must be set on the config object instead of the main service object
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/network/services/unetd/files/unet.uc | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/network/services/unetd/files/unet.uc b/package/network/services/unetd/files/unet.uc
index 023ea3e6b8..06437c282c 100644
--- a/package/network/services/unetd/files/unet.uc
+++ b/package/network/services/unetd/files/unet.uc
@@ -937,6 +937,12 @@ function is_vxlan_service(ctx, argv, named, spec)
return type == "vxlan";
}
+function get_config_object(ctx, spec, obj, argv)
+{
+ obj.config ??= {};
+ return obj.config;
+}
+
const service_editor = {
change_cb: function(ctx, argv) {
ctx.data.netdata.changed = true;
@@ -964,6 +970,7 @@ const service_editor = {
help: "VXLAN ID",
attribute: "id",
available: is_vxlan_service,
+ get_object: get_config_object,
args: {
type: "int",
min: 0,
@@ -974,6 +981,7 @@ const service_editor = {
help: "VXLAN port",
attribute: "port",
available: is_vxlan_service,
+ get_object: get_config_object,
args: {
type: "int",
min: 1,
@@ -984,6 +992,7 @@ const service_editor = {
help: "VXLAN tunnel MTU",
attribute: "mtu",
available: is_vxlan_service,
+ get_object: get_config_object,
args: {
type: "int",
min: 1280,
@@ -994,6 +1003,7 @@ const service_editor = {
help: "Member allowed to receive broad-/multicast and unknown unicast",
attribute: "forward_ports",
available: is_vxlan_service,
+ get_object: get_config_object,
multiple: true,
args: {
type: "enum",
More information about the lede-commits
mailing list