aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorLotte Steenbrink <lotte@zombietetris.de>2015-12-04 14:32:12 +0000
committerMichael Mann <mmann78@netscape.net>2015-12-05 12:06:47 +0000
commit4d337f421389e901bf1d4246f9ecb2f7b363aef0 (patch)
tree71dbce6623092b0c99def0e5f075deefe99af94d /epan
parentd0cde7b8e2d21d70688f6dd467fb318b568eaedd (diff)
packetbb: fix the display of IPv4 addresses
IPv4 Addresses are currently displayed incorrectly in RFC5444 Addressblocks. For example, what should be `Address: 10.1.3.0` is incorrectly rendered as Address: 0.0.0.10 This commit fixes that. Bug: 11852 Change-Id: Id6dc954e9a06e79375058f6070fe8e0f64167d64 Reviewed-on: https://code.wireshark.org/review/12429 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-packetbb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-packetbb.c b/epan/dissectors/packet-packetbb.c
index e2914b8641..cf99426596 100644
--- a/epan/dissectors/packet-packetbb.c
+++ b/epan/dissectors/packet-packetbb.c
@@ -458,10 +458,11 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_tree_add_item(addr_tree, hf_packetbb_addr_tail, tvb, tail_index, 1, ENC_NA);
}
for (i=0; i<numAddr; i++) {
- guint32 ipv4 = (addr[0] << 24) + (addr[1] << 16) + (addr[2] << 8) + addr[3];
+ guint32 ipv4 = 0;
guint8 prefix = addressSize * 8;
tvb_memcpy(tvb, &addr[head_length], mid_index + midSize*i, midSize);
+ ipv4 = (addr[3] << 24) + (addr[2] << 16) + (addr[1] << 8) + addr[0];
switch (addressType) {
case 0: