aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec-udp.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-10-03 05:13:53 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-10-03 05:13:53 +0000
commit76da7fb4e55a7c4fe9439c4c9468dc6b3dc8dc75 (patch)
tree28653d124404596be714ef42d63c4ca129651e5f /epan/dissectors/packet-ipsec-udp.c
parentf08f09ecd42493885c2db0e2c97b5d4ffefc0995 (diff)
From David Mueller:
Incorrect identification of UDP-encapsulated NAT-keepalive packets. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6414 svn path=/trunk/; revision=39234
Diffstat (limited to 'epan/dissectors/packet-ipsec-udp.c')
-rw-r--r--epan/dissectors/packet-ipsec-udp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ipsec-udp.c b/epan/dissectors/packet-ipsec-udp.c
index 40f25487c6..090b952acf 100644
--- a/epan/dissectors/packet-ipsec-udp.c
+++ b/epan/dissectors/packet-ipsec-udp.c
@@ -52,12 +52,12 @@ dissect_udpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
- ti = proto_tree_add_item(tree, proto_udpencap, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item(tree, proto_udpencap, tvb, 0, -1, ENC_NA);
udpencap_tree = proto_item_add_subtree(ti, ett_udpencap);
}
- /* First byte of 0 iindicates NAT-keepalive */
- if (tvb_get_guint8(tvb, 0) == 0xff) {
+ /* 1 byte of 0xFF indicates NAT-keepalive */
+ if ((tvb_length(tvb) == 1) && (tvb_get_guint8(tvb, 0) == 0xff)) {
col_set_str(pinfo->cinfo, COL_INFO, "NAT-keepalive");
if (tree)
proto_tree_add_text(udpencap_tree, tvb, 0, 1, "NAT-keepalive packet");