Skip to content

Commit

Permalink
tc: Merge pull request #1235 from ffourcot/rate_ceil_optional
Browse files Browse the repository at this point in the history
tcmsg/sched_htb: rate and ceil are optional

Bug-Url: #1235
  • Loading branch information
svinota authored Jan 7, 2025
2 parents 2cae303 + bbb97f4 commit c1c871a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyroute2/netlink/rtnl/tcmsg/sched_htb.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ def get_class_parameters(kwarg):
cburst = ceil / get_hz() + mtu
cburst = calc_xmittime(ceil, cburst)

if rate >= 1 << 32:
if rate is not None and rate >= 1 << 32:
rate64 = rate
rate = (1 << 32) - 1
if ceil >= 1 << 32:
if ceil is not None and ceil >= 1 << 32:
ceil64 = ceil
ceil = (1 << 32) - 1
ret = {
Expand Down

0 comments on commit c1c871a

Please sign in to comment.