mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-13 22:23:38 +00:00
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@nbd.name>
This commit is contained in:
parent
7cf8f61eb2
commit
228eb7f62a
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user