Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: remove trailing null from unix abstract socket address #5678

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

jachor
Copy link
Contributor

@jachor jachor commented Sep 29, 2022

Trailing nul byte is added by golang Dial wrapper. To avoid that one should use '@socket' as address instead of '\0socket' (see 1).

This change makes go-grpc behave like grpc/grpc (see 2), making connecting to golang server with grpc_cli possible.

RELEASE NOTES:

  • client: use proper "@" semantics for connecting to abstract unix sockets. This is technically a bug fix; the result is that the address used to include a trailing NUL byte, which it should not have. This may break users creating the socket in Go by prefixing a NUL instead of an "@", though, so calling it out as a behavior change.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 29, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jachor / name: Jan Lamecki (82ecdf8)

Trailing nul byte is added by golang Dial wrapper. To avoid that one
should use '@socket' as address instead of '\0socket' (see [1]).

This change makes go-grpc behave like grpc/grpc (see [2]), making
connecting to golang server with grpc_cli possible.

[1]: https://go.googlesource.com/sys/+/master/unix/syscall_linux.go#420
[2]: https://github.com/grpc/grpc/blob/d43511f4af992862ae17c6fce5caa3ab3ce60995/src/core/lib/address_utils/parse_address.cc#L109
@dfawley dfawley added the Type: Behavior Change Behavior changes not categorized as bugs label Sep 30, 2022
@dfawley dfawley added this to the 1.50 Release milestone Sep 30, 2022
@dfawley dfawley self-requested a review September 30, 2022 15:41
@dfawley dfawley self-assigned this Sep 30, 2022
@dfawley dfawley changed the title Removes trailing \0 from unix abstract address. client: remove trailing null from unix abstract socket address Sep 30, 2022
@dfawley dfawley merged commit 54521b2 into grpc:master Sep 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Behavior Change Behavior changes not categorized as bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants