def contains_all_required_firewalls(firewall, topology):
    """
    Check that the list of firewall settings contains all necessary firewall settings
    """
    for src, row in enumerate(topology):
        for dest, col in enumerate(row):
            if src == dest:
                continue
            if col == 1 and (str((src, dest)) not in firewall or str((dest, src)) not in firewall):
                return False
    return True