[ 
https://issues.apache.org/jira/browse/TS-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Susan Hinrichs updated TS-3272:
-------------------------------
    Attachment: ts-3272-2.diff

Attaching second attempt at the patch (ts-3272-2.diff).  This includes the 
adjustment to the ssl handshake flag that Lev made.  I walked through the code 
a bit, and that flag should just be left alone (unset) until later when we get 
out of the callback logic, so the handshake buffer forwarding gets triggered.  
Added a comment to that effect.

Also investigated the two calls to readSignalDone that Lev noted.  Indeed both 
are needed.  Initially I figured that the readSignalDone could be delayed until 
after the handshake buffer was forwarded, but that did not work.  Stepping 
through the code shows that the first call exercises the SSLNextProtocol 
trampeline logic.  Then the next call exercises the Tampoline accept logic.  
The handshake buffer forwarding only occurs if we have already passed the 
SSLNextProtocol trampoline logic.  My understanding of the trampoline stuff is 
pretty hazy, so I'm waving my hands a bit here.  In any case, added a comment 
here too for future travelers.

Tidied up two other things.  There was a duplicate call to  test the ssl 
handshake flag in SSLNetVConnection::net_read_io().  Eliminated the nested 
check and adjusted indentation accordingly.  

Also, updated the sample config file for the ssl_cert_loader to be 
syntactically correct.

> TS_SSL_SNI_HOOK continuously called 
> ------------------------------------
>
>                 Key: TS-3272
>                 URL: https://issues.apache.org/jira/browse/TS-3272
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Lev Stipakov
>            Assignee: Susan Hinrichs
>             Fix For: 5.3.0
>
>         Attachments: SSLNetVConnection.patch, plugin.cc, ts-3272-2.diff, 
> ts-3272.diff
>
>
> I have created a simple plugin with TS_SSL_SNI_HOOK handler. Handler starts 
> thread. Thread function has small sleep and after that calls TSVConnTunnel.
> The problem is that during sleep duration TS_SSL_SNI_HOOK handler gets 
> continuously called.
> I would expect that TS_SSL_SNI_HOOK handler should be called just once.
> See plugin code in attach.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to