… | |
… | |
135 | && prot_ & PROT_UDPv4 |
135 | && prot_ & PROT_UDPv4 |
136 | && conf->protocols & PROT_UDPv4 |
136 | && conf->protocols & PROT_UDPv4 |
137 | && conf->udp_port) |
137 | && conf->udp_port) |
138 | { |
138 | { |
139 | prot = prot_; |
139 | prot = prot_; |
140 | port = conf->udp_port; |
140 | port = htons (conf->udp_port); |
141 | return true; |
141 | return true; |
142 | } |
142 | } |
143 | |
143 | |
144 | if (conf |
144 | if (conf |
145 | && prot_ & PROT_TCPv4 |
145 | && prot_ & PROT_TCPv4 |
146 | && conf->protocols & PROT_TCPv4 |
146 | && conf->protocols & PROT_TCPv4 |
147 | && conf->tcp_port) |
147 | && conf->tcp_port) |
148 | { |
148 | { |
149 | prot = prot_; |
149 | prot = prot_; |
150 | port = conf->tcp_port; |
150 | port = htons (conf->tcp_port); |
151 | return true; |
151 | return true; |
152 | } |
152 | } |
153 | } |
153 | } |
154 | |
154 | |
155 | return false; |
155 | return false; |