forked from osmocom/wireshark
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>
This commit is contained in:
parent
d0cde7b8e2
commit
4d337f4213
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue