From 2fc84ecc13a582af3ac5d5d81edfab640e164886 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 6 Dec 2024 18:06:17 +0100 Subject: [PATCH 1/2] Delay IPv6 client name lookups Signed-off-by: DL6ER --- src/FTL.h | 6 ++++++ src/resolve.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/FTL.h b/src/FTL.h index 1d2d3dbb2..5286a85b7 100644 --- a/src/FTL.h +++ b/src/FTL.h @@ -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 diff --git a/src/resolve.c b/src/resolve.c index c60797482..cede3aa25 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -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 From f6e447e69e8d675adfecc47dc1eb18162e6d26c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 10:54:50 +0000 Subject: [PATCH 2/2] Bump eps1lon/actions-label-merge-conflict Bumps the github_action-dependencies group with 1 update: [eps1lon/actions-label-merge-conflict](https://github.com/eps1lon/actions-label-merge-conflict). Updates `eps1lon/actions-label-merge-conflict` from 3.0.2 to 3.0.3 - [Release notes](https://github.com/eps1lon/actions-label-merge-conflict/releases) - [Changelog](https://github.com/eps1lon/actions-label-merge-conflict/blob/main/CHANGELOG.md) - [Commits](https://github.com/eps1lon/actions-label-merge-conflict/compare/v3.0.2...v3.0.3) --- updated-dependencies: - dependency-name: eps1lon/actions-label-merge-conflict dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github_action-dependencies ... Signed-off-by: dependabot[bot] --- .github/workflows/merge-conflict.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-conflict.yml b/.github/workflows/merge-conflict.yml index 24b299fcb..dce554074 100644 --- a/.github/workflows/merge-conflict.yml +++ b/.github/workflows/merge-conflict.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if PRs are have merge conflicts - uses: eps1lon/actions-label-merge-conflict@v3.0.2 + uses: eps1lon/actions-label-merge-conflict@v3.0.3 with: dirtyLabel: "Merge conflicts" repoToken: "${{ secrets.GITHUB_TOKEN }}"