forked from Mirror/frr
bfdd: require local-address when using multihop
If local-address is not supplied, then an incorrect xpath is generated which is not expected by NB CLI. Fixes #7465. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
f60e5fd3d1
commit
4cce733fc2
|
@ -117,10 +117,14 @@ DEFPY_YANG_NOSH(
|
|||
char source_str[INET6_ADDRSTRLEN + 32];
|
||||
char xpath[XPATH_MAXLEN], xpath_srcaddr[XPATH_MAXLEN + 32];
|
||||
|
||||
if (multihop)
|
||||
if (multihop) {
|
||||
if (!local_address_str) {
|
||||
vty_out(vty, "%% local-address is required when using multihop\n");
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
snprintf(source_str, sizeof(source_str), "[source-addr='%s']",
|
||||
local_address_str);
|
||||
else
|
||||
} else
|
||||
source_str[0] = 0;
|
||||
|
||||
slen = snprintf(xpath, sizeof(xpath),
|
||||
|
|
Loading…
Reference in a new issue