[MME] Fix the Invalid AMBR Unit (#967)

This commit is contained in:
Sukchan Lee 2021-04-30 11:58:02 +09:00
parent 959bc6a248
commit 3b1ebfa9ed
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,7 @@ static uint8_t nas_ambr_from_kbps(
* giving a range of 256 Mbps to 65280 Mbps. */
if (input > (65200*1024)) {
ogs_error("Overflow : %ldkbps > 65200Mbps", (long)input);
*br = 0xff;
*extended2 = 0b11111110;
length = ogs_max(length, 3);
@ -79,6 +80,7 @@ static uint8_t nas_ambr_from_kbps(
}
else if (input >= (256*1024) && input <= (65200*1024)) {
*extended2 = input / (256*1024);
*br = 0xff;
length = ogs_max(length, 3);
input %= (256*1024);