satishmalviya / dnp3

Automatically exported from code.google.com/p/dnp3
0 stars 0 forks source link

PhysicalLayerAsyncTCPServer::DoOpen() overwrites mEndpoint with nonsense #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PhysicalLayerAsyncTCPServer::DoOpen() passes the mEndpoint object that was 
originally used as the bind point for the mAcceptor object to 
mAcceptor.async_accept(), which will overwrite mEndpoint with the remote TCP 
endpoint of the most recently accepted connection.

Thus, if the mAcceptor were to become closed, and DoOpen() was called to reopen 
it, the mEndpoint passed to mAcceptor.bind() would be nonsense -- it would be 
the TCP endpoint of a recently connected remote host instead of a local TCP 
endpoint.

Original issue reported on code.google.com by emeze...@gmail.com on 29 Nov 2010 at 10:10

GoogleCodeExporter commented 9 years ago
Fixed on master, also improved logging

Original comment by jadamcrain on 13 Jun 2011 at 1:14