[ 
https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224817#comment-13224817
 ] 

B Wyatt commented on TS-1087:
-----------------------------

I am not at head at the moment, but at least in my version the president set by 
the rest of the API had socklen_t passed in as a parameter.  Is that still the 
case?

I can see the argument either way, the addition of a socklen_t parameter at 
least gives the backend a fighting chance to not read invalid memory if a 
plugin calls in with a malformed socket address type (like a sockaddr_in with 
AF_INET6 for a family).  In a case where the data is correct, it is useless.

FWIW, the signature of the implementation included the socklen_t so either 
nobody was using this function with a recent version of trafficserver 
(unresolved at library load time) -or- they are already using the socklen_t 
parameter and counting on a rogue forward declaration or voodoo to link it.  


                
> TSHttpTxnOutgoingAddrSet forward declaration does not match implementation
> --------------------------------------------------------------------------
>
>                 Key: TS-1087
>                 URL: https://issues.apache.org/jira/browse/TS-1087
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: TS API
>    Affects Versions: 3.1.0
>            Reporter: B Wyatt
>            Assignee: B Wyatt
>            Priority: Trivial
>             Fix For: 3.1.5
>
>         Attachments: txn-outgoing-addr.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> ts.h.in lists the following declaration:
> {code}TSReturnCode TSHttpTxnOutgoingAddrSet(TSHttpTxn txnp, struct sockaddr 
> const* addr);{code}
> However, the current implementation has this function sig:
> {code}tsapi TSReturnCode TSHttpTxnOutgoingAddrSet(TSHttpTxn txnp, struct 
> sockaddr const* addr, socklen_t addrlen);{code}
> Trafficserver is unable to load plugins which use this function due to the 
> unresolved symbol.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to