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

Do not cache local/remote address when creating EpollDatagramChannel with InternetProtocolFamily #9436

Merged
merged 2 commits into from Aug 11, 2019

Conversation

@violetagg
Copy link
Contributor

commented Aug 7, 2019

Motivation:

EpollDatagramChannel#localAddress returns wrong information when
EpollDatagramChannel is created with InternetProtocolFamily,
and EpollDatagramChannel#localAddress is invoked BEFORE the actual binding.

This is a regression caused by change
e17ce93

Modifications:

EpollDatagramChannel() and EpollDatagramChannel(InternetProtocolFamily family)
do not cache local/remote address

Result:

Rebinding on the same address without "reuse port" works
EpollDatagramChannel#localAddress returns correct address

Do not cache local/remote address when creating EpollDatagramChannel …
…with InternetProtocolFamily

Motivation:

EpollDatagramChannel#localAddress returns wrong information when
EpollDatagramChannel is created with InternetProtocolFamily,
and EpollDatagramChannel#localAddress is invoked BEFORE the actual binding.

This is a regression caused by change
e17ce93

Modifications:

EpollDatagramChannel() and EpollDatagramChannel(InternetProtocolFamily family)
do not cache local/remote address

Result:

Rebinding on the same address without "reuse port" works
EpollDatagramChannel#localAddress returns correct address
@netty-bot

This comment has been minimized.

Copy link

commented Aug 7, 2019

Can one of the admins verify this patch?

@normanmaurer

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

@netty-bot test this please

@normanmaurer

This comment has been minimized.

Copy link
Member

commented Aug 10, 2019

@violetagg can you add a unit test that would fail without this change ?

@violetagg

This comment has been minimized.

Copy link
Contributor Author

commented Aug 10, 2019

@normanmaurer Added unit tests

@violetagg violetagg force-pushed the violetagg:udp-localaddress branch from 1962254 to 6f519ad Aug 10, 2019

@normanmaurer

This comment has been minimized.

Copy link
Member

commented Aug 11, 2019

@netty-bot test this please

@normanmaurer normanmaurer added this to the 4.1.39.Final milestone Aug 11, 2019

@normanmaurer normanmaurer merged commit bcf6d56 into netty:4.1 Aug 11, 2019

3 checks passed

pull request validation (centos6-java11) Build finished.
Details
pull request validation (centos6-java12) Build finished.
Details
pull request validation (centos6-java8) Build finished.
Details
@normanmaurer

This comment has been minimized.

Copy link
Member

commented Aug 11, 2019

@violetagg thanks a lot!

normanmaurer added a commit that referenced this pull request Aug 11, 2019

Do not cache local/remote address when creating EpollDatagramChannel …
…with InternetProtocolFamily (#9436)

Motivation:

EpollDatagramChannel#localAddress returns wrong information when
EpollDatagramChannel is created with InternetProtocolFamily,
and EpollDatagramChannel#localAddress is invoked BEFORE the actual binding.

This is a regression caused by change
e17ce93

Modifications:

EpollDatagramChannel() and EpollDatagramChannel(InternetProtocolFamily family)
do not cache local/remote address

Result:

Rebinding on the same address without "reuse port" works
EpollDatagramChannel#localAddress returns correct address
@violetagg

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2019

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.