summaryrefslogtreecommitdiffstats
path: root/bfdd/control.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
commitacb594b1d825c6e12369cebb941968ec08c840ce (patch)
treed544788908e7353a4f117e2991f15f4236a0c963 /bfdd/control.c
parentAdding upstream version 9.1. (diff)
downloadfrr-acb594b1d825c6e12369cebb941968ec08c840ce.tar.xz
frr-acb594b1d825c6e12369cebb941968ec08c840ce.zip
Adding upstream version 10.0.upstream/10.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);