summaryrefslogtreecommitdiff
path: root/src/ipcpd/local
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-02-12 21:05:40 +0100
committerSander Vrijders <sander@ouroboros.rocks>2023-02-13 21:10:11 +0100
commit269f25d3bac5ab871d8044935eacc15cfeadeec6 (patch)
treed68cba31a7a4b941658836d0c0d616fc7ec6400b /src/ipcpd/local
parentc3814fa77eb7afbe6e798ded0fdff2df74ad8642 (diff)
downloadouroboros-269f25d3bac5ab871d8044935eacc15cfeadeec6.tar.gz
ouroboros-269f25d3bac5ab871d8044935eacc15cfeadeec6.zip
ipcpd: refactor IPCP configuration
The ipcp configuration struct now has internal structures for the different IPCPs and for IPCP components of the unicast IPCP. Split the very long IPCP main loop into individual handler functions. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/local')
-rw-r--r--src/ipcpd/local/main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c
index c1e95d23..f43d4713 100644
--- a/src/ipcpd/local/main.c
+++ b/src/ipcpd/local/main.c
@@ -145,11 +145,7 @@ static int ipcp_local_bootstrap(const struct ipcp_config * conf)
assert(conf->type == THIS_TYPE);
ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
- ipcpi.layer_name = strdup(conf->layer_info.layer_name);
- if (ipcpi.layer_name == NULL) {
- log_err("Failed to set layer name");
- return -ENOMEM;
- }
+ strcpy(ipcpi.layer_name,conf->layer_info.layer_name);
ipcp_set_state(IPCP_OPERATIONAL);