… | |
… | |
711 | void |
711 | void |
712 | connection::reset_si () |
712 | connection::reset_si () |
713 | { |
713 | { |
714 | protocol = best_protocol (THISNODE->protocols & conf->protocols); |
714 | protocol = best_protocol (THISNODE->protocols & conf->protocols); |
715 | |
715 | |
716 | // mask out protocols we cannot establish |
716 | // mask out endpoints we can't connect to |
717 | if (!conf->udp_port) protocol &= ~PROT_UDPv4; |
717 | if (!conf->udp_port) protocol &= ~PROT_UDPv4; |
718 | if (!conf->tcp_port) protocol &= ~PROT_TCPv4; |
718 | if (!conf->tcp_port) protocol &= ~PROT_TCPv4; |
719 | if (!conf->dns_port) protocol &= ~PROT_DNSv4; |
719 | if (!conf->dns_port) protocol &= ~PROT_DNSv4; |
720 | |
720 | |
721 | if (protocol |
721 | if (protocol |
… | |
… | |
742 | slog (L_DEBUG, _("%s: no common protocol, trying indirectly through %s (%s)"), |
742 | slog (L_DEBUG, _("%s: no common protocol, trying indirectly through %s (%s)"), |
743 | conf->nodename, r->conf->nodename, (const char *)r->si); |
743 | conf->nodename, r->conf->nodename, (const char *)r->si); |
744 | return r->si; |
744 | return r->si; |
745 | } |
745 | } |
746 | else |
746 | else |
747 | slog (L_DEBUG, _("%s: node unreachable, no common protocol"), |
747 | slog (L_DEBUG, _("%s: node unreachable, no common protocol, no router"), |
748 | conf->nodename); |
748 | conf->nodename); |
749 | } |
749 | } |
750 | |
750 | |
751 | return si; |
751 | return si; |
752 | } |
752 | } |