summaryrefslogtreecommitdiffstats
path: root/bfdd/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfdd/control.c')
-rw-r--r--bfdd/control.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bfdd/control.c b/bfdd/control.c
index f435358..98fd813 100644
--- a/bfdd/control.c
+++ b/bfdd/control.c
@@ -12,6 +12,9 @@
#include <zebra.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
#include <sys/un.h>
#include "bfd.h"
@@ -92,11 +95,11 @@ int control_init(const char *path)
mode_t umval;
struct sockaddr_un sun_ = {
.sun_family = AF_UNIX,
- .sun_path = BFDD_CONTROL_SOCKET,
};
- if (path)
- strlcpy(sun_.sun_path, path, sizeof(sun_.sun_path));
+ assert(path);
+
+ strlcpy(sun_.sun_path, path, sizeof(sun_.sun_path));
/* Remove previously created sockets. */
unlink(sun_.sun_path);