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
|
@ -5,7 +5,7 @@ from core.config import Configuration
|
|||
from core.configservice.base import ConfigService, ConfigServiceMode
|
||||
from core.emane.nodes import EmaneNet
|
||||
from core.nodes.base import CoreNodeBase
|
||||
from core.nodes.interface import CoreInterface
|
||||
from core.nodes.interface import DEFAULT_MTU, CoreInterface
|
||||
from core.nodes.network import WlanNode
|
||||
|
||||
GROUP: str = "FRR"
|
||||
|
@ -18,7 +18,7 @@ def has_mtu_mismatch(iface: CoreInterface) -> bool:
|
|||
mtu-ignore command. This is needed when e.g. a node is linked via a
|
||||
GreTap device.
|
||||
"""
|
||||
if iface.mtu != 1500:
|
||||
if iface.mtu != DEFAULT_MTU:
|
||||
return True
|
||||
if not iface.net:
|
||||
return False
|
||||
|
|
|
@ -6,7 +6,7 @@ from core.config import Configuration
|
|||
from core.configservice.base import ConfigService, ConfigServiceMode
|
||||
from core.emane.nodes import EmaneNet
|
||||
from core.nodes.base import CoreNodeBase
|
||||
from core.nodes.interface import CoreInterface
|
||||
from core.nodes.interface import DEFAULT_MTU, CoreInterface
|
||||
from core.nodes.network import WlanNode
|
||||
|
||||
GROUP: str = "Quagga"
|
||||
|
@ -19,7 +19,7 @@ def has_mtu_mismatch(iface: CoreInterface) -> bool:
|
|||
mtu-ignore command. This is needed when e.g. a node is linked via a
|
||||
GreTap device.
|
||||
"""
|
||||
if iface.mtu != 1500:
|
||||
if iface.mtu != DEFAULT_MTU:
|
||||
return True
|
||||
if not iface.net:
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue