Skip to content

[Backport 1.20]Listener: fix a crash when updating any listener that does not bind t…#18505

Merged
mathetake merged 1 commit intoenvoyproxy:release/v1.20from
lambdai:bp_listenercrash1.20_1
Oct 18, 2021
Merged

[Backport 1.20]Listener: fix a crash when updating any listener that does not bind t…#18505
mathetake merged 1 commit intoenvoyproxy:release/v1.20from
lambdai:bp_listenercrash1.20_1

Conversation

@lambdai
Copy link
Copy Markdown
Contributor

@lambdai lambdai commented Oct 7, 2021

…o port (#18421)

Commit Message:

backport e84987c to v1.20

Fix the crash caused by listener update when the any listener set bind_to_port to false.
A listener does not bind to port has no io handle. close() already check it.
Now add the check to isOpen().

Also the Tcp(or Udp)ListenSocket::duplicate() creates parent ListenSocketImpl
Make it returning the derived ListenSocket, either TcpListenSocket or UdpListenSocket

Additional Description:
Risk Level:
Testing: Unit test on duplicate. Integration test on bind_to_port.
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

…o port (envoyproxy#18421)

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
@lambdai
Copy link
Copy Markdown
Contributor Author

lambdai commented Oct 7, 2021

/assign lizan

@davinci26
Copy link
Copy Markdown
Member

davinci26 commented Oct 12, 2021

@mathetake as the stable release owner

I assume that lizan's approval means that the backport is approved

@davinci26 davinci26 added backport/review Request to backport to stable releases backport/approved Approved backports to stable releases and removed backport/review Request to backport to stable releases labels Oct 12, 2021
Copy link
Copy Markdown
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

LGTM (sorry for being late -- I had been OOO)

@mathetake mathetake merged commit c0e7e83 into envoyproxy:release/v1.20 Oct 18, 2021
@lambdai lambdai deleted the bp_listenercrash1.20_1 branch October 18, 2021 03:41
aidanhahn pushed a commit to gravitee-io/envoy that referenced this pull request Jan 13, 2022
…o port (envoyproxy#18421) (envoyproxy#18505)

backport e84987c to v1.20

Fix the crash caused by listener update when the any listener set bind_to_port to false.
A listener does not bind to port has no io handle. close() already check it.
Now add the check to isOpen().

Also the Tcp(or Udp)ListenSocket::duplicate() creates parent ListenSocketImpl
Make it returning the derived ListenSocket, either TcpListenSocket or UdpListenSocket

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/approved Approved backports to stable releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants