diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-10 21:46:19 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-10 21:46:19 +0000 |
commit | 13700467ae60a5d53239e714b2cba2027da93db1 (patch) | |
tree | e3ea8640ecca0b1db950c32c078edbf2c859178f /epan/dissectors/packet-mip.c | |
parent | debddaa979a8ad48dc2c73be6ccae3acc82e837c (diff) |
Fix additiuonal bugs in some proto_tree_add_item() 'encoding' args;
Two of the bugs would appear to have caused display of a FT_UINT16 field with
the wrong endianness.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39347 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-mip.c')
-rw-r--r-- | epan/dissectors/packet-mip.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/epan/dissectors/packet-mip.c b/epan/dissectors/packet-mip.c index c6108cae7c..4bb2f021ec 100644 --- a/epan/dissectors/packet-mip.c +++ b/epan/dissectors/packet-mip.c @@ -459,7 +459,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree) "Unknown Extension %u")); ext_tree = proto_item_add_subtree(ti, ett_mip_ext); - proto_tree_add_item(ext_tree, hf_mip_ext_type, tvb, offset, 1, ext_type); + proto_tree_add_item(ext_tree, hf_mip_ext_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; if (ext_type != GEN_AUTH_EXT && ext_type != PMIPv4_NON_SKIP_EXT && @@ -475,8 +475,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree) case FH_AUTH_EXT: /* All these extensions look the same. 4 byte SPI followed by a key */ proto_tree_add_item(ext_tree, hf_mip_aext_spi, tvb, offset, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(ext_tree, hf_mip_aext_auth, tvb, offset+4, ext_len-4, - ENC_NA); + proto_tree_add_item(ext_tree, hf_mip_aext_auth, tvb, offset+4, ext_len-4, ENC_NA); break; case MN_NAI_EXT: proto_tree_add_item(ext_tree, hf_mip_next_nai, tvb, offset, @@ -567,10 +566,10 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree) break; case PMIPv4_NON_SKIP_EXT: /* draft-leung-mip4-proxy-mode */ /* sub-type */ - proto_tree_add_item(ext_tree, hf_mip_pmipv4nonskipext_stype, tvb, offset, 1, ext_subtype); + proto_tree_add_item(ext_tree, hf_mip_pmipv4nonskipext_stype, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* len */ - proto_tree_add_item(ext_tree, hf_mip_ext_len, tvb, offset, 2, ext_len); + proto_tree_add_item(ext_tree, hf_mip_ext_len, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; if(ext_subtype == 1){ /* Sub-type == 1 : PMIPv4 Per-Node Authentication Method */ @@ -584,7 +583,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree) "PMIPv4 Sub-Type: %s", val_to_str(ext_subtype, mip_pmipv4skipext_stypes, "Unknown Sub-Type %u")); pmipv4_tree = proto_item_add_subtree(tp, ett_mip_pmipv4_ext); - proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_stype, tvb, offset, 1, ext_subtype); + proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_stype, tvb, offset, 1, ENC_NA); if (ext_subtype == PMIPv4_SKIPEXT_STYPE_INTERFACE_ID) { proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_interfaceid, tvb, offset + 1, ext_len-1, ENC_NA); @@ -609,7 +608,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree) */ proto_tree_add_item(ext_tree, hf_mip_cvse_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_uint(ext_tree, hf_mip_ext_len, tvb, offset, 2, ext_len); + proto_tree_add_uint(ext_tree, hf_mip_ext_len, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; /* Vendor/Org ID */ /*Vendor ID & cvse type & cvse value are included in ext_len, so do not increment offset for them here.*/ |