You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "B Wyatt (Created) (JIRA)" <ji...@apache.org> on 2012/01/23 16:43:40 UTC

[jira] [Created] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

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
            Priority: Trivial


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

        

[jira] [Commented] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "B Wyatt (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Updated] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "B Wyatt (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

B Wyatt updated TS-1087:
------------------------

    Attachment: txn-outgoing-addr.patch

This version of a "Fix" is small but requires any plugins that use the function (there can't be any that are up-to-date and working) to change their source.
                
> 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
>            Priority: Trivial
>         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

        

[jira] [Updated] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "B Wyatt (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

B Wyatt updated TS-1087:
------------------------

    Fix Version/s:     (was: 3.1.4)
                   3.3.0
    
> 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.3.0
>
>         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

        

[jira] [Updated] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-1087:
------------------------------

    Fix Version/s: 3.1.3
         Assignee: B Wyatt
    
> 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.3
>
>         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

        

[jira] [Commented] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "James Peach (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223986#comment-13223986 ] 

James Peach commented on TS-1087:
---------------------------------

Bart, maybe a better approach is to change the implementation to not need the socklen_t parameter? It's implied by the address family, so should not be necessary. This would fix the bug and not require plugin changes.
                
> 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

        

[jira] [Assigned] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "James Peach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Peach reassigned TS-1087:
-------------------------------

    Assignee: James Peach  (was: B Wyatt)
    
> 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: James Peach
>            Priority: Trivial
>             Fix For: 3.3.0
>
>         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

        

[jira] [Commented] (TS-1087) TSHttpTxnOutgoingAddrSet forward declaration does not match implementation

Posted by "James Peach (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225741#comment-13225741 ] 

James Peach commented on TS-1087:
---------------------------------

I don't see socklen_t anywhere in ts.h. I think that a well-formed sockaddr is sufficient. If it's not well-formed a socklen_t isn't going to save it :)

Yup, agreed about the existing users. Still, fewer parameters makes it easier to use.
                
> 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