[Ns-bugs] [Bug 231] IP Address Confusion in Echo Applications
bugzilla-daemon at nsnam-www.ece.gatech.edu
Tue Jun 24 14:49:40 PDT 2008
------- Comment #3 from craigdo at ee.washington.edu 2008-06-24 17:49 -------
> The only reasonable option seems to be to call Packet::RemoveAllTags in the
> server before sending back the packet to the client. Patch attached.
Hmmm. This doesn't sound like a very good solution to me. The root of the
problem is in the socket code, not the echo server code. I don't think it's a
good plan to have the echo server just strip off all of the tags because the
socket code doesn't deal with the tags it adds properly.
I would be very surprised to find that some random application just decided to
delete all the tags I very carefully added in my simulation.
*The* problem is that (I'll use UDP) ForwardUp creates and attaches a
SocketAddressTag to a packet and queues the packet. RecvFrom dequeues the
packet and does a FindFirstMatchingTag but leaves the tag there. If the packet
is forwarded to another socket, the now useless tag is left there and results
in the next ForwardUp adding a duplicate tag and RecvFrom getting the wrong
No, I don't think the UDP echo server application is the right place to fix
this. I think that ForwardUp needs to error out if it finds a SocketAddressTag
in a packet. I think it needs to add one. I think RecvFrom needs to find that
single tag, use it to get the address and then remove it.
This means adding the ability to remove a tag to a packet. It seems to me that
the simplest thing would be a RemoveFirstMatchingTag call.
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs