bfdd: fix parameter length

There is no space reserved for "[source-addr='']".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit e6426ace1e)
This commit is contained in:
Igor Ryzhov 2020-08-24 18:45:53 +03:00 committed by Christian Poessinger
parent 5580cf83b5
commit cf28b185ce

View File

@ -109,7 +109,7 @@ DEFPY_NOSH(
VRF_NAME_STR)
{
int ret, slen;
char source_str[INET6_ADDRSTRLEN];
char source_str[INET6_ADDRSTRLEN + 32];
char xpath[XPATH_MAXLEN], xpath_srcaddr[XPATH_MAXLEN + 32];
if (multihop)
@ -168,7 +168,7 @@ DEFPY(
{
int slen;
char xpath[XPATH_MAXLEN];
char source_str[INET6_ADDRSTRLEN];
char source_str[INET6_ADDRSTRLEN + 32];
if (multihop)
snprintf(source_str, sizeof(source_str), "[source-addr='%s']",