Skip to content

socket: fall back to SO_TIMESTAMPNS for the OLD alias - #491

Merged
jow- merged 1 commit into
ucode-lang:masterfrom
nbd168:socket-fix
Oct 13, 2026
Merged

jow- merged 1 commit into
ucode-lang:masterfrom
nbd168:socket-fix

Conversation

@nbd168

@nbd168 nbd168 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

A libc that does not define SO_TIMESTAMPNS_OLD, musl among them, took SO_TIMESTAMP instead, which is the microsecond option. The control message table then held two entries for SO_TIMESTAMP and none for SO_TIMESTAMPNS, so a nanosecond receive timestamp was never decoded and reached the script as raw octets.

A libc that does not define SO_TIMESTAMPNS_OLD, musl among them, took
SO_TIMESTAMP instead, which is the microsecond option. The control message
table then held two entries for SO_TIMESTAMP and none for SO_TIMESTAMPNS, so a
nanosecond receive timestamp was never decoded and reached the script as raw
octets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
@jow-
jow- merged commit 04589a1 into ucode-lang:master Oct 13, 2026
2 checks passed
@jow-

jow- commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants