Regression in packet synchronization with pcap_sendqueue_transmit
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 592
- PR merge metrics
- No merged PRs in 30d
Description
Change introduced in https://github.com/nmap/npcap/commit/10d4de94fdfa7ec4d84ba3311c41c95226473a75#diff-fbde706694dbead2c023e9f5ba579b5d724a4a35c8831f03df023c9f0ee183c8R2620-R2623 are causing the microsecond part of the timestamp to be ignored.
(TimeFreq.QuadPart) / 1000000 will return zero if TimeFreq is less than 1000000 and inaccurate number if TimeFreq is not multiple of 1000000 (integer division), causing the whole microsecond part to be miscalculated.
As the original code indicates, the division should be the last operation, otherwise the delta time precision will be messed up.
This causes the entire pcap_sendqueue_transmit to miscalculate the delta time and breaking it completely in sync mode.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting commit 10d4de94fdfa7ec4d84ba3311c41c95226473a75 and the referenced diff around the timestamp calculation. Trace pcap_sendqueue_transmit in sync mode, then verify that packet timestamp deltas retain their microsecond precision and transmission remains synchronized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100