Project

General

Profile

Bug #8091

Limiters with fractional bandwidth values are not loaded correctly

Added by Steve Wheeler 5 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Limiters
Target version:
Start date:
11/13/2017
Due date:
% Done:

100%

Affected Version:
2.4.x
Affected Architecture:

Description

IPFW is not loading the /tmp/rules.limiter file correctly in 2.4.X if the specified bandwidth value is not a whole number. For example:

pipe 1 config  bw 5.5Mb

That file is loaded correctly in 2.3.X and results in a pipe:

00001:   5.500 Mbit/s    0 ms burst 0
q131073  50 sl. 0 flows (1 buckets) sched 65537 weight 0 lmax 0 pri 0 droptail
 sched 65537 type FIFO flags 0x0 0 buckets 0 active

But in 2.4 it results in:

00001:   5.000 bit/s     0 ms burst 0 
q131073  50 sl. 0 flows (1 buckets) sched 65537 weight 0 lmax 0 pri 0 droptail
 sched 65537 type FIFO flags 0x0 0 buckets 0 active

Bits per second, which looks like completely blocked.

In 2.3.X and 2.4.X fractional values are invalid in the webgui are cannot be created but in 2.2 and earlier they were valid and are not modified at upgrade.

Additionally if you have a fractional value bandwidth limiter that is working fine in 2.3.X it's not possible to update it to whole number in the gui before upgrading due to a problem with the validation. See screenshot.

Selection_313.png (17.7 KB) Steve Wheeler, 11/13/2017 12:44 PM

Associated revisions

Revision 0f5bd6f8
Added by Stephen Jones 2 months ago

Fixed #8091 Force Integers in GUI
It will use the ceil() function to always use the ceiling after loading a config.
Also onchange of bandwidth will call the ceil function to put in a whole number.

History

#1 Updated by Steve Wheeler 5 months ago

If you have Limiters configured like that you can edit the values in the config file directly and re-save them in the gui to get them back in 2.4.

#2 Updated by Jim Pingle 5 months ago

I fixed the backend of this on #8097 so the pipe bandwidths should be OK, but there is still that weird GUI issue where if you start with a previously-entered fractional value you can't move it to an integer.

#3 Updated by Steve Beaver 3 months ago

  • Assignee set to Stephen Jones

#4 Updated by Stephen Jones 2 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#5 Updated by Chris Linstruth 2 months ago

Tested. Looks like it is doing the right thing.

#6 Updated by Jim Pingle 2 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF