aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-02-26 00:14:22 +0000
committerGuy Harris <guy@alum.mit.edu>2005-02-26 00:14:22 +0000
commit5639b87daf2ce738be2f45ac88e834b12f7e677d (patch)
treed151fad49ce913cecec81d2f8241af7e1b484e3b /epan
parentc68bde2e8297ac1735abc7de698659980a7bece0 (diff)
The Kerberos-over-UDP dissector can decide not to dissect packets, so it
needs to be a new-style dissector and explicitly reject them so that other dissectors can pick them up. svn path=/trunk/; revision=13528
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-kerberos.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c
index f2c5ca1d22..3f6fdd9ed8 100644
--- a/epan/dissectors/packet-kerberos.c
+++ b/epan/dissectors/packet-kerberos.c
@@ -3623,7 +3623,7 @@ dissect_krb5_ERROR(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offs
static struct { char *set; char *unset; } bitval = { "Set", "Not set" };
-static void dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo,
+static gint dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree);
static void dissect_kerberos_tcp(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree);
@@ -3644,7 +3644,7 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int d
return (dissect_kerberos_common(tvb, pinfo, tree, do_col_info, FALSE, cb));
}
-static void
+static gint
dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* Some weird kerberos implementation apparently do krb4 on the krb5 port.
@@ -3656,9 +3656,10 @@ dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if(tvb_get_guint8(tvb, 0)<=0x10){
if(krb4_handle){
- call_dissector(krb4_handle, tvb, pinfo, tree);
+ return call_dissector(krb4_handle, tvb, pinfo, tree);
+ }else{
+ return 0;
}
- return;
}
@@ -3666,6 +3667,7 @@ dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "KRB5");
(void)dissect_kerberos_common(tvb, pinfo, tree, TRUE, FALSE, NULL);
+ return tvb_length(tvb);
}
static gint
@@ -4297,7 +4299,7 @@ proto_reg_handoff_kerberos(void)
krb4_handle = find_dissector("krb4");
- kerberos_handle_udp = create_dissector_handle(dissect_kerberos_udp,
+ kerberos_handle_udp = new_create_dissector_handle(dissect_kerberos_udp,
proto_kerberos);
kerberos_handle_tcp = create_dissector_handle(dissect_kerberos_tcp,
proto_kerberos);