diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-03 17:38:38 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-03 17:38:38 +0100 |
commit | 4cce733fc200ebb69fccacc35fde9aa9b7264ad3 (patch) | |
tree | 1177c6be9594a650b627fcc74b1458c3805dc766 /bfdd | |
parent | Merge pull request #8183 from kuldeepkash/multicast_pim_bsm (diff) | |
download | frr-4cce733fc200ebb69fccacc35fde9aa9b7264ad3.tar.xz frr-4cce733fc200ebb69fccacc35fde9aa9b7264ad3.zip |
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>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfdd_cli.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bfdd/bfdd_cli.c b/bfdd/bfdd_cli.c index b9e790361..84354e243 100644 --- a/bfdd/bfdd_cli.c +++ b/bfdd/bfdd_cli.c @@ -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), |