Commit 6ef74faf authored by Štěpán Balážik's avatar Štěpán Balážik
Browse files

selection: comment out unused TCP connection information for now

parent a0a0f22e
Pipeline #72825 failed with stages
in 69 minutes and 56 seconds
......@@ -147,10 +147,12 @@ void check_tls_capable(struct address_state *address_state, struct kr_request *r
address_state->tls_capable = req->selection_context.is_tls_capable ? req->selection_context.is_tls_capable(address) : false;
}
/* TODO: uncomment this once we actually use the information it collects.
void check_tcp_connections(struct address_state *address_state, struct kr_request *req, struct sockaddr *address) {
address_state->tcp_connected = req->selection_context.is_tcp_connected ? req->selection_context.is_tcp_connected(address) : false;
address_state->tcp_waiting = req->selection_context.is_tcp_waiting ? req->selection_context.is_tcp_waiting(address) : false;
}
*/
void check_network_settings(struct address_state *address_state, size_t address_len, bool no_ipv4, bool no_ipv6) {
if (no_ipv4 && address_len == sizeof(struct in_addr)) {
......
......@@ -127,9 +127,10 @@ struct address_state {
struct rtt_state rtt_state;
knot_dname_t *ns_name;
bool tls_capable : 1;
/* TODO: uncomment these once we actually use this information in selection
bool tcp_waiting : 1;
bool tcp_connected : 1;
*/
int forward_index;
int error_count;
int unrecoverable_errors;
......@@ -212,6 +213,8 @@ uint8_t* ip_to_bytes(const union inaddr *src, size_t len);
void check_tls_capable(struct address_state *address_state, struct kr_request *req,
struct sockaddr *address);
#if 0
/* TODO: uncomment these once we actually use the information they collect. */
/**
* Check if there is a existing TCP connection to this address.
*
......@@ -219,6 +222,7 @@ void check_tls_capable(struct address_state *address_state, struct kr_request *r
*/
void check_tcp_connections(struct address_state *address_state, struct kr_request *req,
struct sockaddr *address);
#endif
/**
* Invalidate address if the respective IP version is disabled.
......
......@@ -52,7 +52,9 @@ void forward_choose_transport(struct kr_query *qry, struct kr_transport **transp
struct address_state *addr_state = &local_state->addr_states[i];
addr_state->ns_name = (knot_dname_t *)"";
check_tls_capable(addr_state, qry->request, &address->ip);
/* TODO: uncomment this once we actually use the information it collects
check_tcp_connections(addr_state, qry->request, &address->ip);
*/
check_network_settings(addr_state, addr_len, qry->flags.NO_IPV4, qry->flags.NO_IPV6);
if(addr_state->generation == -1) {
......
......@@ -198,9 +198,10 @@ void update_address_states(struct iter_local_state *local_state, struct kr_query
// Only look at valid addresses.
continue;
}
check_tls_capable(address_state, qry->request, &tmp_address.ip);
/* TODO: uncomment this once we actually use the information it collects
check_tcp_connections(address_state, qry->request, &tmp_address.ip);
*/
check_network_settings(address_state, address_len, qry->flags.NO_IPV4, qry->flags.NO_IPV6);
}
trie_it_free(it);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment