Skip to content

nathole: return error when SetTTL fails in sendSidMessage#5261

Open
cuiweixie wants to merge 1 commit intofatedier:devfrom
cuiweixie:fix/nathole-sendSidMessage-setttl-error
Open

nathole: return error when SetTTL fails in sendSidMessage#5261
cuiweixie wants to merge 1 commit intofatedier:devfrom
cuiweixie:fix/nathole-sendSidMessage-setttl-error

Conversation

@cuiweixie
Copy link
Copy Markdown
Contributor

Summary

  • Propagate SetTTL errors in sendSidMessage instead of only logging and continuing, so UDP is not sent with an unintended TTL when TTL setup fails.
  • Matches existing behavior for TTL() failures in the same path.

Context

Per Contributing, PR targets dev.

Previously sendSidMessage logged SetTTL failures but continued, so the
packet could be sent with an unexpected TTL. Align with TTL() failure
handling by propagating the error.
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Mar 25, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • pkg/nathole/nathole.go

@fatedier
Copy link
Copy Markdown
Owner

I don’t see a clear bug being fixed here. SetTTL failure in this path is currently handled as a best-effort degradation, and this PR changes it into a hard error without a concrete failure scenario or evidence that it is the right tradeoff.

In general, please avoid sending PRs of this kind unless there is a clear abnormal case, reproducible issue, or demonstrated benefit. Otherwise they add review and maintenance cost without solving a concrete problem.

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