Ethereal-cvs: [Ethereal-cvs] rev 14345: /trunk/epan/dissectors/: packet-snmp.c packet-tftp.c p
User: sahlberg
Date: 2005/05/11 05:40 AM
Log:
Some applications do very naughty things like reusing a port for a different protocol during different stages of an application cycle.
This is very naughty and will cause problems when we have assigned a dissector to a dynamic port using conversation_set_dissector().
To make ethereal handle this case I have changed the try_conversation_dissector() to allow it to fail and return 0, meaning yes there is indeed a protocol registered for this conversation but that protocol rejected this packet.
(which only happens for "new" style dissectors, "old" style dissectors will never reject a packet that way)
When this happens the decode_udp_port() helper will still allow other dissectors to be tried, in the hope that the conversation is now used for some other protocol and thus someone else might be able to decode the packet.
Update SNMP and TFTP dissectors to check that even if there already is a conversation but that conversation does NOT have snmp/tftp registered as the dissector for it, then create a new conversation anyway and attach the proper dissector.
Since ethereal keeps track of which frame number a conversation started in, this actually works really well.
Directory: /trunk/epan/dissectors/
Changes Path Action
+1 -1 packet-snmp.c Modified
+2 -2 packet-tftp.c Modified
+2 -1 packet-udp.c Modified
Directory: /trunk/doc/
Changes Path Action
+56 -9 README.developer Modified
Directory: /trunk/epan/
Changes Path Action
+15 -3 conversation.c Modified
+28 -3 packet.c Modified
+8 -1 packet.h Modified
http://anonsvn.ethereal.com/viewcvs/viewcvs.py?rev=14345&view=rev