diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-09-28 07:08:52 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-09-28 07:08:52 +0000 |
commit | 1efa9bd6b645003ed1da5d5d5af3121b048f4783 (patch) | |
tree | 8d0e8e4dd9bb293f99522126d17a06a786dbaea1 /epan | |
parent | 79a3b2d67587c88ff009d6fe92d2506be49715e1 (diff) |
ndmp and tcp encapsulation of esp both use port 10000
make ndmp a heuristic dissector so it will "win" over tcp esp if the
packets look like ndmp and if "preferences/tcp/heuristic dissectors
first has been
chosen"
svn path=/trunk/; revision=23006
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index deb77c0590..f6175f5d48 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -3032,6 +3032,10 @@ dissect_ndmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint len; guint32 tmp; + /* verify that the tcp port is 10000, ndmp always runs on port 10000*/ + if ((pinfo->srcport!=TCP_PORT_NDMP)&&(pinfo->destport!=TCP_PORT_NDMP)) { + return 0; + } /* check that the header looks sane */ len=tvb_length(tvb); @@ -3821,4 +3825,6 @@ proto_reg_handoff_ndmp(void) ndmp_handle = new_create_dissector_handle(dissect_ndmp, proto_ndmp); dissector_add("tcp.port",TCP_PORT_NDMP, ndmp_handle); + + heur_dissector_add("tcp", dissect_ndmp, proto_ndmp); } |