Skip to content

Return ENOENT for missing original destinations - #15279

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl992760181
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl992760181

Conversation

@copybara-service

Copy link
Copy Markdown

Return ENOENT for missing original destinations

Match Linux's SO_ORIGINAL_DST result when conntrack has no matching connection 1. Both the uninitialized-table guard and an initialized conntrack lookup returned ENOTCONN. The guard and syscall expectation introduced in b3ff31d prevented a panic but used the wrong errno.

Return the existing ENOENT error from both lookup paths. Extend the NAT reaping test to verify the original destination while tracked and the missing-connection error after reaping. Correct the syscall expectation, close its socket through FileDescriptor, and remove the unrelated raw socket capability requirement from this TCP query.

Assisted-by: OpenAI Codex

FUTURE_COPYBARA_INTEGRATE_REVIEW=#15169 from tamird:original-dst-missing-connection d601665

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 3, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl992760181 branch 13 times, most recently from 5a87cf4 to 4b92463 Compare October 6, 2026 01:27
Match Linux's SO_ORIGINAL_DST result when conntrack has no matching connection [1]. Both the uninitialized-table guard and an initialized conntrack lookup returned ENOTCONN. The guard and syscall expectation introduced in b3ff31d prevented a panic but used the wrong errno.

Return the existing ENOENT error from both lookup paths. Extend the NAT reaping test to verify the original destination while tracked and the missing-connection error after reaping. Correct the syscall expectation, close its socket through FileDescriptor, and remove the unrelated raw socket capability requirement from this TCP query.

[1]: https://github.com/torvalds/linux/blob/830b3c68c/net/netfilter/nf_conntrack_proto.c#L254-L307

Assisted-by: OpenAI Codex

<!-- codex-thread: 01a0680f-bbf5-7511-95f7-4414f4e10d2e -->

FUTURE_COPYBARA_INTEGRATE_REVIEW=#15169 from tamird:original-dst-missing-connection d601665
PiperOrigin-RevId: 992760181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant