diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-03-21 02:00:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-03-21 02:00:14 +0000 |
commit | 7431ca3f58d1a7468d5ee738d79ea7e2f494e025 (patch) | |
tree | 013dbd94ed7568b36e19f179d5614dc6e92afc03 /epan/dissectors/packet-isakmp.c | |
parent | 8f404dccf26ca7142260336c71d47dd341ae20b8 (diff) |
The table containing payload types and payload dissectors are now sparse
tables that are searched rather than dense tables that are indexed, so
there's no reason to tread payload types 130 and 131 specially.
svn path=/trunk/; revision=13844
Diffstat (limited to 'epan/dissectors/packet-isakmp.c')
-rw-r--r-- | epan/dissectors/packet-isakmp.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index 84e5d7f649..646c5645c6 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -178,8 +178,8 @@ static struct payload_func v1_plfunc[] = { { 14, "Attrib", dissect_config }, { 15, "NAT-Discovery", dissect_nat_discovery }, /* draft-ietf-ipsec-nat-t-ike-04 */ { 16, "NAT-Original Address", dissect_nat_original_address }, /* draft-ietf-ipsec-nat-t-ike */ - { 130, "NAT-D (draft-ietf-ipsec-nat-t-ike-01 to 03)", NULL }, - { 131, "NAT-OA (draft-ietf-ipsec-nat-t-ike-01 to 04)", NULL }, + { 130, "NAT-D (draft-ietf-ipsec-nat-t-ike-01 to 03)", dissect_nat_discovery }, + { 131, "NAT-OA (draft-ietf-ipsec-nat-t-ike-01 to 04)", dissect_nat_original_address }, }; static struct payload_func v2_plfunc[] = { @@ -351,15 +351,8 @@ dissect_payloads(tvbuff_t *tvb, proto_tree *tree, guint8 initial_payload, if ((f = getpayload_func(payload)) != NULL && f->func != NULL) (*f->func)(tvb, offset + 4, payload_length - 4, ntree, pinfo, -1); else { - if (payload == 130) - dissect_nat_discovery(tvb, offset + 4, payload_length - 4, ntree, - pinfo, -1); - else if (payload == 131) - dissect_nat_original_address(tvb, offset + 4, payload_length - 4, - ntree, pinfo, -1); - else - proto_tree_add_text(ntree, tvb, offset + 4, payload_length - 4, - "Payload"); + proto_tree_add_text(ntree, tvb, offset + 4, payload_length - 4, + "Payload"); } } else if (payload_length > length) { |