Skip to content

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Jan 19, 2025

Yet another interface embedding bug.

Running all transport integration tests is a bit overkill, but the rcmgr transport integration test is the only one that tests for this behavior.

@sukunrt sukunrt requested a review from MarcoPolo January 19, 2025 20:08
Yet another interface embedding bug.

Running all transport integration tests is a bit overkill, but the rcmgr
transport integration test is the only one that tests for this behavior.
@sukunrt sukunrt force-pushed the sukun/tcpreuse-fix branch from cb7c984 to 9c80669 Compare January 19, 2025 23:11
@sukunrt sukunrt merged commit 2a580cf into master Jan 20, 2025
11 checks passed
@sukunrt sukunrt mentioned this pull request Jan 21, 2025
2color added a commit that referenced this pull request Jan 24, 2025
…bug-nat-port-mapping

* origin/marco/bring-go-nat-home: (75 commits)
  go mod tidy
  reference internal package for mockgen
  mod tidy test-plans
  Make changes to internal nat library
  ci: move to actions/upload-artifact@v4 (#3152)
  tcpreuse: fix rcmgr accounting when tcp metrics are enabled (#3142)
  fix(net/nat): data race problem of `extAddr` (#3140)
  test: fix failing test (#3141)
  quicreuse: make it possible to use an application-constructed quic.Transport (#3122)
  nat: ignore mapping if external port is 0 (#3094)
  tcpreuse: error on using tcpreuse with pnet (#3129)
  chore: Update contribution guidelines (#3134)
  tcp: fix metrics test build directive (#3052)
  webrtc: upgrade pion/webrtc to v4 (#3098)
  ci: get back on the main release track of release checker (#3117)
  webtransport: fix docstring comment for getCurrentBucketStartTime
  chore: release v0.38.1 (#3114)
  fix(httpauth): Correctly handle concurrent requests on server (#3111)
  ci: Install specific protoc version when generating protobufs (#3112)
  fix(autorelay): Move relayFinder peer disconnect cleanup to separate goroutine (#3105)
  ...
@lidel lidel mentioned this pull request Feb 11, 2025
56 tasks
MarcoPolo added a commit that referenced this pull request Jul 17, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
#3181 and
#3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
MarcoPolo added a commit that referenced this pull request Jul 17, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
#3181 and
#3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
MarcoPolo added a commit that referenced this pull request Aug 7, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
#3181 and
#3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
MarcoPolo added a commit that referenced this pull request Sep 8, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
#3181 and
#3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
MarcoPolo added a commit that referenced this pull request Sep 8, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
#3181 and
#3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
MarcoPolo added a commit that referenced this pull request Sep 8, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
#3181 and
#3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
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