Y2038 problem in Npcap?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 592
- PR merge metrics
- No merged PRs in 30d
Description
Npcap passes packets with a struct bpf_hdr header. The bh_timestamp member is a struct timeval which uses long as the type for tv_usec. This is the same as struct timeval that Windows defines in winsock2.h, and libpcap specifically states that this struct timeval is system-dependent. Packets captured after 19 January 2038 will appear to be captured in 1970. Fixing this issue will require coordination with the-tcpdump-group/libpcap.
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 examining Npcap's struct bpf_hdr and its bh_timestamp struct timeval, then review the linked libpcap definition and its system-dependent timeval note. Coordinate with the-tcpdump-group/libpcap on a compatible representation, and verify that packets captured after 19 January 2038 no longer appear to have 1970 timestamps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100