Skip to content

Commit

Permalink
Merge branch 'development' into new/optional_webports
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER committed Jan 12, 2025
2 parents d0bb6e2 + f6440dd commit bf59f22
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/merge-conflict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check if PRs are have merge conflicts
uses: eps1lon/[email protected].2
uses: eps1lon/[email protected].3
with:
dirtyLabel: "Merge conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
6 changes: 6 additions & 0 deletions src/FTL.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
// Default: 30 (seconds)
#define QPS_AVGLEN 30

// How long should IPv6 client host name resolution be postponed?
// This is done to ensure that the network table had time to catch up on new
// clients in the network
// Default: 2 x database.DBinterval (seconds) = 120 s
#define DELAY_V6_RESOLUTION 2*config.database.DBinterval.v.ui

// Use out own syscalls handling functions that will detect possible errors
// and report accordingly in the log. This will make debugging FTL crash
// caused by insufficient memory or by code bugs (not properly dealing
Expand Down
15 changes: 15 additions & 0 deletions src/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,21 @@ static void resolveClients(const bool onlynew, const bool force_refreshing)
if((ipaddr = getstr(ippos)) != NULL && strstr(ipaddr,":") != NULL)
IPv6 = true;

// If onlynew flag is set, we will only resolve new clients.
// However, if this is a IPv6 client, we postpone the resolution
// slightly to ensure the network table has had time to possibly
// correlate the IPv6 address via a related other address (e.g.,
// IPv4 address) though an identical MAC address.
if(onlynew && newflag && IPv6 && client->firstSeen + DELAY_V6_RESOLUTION > now)
{
log_debug(DEBUG_RESOLVER, "Postponing resolution of new client %s (IPv6) for at least %.0f more seconds",
getstr(ippos), now - client->firstSeen + DELAY_V6_RESOLUTION);

unlock_shm();
skipped++;
continue;
}

unlock_shm();

// If we're in refreshing mode (onlynew == false), we skip clients if
Expand Down

0 comments on commit bf59f22

Please sign in to comment.