From 4afbe1748020e1677ec5529198d92e1870d3c012 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 13 Feb 2022 17:39:02 +0100 Subject: [PATCH] olsrd: fix setting default interface config The IPC should apply the "InterfaceDefaults". Signed-off-by: Nick Hainke --- olsrd/src/src/ubus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/olsrd/src/src/ubus.c b/olsrd/src/src/ubus.c index d344dc3..bc48adc 100644 --- a/olsrd/src/src/ubus.c +++ b/olsrd/src/src/ubus.c @@ -13,6 +13,7 @@ #include #include +#include "defs.h" #include "ifnet.h" #include "interfaces.h" #include "log.h" @@ -62,8 +63,8 @@ static int olsrd_ubus_add_interface(struct ubus_context *ctx_local, } struct olsr_if *tmp_ifs = olsr_create_olsrif(ifname, false); - struct if_config_options *default_ifcnf = get_default_if_config(); - tmp_ifs->cnf = default_ifcnf; + tmp_ifs->cnf = olsr_malloc(sizeof(struct if_config_options),"Set default config"); + *tmp_ifs->cnf = *olsr_cnf->interface_defaults; blob_buf_init(&b, 0); blobmsg_add_string(&b, "adding", ifname); -- 2.30.2