From: Nick Hainke Date: Sun, 13 Feb 2022 16:39:02 +0000 (+0100) Subject: olsrd: fix setting default interface config X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4afbe1748020e1677ec5529198d92e1870d3c012;p=feed%2Frouting.git olsrd: fix setting default interface config The IPC should apply the "InterfaceDefaults". Signed-off-by: Nick Hainke --- 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);