diff --git a/apps/protocols/bgp/4/mode/bgppeerstate.pm b/apps/protocols/bgp/4/mode/bgppeerstate.pm index a7d2f9645..9ec1a9bf5 100644 --- a/apps/protocols/bgp/4/mode/bgppeerstate.pm +++ b/apps/protocols/bgp/4/mode/bgppeerstate.pm @@ -199,6 +199,11 @@ sub manage_selection { seconds => $mapped_value->{bgpPeerInUpdateElpasedTime}, as => $mapped_value->{bgpPeerRemoteAs}, display => $instance }; } + + if (scalar(keys %{$self->{peers}}) <= 0) { + $self->{output}->add_option_msg(short_msg => 'No peers detected, check your filter ? '); + $self->{output}->option_exit(); + } } 1;