aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec-udp.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-03 05:13:53 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-03 05:13:53 +0000
commit314a644e49c680ed921523dcd51720efc800cee7 (patch)
tree28653d124404596be714ef42d63c4ca129651e5f /epan/dissectors/packet-ipsec-udp.c
parent417d9e4f38daa8faf9e287ac984c5119f1398b98 (diff)
From David Mueller:
Incorrect identification of UDP-encapsulated NAT-keepalive packets. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6414 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39234 f5534014-38df-0310-8fa8-9805f1628bb7
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");