diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:24:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:24:31 +0000 |
commit | acb594b1d825c6e12369cebb941968ec08c840ce (patch) | |
tree | d544788908e7353a4f117e2991f15f4236a0c963 /bfdd/control.c | |
parent | Adding upstream version 9.1. (diff) | |
download | frr-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.c | 9 |
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); |