summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-12-09 19:54:20 +0100
committerMartin Mares <mj@ucw.cz>1999-12-09 19:54:20 +0100
commitf545d38707bf01aa9db3915d782a547f89f92c1d (patch)
treeb5bb07889273603a91e63a52813e634540ddd877 /sysdep/unix/main.c
parent30bc402ebb324749f9468f8ff196545bb0a58442 (diff)
downloadbird-f545d38707bf01aa9db3915d782a547f89f92c1d.tar
bird-f545d38707bf01aa9db3915d782a547f89f92c1d.zip
Added universal locking mechanism which will solve problems
with protocols wanting to use the same port on the same interface during reconfiguration time. How to use locks: In the if_notify hook, just order locks for the interfaces you want to work with and do the real socket opening after the lock hook function gets called. When you stop using the socket, close it and rfree() the lock. Please update your protocols to use the new locking mechanism.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 5a49dbd..4b9ab61 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -22,6 +22,7 @@
#include "nest/protocol.h"
#include "nest/iface.h"
#include "nest/cli.h"
+#include "nest/locks.h"
#include "conf/conf.h"
#include "filter/filter.h"
@@ -334,6 +335,7 @@ main(int argc, char **argv)
debug("Initializing.\n");
resource_init();
+ olock_init();
io_init();
rt_init();
if_init();