diff --git a/docs/changes.txt b/docs/changes.txt index 585353a..13518d8 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -96,3 +96,4 @@ v0.7.1 * init.d: fix non-working incoming redirect * nfqws2: cancel reasm if server window size is smaller than expected reasm size * nfqws2: add EOL at the end of truncated buffered DLOG line if it's too large. increase log line buffer +* nfqws2: autohostlist reset fail counter if udp_in > threshold diff --git a/nfq2/desync.c b/nfq2/desync.c index 98aa55f..d96071c 100644 --- a/nfq2/desync.c +++ b/nfq2/desync.c @@ -348,15 +348,20 @@ static void process_udp_fail(t_ctrack *ctrack, const t_ctrack_positions *tpos, c if (!params.server && ctrack && ctrack->dp && ctrack->hostname && ctrack->hostname_ah_check && !ctrack->failure_detect_finalized && ctrack->dp->hostlist_auto_udp_out) { + char client_ip_port[48]; + if (!tpos) tpos = &ctrack->pos; //printf("UDP_POS %u %u\n",tpos->client.pcounter, tpos->server.pcounter); if (tpos->server.pcounter > ctrack->dp->hostlist_auto_udp_in) + { // success ctrack->failure_detect_finalized = true; + fill_client_ip_port(client, client_ip_port, sizeof(client_ip_port)); + auto_hostlist_reset_fail_counter(ctrack->dp, ctrack->hostname, client_ip_port, ctrack->l7proto); + } else if (tpos->client.pcounter >= ctrack->dp->hostlist_auto_udp_out) { // failure - char client_ip_port[48]; ctrack->failure_detect_finalized = true; fill_client_ip_port(client, client_ip_port, sizeof(client_ip_port)); HOSTLIST_DEBUGLOG_APPEND("%s : profile %u (%s) : client %s : proto %s : udp_in %u<=%u udp_out %u>=%u",