aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJoakim Karlsson <oakimk@gmail.com>2017-11-11 15:44:33 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2017-11-11 17:16:45 +0000
commitfea67da276df03ed39fe552d6df2f3304a03e7c1 (patch)
treee4982f7917e4bd2863016fe6e026597530a628f2 /epan
parent13581e6acaab7f0d98b530a1db1e0b80c7c6a938 (diff)
[PFCP] OHC: fix Port number field present
Port number should only be included with UDP/IP header Change-Id: Ie2655d2b6f1b755bff47e74723f36b1ee87170f9 Reviewed-on: https://code.wireshark.org/review/24361 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-pfcp.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/epan/dissectors/packet-pfcp.c b/epan/dissectors/packet-pfcp.c
index e59398a11e..ee9820e89a 100644
--- a/epan/dissectors/packet-pfcp.c
+++ b/epan/dissectors/packet-pfcp.c
@@ -2311,20 +2311,29 @@ dissect_pfcp_outer_header_creation(tvbuff_t *tvb, packet_info *pinfo, proto_tree
offset += 4;
}
- /* The IPv4 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv4 header */
+ /*
+ * p to (p+3) IPv4
+ * The IPv4 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv4 header
+ */
if ((value == 0) || (value == 2)) {
proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
- /* The IPv6 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv6 header */
+ /*
+ * q to (q+15) IPv6
+ * The IPv6 Address field shall be present if the Outer Header Creation Description requests the creation of a IPv6 header
+ */
if ((value == 1) || (value == 3)) {
proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_ipv6, tvb, offset, 16, ENC_NA);
offset += 16;
}
- /* The Port Number field shall be present if the Outer Header Creation Description requests the creation of a UDP/IP header */
- if ((value == 0) || (value == 2)) {
+ /*
+ * r to (r+1) Port Number
+ * The Port Number field shall be present if the Outer Header Creation Description requests the creation of a UDP/IP header
+ */
+ if ((value == 2) || (value == 3)) {
proto_tree_add_item(tree, hf_pfcp_outer_hdr_creation_port, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
}