mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 04:52:01 +00:00
bgpd: Warn an operator, that the peer MUST be created before configuring rest
For now, if the order was mixed, most of the commands are just silently ignored. Let the operator notice that. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
01dbc4b384
commit
3b56a646b2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user