NAS 5GS: fix dissection of Session-AMBR/GFBR/MFBR unit

Change-Id: Iccbc89a586abd33db0dd8c16974ad8d9b5bd21f9
Reviewed-on: https://code.wireshark.org/review/34443
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
This commit is contained in:
Pascal Quantin 2019-09-03 17:57:47 +02:00
parent debdd82678
commit 993733dda8
1 changed files with 6 additions and 7 deletions

View File

@ -462,22 +462,21 @@ get_ext_ambr_unit(guint32 unit, const char **unit_str)
*unit_str = "Unit value 0, Illegal";
return mult;
}
unit = unit - 1;
if (unit <= 0x05) {
mult = pow4(guint32, unit);
mult = pow4(guint32, unit - 0x01);
*unit_str = "Kbps";
} else if (unit <= 0x0a) {
mult = pow4(guint32, unit - 0x05);
mult = pow4(guint32, unit - 0x06);
*unit_str = "Mbps";
} else if (unit <= 0x0e) {
mult = pow4(guint32, unit - 0x07);
} else if (unit <= 0x0f) {
mult = pow4(guint32, unit - 0x0b);
*unit_str = "Gbps";
} else if (unit <= 0x14) {
mult = pow4(guint32, unit - 0x0c);
mult = pow4(guint32, unit - 0x10);
*unit_str = "Tbps";
} else if (unit <= 0x19) {
mult = pow4(guint32, unit - 0x11);
mult = pow4(guint32, unit - 0x15);
*unit_str = "Pbps";
} else {
mult = 256;