Skip to content

netns: fix error passing from callback - #16

Merged
mdlayher merged 1 commit into
mdlayher:mainfrom
patryk4815:fixerr
Aug 7, 2025
Merged

mdlayher merged 1 commit into
mdlayher:mainfrom
patryk4815:fixerr

Conversation

@patryk4815

@patryk4815 patryk4815 commented May 7, 2025 •

Copy link
Copy Markdown
Contributor

When callback return error, it is not forwarded.
This is preventing crash when conn=c is assigning null, but err is not returned at all.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x47a21e]

@patryk4815

Copy link
Copy Markdown
Contributor Author

@mdlayher ping?

@mdlayher mdlayher left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@mdlayher
mdlayher merged commit f82fb00 into mdlayher:main Aug 7, 2025
Doridian pushed a commit to FoxDenHome/core that referenced this pull request Oct 3, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/mdlayher/socket](https://github.com/mdlayher/socket) | `v0.5.1` → `v0.7.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmdlayher%2fsocket/v0.7.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmdlayher%2fsocket/v0.5.1/v0.7.0?slim=true) |

---

### Release Notes

<details>
<summary>mdlayher/socket (github.com/mdlayher/socket)</summary>

### [`v0.7.0`](https://github.com/mdlayher/socket/blob/HEAD/CHANGELOG.md#v070)

[Compare Source](mdlayher/socket@v0.6.1...v0.7.0)

**This is the first release of package socket that only supports Go 1.26+.**

- \[New API] [PR](mdlayher/socket#18):
  add `Conn.SendmsgBuffers` to wrap `sendmsg(2)` with scatter-gather I/O
  support for multiple input buffers.
- \[New API]: add `Conn.SetsockoptBytes` and `Conn.GetsockoptBytes` for
  binary-safe byte-slice socket options on Linux.
- \[Bug Fix]: context cancelation is now honored immediately for blocking
  operations when the context also carries a deadline; previously cancelation
  was not noticed until the deadline expired.
- \[Improvement]: bump build to Go 1.26.0. Package socket now supports Go 1.26
  and Go 1.27, mirroring Go's own release policy.

### [`v0.6.1`](https://github.com/mdlayher/socket/blob/HEAD/CHANGELOG.md#v061)

[Compare Source](mdlayher/socket@v0.6.0...v0.6.1)

- \[Improvement]: update dependencies.

### [`v0.6.0`](https://github.com/mdlayher/socket/blob/HEAD/CHANGELOG.md#v060)

[Compare Source](mdlayher/socket@v0.5.1...v0.6.0)

**This is the first release of package socket that only supports Go 1.25+.**

- \[Bug Fix] [PR](mdlayher/socket#16):
  `socket.Socket` with `Config.NetNS` set now returns the error from socket
  creation inside the target network namespace, rather than silently discarding
  it and returning a nil `Conn`.
- \[Improvement]: bump build to Go 1.25.0.
- \[Improvement]: enable `golangci-lint` in CI.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjEuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.foxden.network/FoxDen/core/pulls/174
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