summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-31 01:38:00 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-06-04 16:37:19 +0200
commit3c649c719f327725ebd85643ff07f18e95ecb2b5 (patch)
treee44e61b7851644887f51c7c8e1a37fa1acfa7bce /babeld
parentldpd: Allow for -N <namespace> to influence location of LDPD_SOCKET (diff)
downloadfrr-3c649c719f327725ebd85643ff07f18e95ecb2b5.tar.xz
frr-3c649c719f327725ebd85643ff07f18e95ecb2b5.zip
*: Convert to using frr_vtydir instead of DAEMON_VTY_DIR
In a variety of places we are using DAEMON_VTY_DIR, convert to use frr_vtydir. This will allow us in a future commit to have the -N namespace option be automatically used. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/babeld/babel_main.c b/babeld/babel_main.c
index eaff97a49..6e2d4ecea 100644
--- a/babeld/babel_main.c
+++ b/babeld/babel_main.c
@@ -68,7 +68,7 @@ const unsigned char ones[16] =
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
-static const char *state_file = DAEMON_VTY_DIR "/babel-state";
+static char state_file[512];
unsigned char protocol_group[16]; /* babel's link-local multicast address */
int protocol_port; /* babel's port */
@@ -187,6 +187,9 @@ main(int argc, char **argv)
}
}
+ snprintf(state_file, sizeof(state_file), "%s/%s",
+ frr_vtydir, "babel-state");
+
/* create the threads handler */
master = frr_init ();