[Ns-bugs] [Bug 833] OnOffApplication with PacketSocket: sniffs all traffic

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Wed Apr 14 09:58:22 PDT 2010


http://www.nsnam.org/bugzilla/show_bug.cgi?id=833





--- Comment #6 from Josh Pelkey <jpelkey at gatech.edu>  2010-04-14 12:58:22 EDT ---
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #2)
> > > Created an attachment (id=782)
 --> (http://www.nsnam.org/bugzilla/attachment.cgi?id=782) [details] [details] [details]
> > > patch
> > > 
> > > I think this is the most elegant patch.  Calls ShutDownSend and ShutDownRecv
> > > where appropriate.  No trace files change with the patch.
> > 
> > What happens if OnOffApplication uses TCP sockets?  It seems like this might
> > not work.  For example, after applying this patch and running
> > examples/csma/csma-star.cc, the tcpdumps show a bunch of SYN ACKS coming in to
> > node 0, over and over again.
> 
> Maybe it's a bug in TCP's implementation of ShutdownSend|Recv?

I believe I understand why the patch is causing a difference in the csma-star
regression, since it uses TCP sockets with OnOffApplication.  By calling
ShutdownRecv which sets m_shutdownRecv in TcpSocketImpl, packets that make it
to TcpSocketImpl::ForwardUp are not processed any further; therefore,
ProcessEvent (which updates state) and ProcessPacketAction (which will handle
and process the acks among all the other things) are not called.  I guess maybe
this is something that should be addressed if shutting down recv is only
supposed to do so for the app and not the socket.

I am still confused about the bug.  I'm not saying it is invalid or that the
proposed solution is incorrect.  I just don't understand it.  For example, the
SetRecvCallback in OnOffApplication is never set anyway, so I don't know why
calling ShutdownRecv is needed.  And calling ShutdownSend in PacketSink, I'm
not sure what that does for you either, since PacketSink never makes any kind
of Send call.  I think I must be missing something.  Sorry for more questions
than answers :)

-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list