summaryrefslogtreecommitdiff
path: root/src/ipcpd/broadcast
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-06-18 17:37:11 +0200
committerSander Vrijders <sander@ouroboros.rocks>2021-06-21 08:45:25 +0200
commit1a13d42a0792a4a12a40c813072355502e87c42f (patch)
tree9c86f115e7f511482d178956f67af432aa9ee39a /src/ipcpd/broadcast
parent7b13504e2a47a40ae7e5283de41d48ca3f7efb53 (diff)
downloadouroboros-1a13d42a0792a4a12a40c813072355502e87c42f.tar.gz
ouroboros-1a13d42a0792a4a12a40c813072355502e87c42f.zip
ipcpd: Move RIB initialization to common ground
This moves Resource Information Base (RIB) initialization into the ipcp_init() function, so all IPCPs initialize a RIB. The RIB not shows some common IPCP information, such as the IPCP name, IPCP state and the layer name if the IPCP is part of a layer. The initialization of the hash algorithm and layer name was moved out of the common ipcp source because IPCPs may only know this information after enrollment. Some IPCPs were not even storing this information. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/broadcast')
-rw-r--r--src/ipcpd/broadcast/main.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/ipcpd/broadcast/main.c b/src/ipcpd/broadcast/main.c
index a2643029..522d1391 100644
--- a/src/ipcpd/broadcast/main.c
+++ b/src/ipcpd/broadcast/main.c
@@ -274,17 +274,11 @@ static struct ipcp_ops broadcast_ops = {
int main(int argc,
char * argv[])
{
- if (ipcp_init(argc, argv, &broadcast_ops) < 0) {
+ if (ipcp_init(argc, argv, &broadcast_ops, THIS_TYPE) < 0) {
log_err("Failed to init IPCP.");
goto fail_init;
}
- /* These components must be init at creation. */
- if (rib_init(ipcpi.name)) {
- log_err("Failed to initialize RIB.");
- goto fail_rib_init;
- }
-
if (notifier_init()) {
log_err("Failed to initialize notifier component.");
goto fail_notifier_init;
@@ -324,8 +318,6 @@ int main(int argc,
notifier_fini();
- rib_fini();
-
ipcp_fini();
exit(EXIT_SUCCESS);
@@ -339,8 +331,6 @@ int main(int argc,
fail_connmgr_init:
notifier_fini();
fail_notifier_init:
- rib_fini();
- fail_rib_init:
ipcp_fini();
fail_init:
ipcp_create_r(-1);