This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 77ddfd5  Fix a crash on connection migration to the advertised 
preferred address (#7080)
77ddfd5 is described below

commit 77ddfd5a815be18e2ae6cbd0e2245fd914ba7707
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Thu Aug 6 00:44:09 2020 +0900

    Fix a crash on connection migration to the advertised preferred address 
(#7080)
    
    This closes #7045
    
    (cherry picked from commit 6223d6443aa9b36f357157b728f4f830a4777053)
---
 iocore/net/QUICNetVConnection.cc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 9d7b643..635b558 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -2288,7 +2288,9 @@ 
QUICNetVConnection::_state_connection_established_migrate_connection(const QUICP
       con.setRemote(&(p.from().sa));
       this->con.move(con);
       this->set_remote_addr();
-      this->_udp_con = p.udp_con();
+      this->_udp_con        = p.udp_con();
+      this->_packet_handler = static_cast<QUICPacketHandlerIn *>(
+        static_cast<NetAccept *>(static_cast<UnixUDPConnection 
*>(this->_udp_con)->continuation));
 
       QUICPath new_path = {p.to(), p.from()};
       this->_validate_new_path(new_path);
@@ -2305,11 +2307,13 @@ 
QUICNetVConnection::_state_connection_established_migrate_connection(const QUICP
         con.setRemote(&(p.from().sa));
         this->con.move(con);
         this->set_remote_addr();
-        this->_udp_con = p.udp_con();
+        this->_udp_con        = p.udp_con();
+        this->_packet_handler = static_cast<QUICPacketHandlerIn *>(
+          static_cast<NetAccept *>(static_cast<UnixUDPConnection 
*>(this->_udp_con)->continuation));
 
         this->_update_peer_cid(this->_alt_con_manager->migrate_to_alt_cid());
 
-        QUICPath new_path = {this->local_addr, con.addr};
+        QUICPath new_path = {p.to(), p.from()};
         this->_validate_new_path(new_path);
       }
     } else {

Reply via email to