def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):
        # If ipv6 is enabled on the platform, ipv6_gateway config flag is
        # not set and external_network associated to the router does not
        # include any IPv6 subnet, enable the gateway interface to accept
        # Router Advts from upstream router for default route.
        ex_gw_port_id = ri.ex_gw_port or ri.ex_gw_port['id']
        if state == 'master' and ex_gw_port_id and ri.use_ipv6:
            gateway_ips = ri._get_external_gw_ips(ri.ex_gw_port)
            if not ri.is_v6_gateway_set(gateway_ips):
                interface_name = ri.get_external_device_name(ex_gw_port_id)
                if ri.router.get('distributed', False):
                    namespace = ri.ha_namespace
                else:
                    namespace = ri.ns_name
                ri.driver.configure_ipv6_ra(namespace, interface_name)
dataset/ETHPy150Open openstack/neutron/neutron/agent/l3/ha.py/AgentMixin._configure_ipv6_ra_on_ext_gw_port_if_necessary/operator `and` -> `or`