… | |
… | |
62 | sockinfo::set (const conf_node *conf, u8 prot_) |
62 | sockinfo::set (const conf_node *conf, u8 prot_) |
63 | { |
63 | { |
64 | set (conf->hostname, |
64 | set (conf->hostname, |
65 | prot_ == PROT_UDPv4 ? conf->udp_port |
65 | prot_ == PROT_UDPv4 ? conf->udp_port |
66 | : prot_ == PROT_TCPv4 ? conf->tcp_port |
66 | : prot_ == PROT_TCPv4 ? conf->tcp_port |
|
|
67 | : prot_ == PROT_DNSv4 ? conf->dns_port |
67 | : 0, |
68 | : 0, |
68 | prot_); |
69 | prot_); |
69 | } |
70 | } |
70 | |
71 | |
71 | const sockaddr * |
72 | const sockaddr * |
… | |
… | |
118 | if (conf |
119 | if (conf |
119 | && prot & PROTv4 |
120 | && prot & PROTv4 |
120 | && conf->protocols & PROT_TCPv4 |
121 | && conf->protocols & PROT_TCPv4 |
121 | && conf->tcp_port) |
122 | && conf->tcp_port) |
122 | protocols |= PROT_TCPv4; |
123 | protocols |= PROT_TCPv4; |
|
|
124 | |
|
|
125 | if (conf |
|
|
126 | && prot & PROTv4 |
|
|
127 | && conf->protocols & PROT_DNSv4) |
|
|
128 | protocols |= PROT_DNSv4; |
123 | |
129 | |
124 | return protocols; |
130 | return protocols; |
125 | } |
131 | } |
126 | |
132 | |
127 | bool |
133 | bool |