summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-01-13 08:35:36 -0500
committerGitHub <noreply@github.com>2023-01-13 08:35:36 -0500
commit930e01aae17fdf5e5717094c11da99a0e833c54e (patch)
tree40ef24be9f7e11841618062cd01f3172c3192108
parent1ab8721a5ca32842b2904333ac6d62e90a81a129 (diff)
parent0edec0dd29d7e8e1fd0176161b84ed32032af922 (diff)
Merge pull request #12626 from opensourcerouting/fix/bgpd_neighbor_password_unnumbered
bgpd: Warn user about mixed order of commands executed
-rw-r--r--bgpd/bgp_bfd.c4
-rw-r--r--bgpd/bgp_vty.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index d66b916b95..11b074af2e 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -521,10 +521,8 @@ DEFUN (neighbor_bfd_check_controlplane_failure,
else
idx_peer = 1;
peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
- if (!peer) {
- vty_out(vty, "%% Specify remote-as or peer-group commands first\n");
+ if (!peer)
return CMD_WARNING_CONFIG_FAILED;
- }
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP))
bgp_group_configure_bfd(peer);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 91f1c042df..4acf4f76aa 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -819,6 +819,9 @@ struct peer *peer_and_group_lookup_vty(struct vty *vty, const char *peer_str)
if (peer) {
if (peer_dynamic_neighbor(peer)) {
+ zlog_warn(
+ "%pBP: Operation not allowed on a dynamic neighbor",
+ peer);
vty_out(vty,
"%% Operation not allowed on a dynamic neighbor\n");
return NULL;
@@ -830,6 +833,8 @@ struct peer *peer_and_group_lookup_vty(struct vty *vty, const char *peer_str)
if (group)
return group->conf;
+ zlog_warn("Specify remote-as or peer-group commands first before: %s",
+ vty->buf);
vty_out(vty, "%% Specify remote-as or peer-group commands first\n");
return NULL;