diff options
| author | Nick Hainke <vincent@systemli.org> | 2022-02-13 17:39:02 +0100 |
|---|---|---|
| committer | Nick Hainke <vincent@systemli.org> | 2022-02-13 18:15:12 +0100 |
| commit | 4afbe1748020e1677ec5529198d92e1870d3c012 (patch) | |
| tree | 6025ec29066d9e819f857e3ede83bd031cf872bb /olsrd | |
| parent | d7adf188eb410fdd4df28be71c7c9c2cb5e36e3a (diff) | |
olsrd: fix setting default interface config
The IPC should apply the "InterfaceDefaults".
Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'olsrd')
| -rw-r--r-- | olsrd/src/src/ubus.c | 5 |
1 files 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 <sys/ioctl.h> #include <sys/socket.h> +#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); |
