import ipaddress


def get_ip_addresses(cidr):
    """Get list of hosts within given network cidr."""
    network = ipaddress.ip_network(cidr)
    hosts = list(network.hosts())
    if not hosts:
        return [network.network_address]
    return hosts