When trying to list advertised-routes for instance, it's not possible for now.
Relax this a bit, and allow doing this, instead of returning an error:
% Malformed address or name.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
int ret;
struct peer *peer;
union sockunion su;
+ struct peer_group *group;
/* Get peer sockunion. */
ret = str2sockunion(ip_str, &su);
if (!peer) {
peer = peer_lookup_by_hostname(bgp, ip_str);
+ if (!peer) {
+ group = peer_group_lookup(bgp, ip_str);
+ peer = listnode_head(group->peer);
+ }
+
if (!peer) {
if (use_json) {
json_object *json_no = NULL;