[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-07 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 17:38
Start Date: 07/Nov/16 17:38
Worklog Time Spent: 10m 
  Work Description: Github user PSUdaemon closed the pull request at:

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


Issue Time Tracking
---

Worklog Id: (was: 31736)
Time Spent: 5h  (was: 4h 50m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 5h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 03:51
Start Date: 07/Nov/16 03:51
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/1077/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31702)
Time Spent: 4h 50m  (was: 4h 40m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h 50m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 03:50
Start Date: 07/Nov/16 03:50
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1184/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31699)
Time Spent: 4h 40m  (was: 4.5h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h 40m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 03:37
Start Date: 07/Nov/16 03:37
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1183/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31698)
Time Spent: 4.5h  (was: 4h 20m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4.5h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 03:33
Start Date: 07/Nov/16 03:33
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/1076/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31697)
Time Spent: 4h 20m  (was: 4h 10m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h 20m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 03:28
Start Date: 07/Nov/16 03:28
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
@PSUdaemon I'm just leave the same commit message and the change log only 
for 6.2.x branch. please check the new commit message, please leave you advice, 
thanks.


Issue Time Tracking
---

Worklog Id: (was: 31696)
Time Spent: 4h 10m  (was: 4h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h 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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 03:07
Start Date: 07/Nov/16 03:07
Worklog Time Spent: 10m 
  Work Description: Github user PSUdaemon commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
I mean don't add `(backport for 6.2.x)` to the existing commit message. 
It's superfluous.


Issue Time Tracking
---

Worklog Id: (was: 31695)
Time Spent: 4h  (was: 3h 50m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-06 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 07/Nov/16 02:51
Start Date: 07/Nov/16 02:51
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
Do you means “This closes #823.“ ?

2016-11-06 12:27 GMT+08:00 Phil Sorber :

> When you do the backports can you leave the commit messages the same
> except for the cherry pick comment and the conflicts?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> 
,
> or mute the thread
> 

> .
>



Issue Time Tracking
---

Worklog Id: (was: 31693)
Time Spent: 3h 50m  (was: 3h 40m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3h 50m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-05 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 06/Nov/16 04:27
Start Date: 06/Nov/16 04:27
Worklog Time Spent: 10m 
  Work Description: Github user PSUdaemon commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
When you do the backports can you leave the commit messages the same except 
for the cherry pick comment and the conflicts?


Issue Time Tracking
---

Worklog Id: (was: 31678)
Time Spent: 3h 40m  (was: 3.5h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3h 40m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-05 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 05/Nov/16 07:07
Start Date: 05/Nov/16 07:07
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
FreeBSD build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1179/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31663)
Time Spent: 3.5h  (was: 3h 20m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3.5h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-05 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 05/Nov/16 07:07
Start Date: 05/Nov/16 07:07
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1200
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/1072/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31662)
Time Spent: 3.5h  (was: 3h 20m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3.5h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-11-05 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 05/Nov/16 07:00
Start Date: 05/Nov/16 07:00
Worklog Time Spent: 10m 
  Work Description: GitHub user oknet opened a pull request:

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

TS-4697: Free MIOBuffer if the ipallow check fails. (backport for 6.2.x)

(cherry picked from commit 40b7b484869c1876d7f82953828524c393e650ca)

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

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

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

https://github.com/apache/trafficserver/pull/1200.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 #1200


commit 4c54e20767bee53b3ffc75fd4b921bef4729aec8
Author: Oknet Xu 
Date:   2016-07-23T12:15:11Z

TS-4697: Free MIOBuffer if the ipallow check fails. (backport for 6.2.x)

(cherry picked from commit 40b7b484869c1876d7f82953828524c393e650ca)




Issue Time Tracking
---

Worklog Id: (was: 31660)
Time Spent: 3h 20m  (was: 3h 10m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3h 20m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-18 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 18/Aug/16 22:08
Start Date: 18/Aug/16 22:08
Worklog Time Spent: 10m 
  Work Description: Github user asfgit closed the pull request at:

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


Issue Time Tracking
---

Worklog Id: (was: 26608)
Time Spent: 3h 10m  (was: 3h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3h 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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-18 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 18/Aug/16 21:58
Start Date: 18/Aug/16 21:58
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/452/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 26607)
Time Spent: 3h  (was: 2h 50m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 3h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-18 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 18/Aug/16 21:55
Start Date: 18/Aug/16 21:55
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/556/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 26606)
Time Spent: 2h 50m  (was: 2h 40m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 2h 50m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-18 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 18/Aug/16 21:45
Start Date: 18/Aug/16 21:45
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
[approve ci]


Issue Time Tracking
---

Worklog Id: (was: 26604)
Time Spent: 2h 40m  (was: 2.5h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 2h 40m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-16 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 17/Aug/16 03:41
Start Date: 17/Aug/16 03:41
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/823#discussion_r75058577
  
--- Diff: iocore/net/I_SessionAccept.h ---
@@ -29,12 +29,40 @@
 
 struct AclRecord;
 
+/**
+   The base class SessionAccept can not be used directly.
+   The inherited class of SessionAccept (ex. HttpSessionAccept) is 
designed to
+
+ - Check IPAllow policy
+ - Create ClientSession
+ - Pass NetVC and MIOBuffer by call ClientSession::new_connection()
+
+   NULL mutex:
+
+ - One specific protocol has ONLY one inherited class of SessionAccept.
+
+ - The object of this class is shared by all incoming request / NetVC 
that
+   identified as the protocol by ProtocolSessionProbe.
+
+ - The inherited class of SessionAccept is non-blocked to allow 
parellel accepts
+
+   To implement a inherited class of SessionAccept:
+
+ - No state is recorded by the handler
+
+ - Values are required to be set during construction and never changed
+
+ - Can not put into EventSystem.
+
+   So a NULL mutex is safe to continuation.
+*/
+
--- End diff --

@jpeach comments added, please review.


Issue Time Tracking
---

Worklog Id: (was: 26534)
Time Spent: 2.5h  (was: 2h 20m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 2.5h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-16 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 16/Aug/16 15:44
Start Date: 16/Aug/16 15:44
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
Yeh that sounds reasonable. I'd like the comment to give accurate 
information about when the arguments need to be deleted and when the callee 
takes ownership.


Issue Time Tracking
---

Worklog Id: (was: 26505)
Time Spent: 2h 20m  (was: 2h 10m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 2h 20m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-15 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 15/Aug/16 08:33
Start Date: 15/Aug/16 08:33
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
@jpeach Do you means L175 ~ L184 in proxy/http/HttpSessionAccept.h ?
```
175 /**
176The continuation mutex is NULL to allow parellel accepts in NT. No
177state is recorded by the handler and values are required to be set
178during construction via the @c Options struct and never changed. So
179a NULL mutex is safe.
180 
181Most of the state is simply passed on to the @c ClientSession after
182an accept. It is done here because this is the least bad pathway
183from the top level configuration to the HTTP session.
184 */
185 
186 class HttpSessionAccept : public SessionAccept, private 
detail::HttpSessionAcceptOptions
```

Just copy the comment from HttpSessionAccept.h to I_SessionAccept.h maybe 
with minor changes ?


Issue Time Tracking
---

Worklog Id: (was: 26421)
Time Spent: 2h 10m  (was: 2h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 2h 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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-11 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 12/Aug/16 04:42
Start Date: 12/Aug/16 04:42
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
Thanks @oknet. Can you please document the invariants for ``accept`` in 
``I_SessionAccept.h``?


Issue Time Tracking
---

Worklog Id: (was: 26353)
Time Spent: 2h  (was: 1h 50m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 2h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-01 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 01/Aug/16 22:43
Start Date: 01/Aug/16 22:43
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
You don't need to hold a mutex to free anything. In all of these cases, the 
callee is supposed to consume both parameters. For consistency, we should not 
sometime consume only some of the parameters.


Issue Time Tracking
---

Worklog Id: (was: 26133)
Time Spent: 1h 40m  (was: 1.5h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 1h 40m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-08-01 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 01/Aug/16 10:00
Start Date: 01/Aug/16 10:00
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
@jpeach SessionAccept is a interface to create ClientSession. Its mutex is 
NULL, it is not safe to release any resource. The caller to SessionAccept is 
Trampline that mutex is copy from NetVC, it is safe to handle resource release. 
This is why I'm free MIOBuffer in Trampline.


Issue Time Tracking
---

Worklog Id: (was: 26117)
Time Spent: 1.5h  (was: 1h 20m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 1.5h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-07-28 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 29/Jul/16 01:51
Start Date: 29/Jul/16 01:51
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
We don't really use event return values outside of event handlers, so if we 
return a failure from ``accept()``, it should just be a ``bool``.

Originally, the contract for ``SessionAccept::accept()`` was that it always 
consumed its arguments. This means that it should be responsible for releasing 
the ``MIOBuffer`` on failure. With your proposal, the caller deleted the buffer 
but the callee closes the vc. Both the vc and the buffer should be treated 
consistently, so either enforce the original contract, or delete any allocated 
buffers in the leaf handlers when they fail  (updating the comments that 
describe the calling contract).


Issue Time Tracking
---

Worklog Id: (was: 26080)
Time Spent: 1h 20m  (was: 1h 10m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 1h 20m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-07-24 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 25/Jul/16 03:22
Start Date: 25/Jul/16 03:22
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
clang-format fixed. @zwoop


Issue Time Tracking
---

Worklog Id: (was: 25969)
Time Spent: 1h 10m  (was: 1h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 1h 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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-07-23 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 23/Jul/16 15:45
Start Date: 23/Jul/16 15:45
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/476/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25956)
Time Spent: 1h  (was: 50m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 1h
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-07-23 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 23/Jul/16 15:40
Start Date: 23/Jul/16 15:40
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
@oknet This failed clang-format, please fix and push update :).


Issue Time Tracking
---

Worklog Id: (was: 25955)
Time Spent: 50m  (was: 40m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 50m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-07-23 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 23/Jul/16 15:38
Start Date: 23/Jul/16 15:38
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/373/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25954)
Time Spent: 40m  (was: 0.5h)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 40m
>  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)


[jira] [Work logged] (TS-4697) MIOBuffer is not freed if ipallow check fails in HttpSessionAccept::accept()

2016-07-23 Thread ASF GitHub Bot (JIRA)

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

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

Author: ASF GitHub Bot
Created on: 23/Jul/16 15:33
Start Date: 23/Jul/16 15:33
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on the issue:

https://github.com/apache/trafficserver/pull/823
  
Certainly seems reasonable to me. [approve ci]


Issue Time Tracking
---

Worklog Id: (was: 25953)
Time Spent: 0.5h  (was: 20m)

> MIOBuffer is not freed if ipallow check fails 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
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 0.5h
>  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)