daemon: updated linkconfig to calculate a limit when bw/delay are present, updated and simplified logic as well, leveraging code from outstanding pull request, updated code to factor in the mtu of the iface being configured
This commit is contained in:
parent
83ba6cea70
commit
380d411833
9 changed files with 65 additions and 78 deletions
|
@ -788,14 +788,18 @@ class CoreHandler(socketserver.BaseRequestHandler):
|
|||
options = LinkOptions()
|
||||
options.delay = message.get_tlv(LinkTlvs.DELAY.value)
|
||||
options.bandwidth = message.get_tlv(LinkTlvs.BANDWIDTH.value)
|
||||
options.loss = message.get_tlv(LinkTlvs.LOSS.value)
|
||||
options.dup = message.get_tlv(LinkTlvs.DUP.value)
|
||||
options.jitter = message.get_tlv(LinkTlvs.JITTER.value)
|
||||
options.mer = message.get_tlv(LinkTlvs.MER.value)
|
||||
options.burst = message.get_tlv(LinkTlvs.BURST.value)
|
||||
options.mburst = message.get_tlv(LinkTlvs.MBURST.value)
|
||||
options.unidirectional = message.get_tlv(LinkTlvs.UNIDIRECTIONAL.value)
|
||||
options.key = message.get_tlv(LinkTlvs.KEY.value)
|
||||
loss = message.get_tlv(LinkTlvs.LOSS.value)
|
||||
dup = message.get_tlv(LinkTlvs.DUP.value)
|
||||
if loss is not None:
|
||||
options.loss = float(loss)
|
||||
if dup is not None:
|
||||
options.dup = int(dup)
|
||||
|
||||
if message.flags & MessageFlags.ADD.value:
|
||||
self.session.add_link(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue