[ 
https://issues.apache.org/jira/browse/TS-4697?focusedWorklogId=25944&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25944
 ]

ASF GitHub Bot logged work on TS-4697:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Jul/16 12:17
            Start Date: 23/Jul/16 12:17
    Worklog Time Spent: 10m 
      Work Description: GitHub user oknet opened a pull request:

    https://github.com/apache/trafficserver/pull/823

    TS-4697: free MIOBuffer if fails on ipallow check.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/oknet/trafficserver TS-4697

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/823.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #823
    
----
commit c01b37af1844d739a9603a1fbb7947dd1710b4d9
Author: Oknet Xu <[email protected]>
Date:   2016-07-23T12:15:11Z

    TS-4697: free MIOBuffer if fails on ipallow check.

----


Issue Time Tracking
-------------------

            Worklog Id:     (was: 25944)
            Time Spent: 10m
    Remaining Estimate: 0h

> MIOBuffer did not free if failed on ipallow check in 
> HttpSessionAccept::accept()
> --------------------------------------------------------------------------------
>
>                 Key: TS-4697
>                 URL: https://issues.apache.org/jira/browse/TS-4697
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP, Network
>            Reporter: Oknet Xu
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code}
> void
> HttpSessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, 
> IOBufferReader *reader)
> {
>   sockaddr const *client_ip = netvc->get_remote_addr();
>   const AclRecord *acl_record = NULL;
>   ip_port_text_buffer ipb;
>   IpAllow::scoped_config ipallow;
>   // The backdoor port is now only bound to "localhost", so no
>   // reason to check for if it's incoming from "localhost" or not.
>   if (backdoor) {
>     acl_record = IpAllow::AllMethodAcl();
>   } else if (ipallow && (((acl_record = ipallow->match(client_ip)) == NULL) 
> || (acl_record->isEmpty()))) {
>     ////////////////////////////////////////////////////
>     // if client address forbidden, close immediately //
>     ////////////////////////////////////////////////////
>     Warning("client '%s' prohibited by ip-allow policy", 
> ats_ip_ntop(client_ip, ipb, sizeof(ipb)));
>     netvc->do_io_close();
>     return;   // ----------------->  MIOBuffer did not free.
>   }
> ...
> {code}



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

Reply via email to