#2418 - add wildcard masks and from_config tests to routers

This commit is contained in:
Marek Wolan
2024-03-26 21:48:17 +00:00
parent 0e90e6a262
commit 9a8a42f3ec
4 changed files with 212 additions and 0 deletions

View File

@@ -1441,6 +1441,8 @@ class Router(NetworkNode):
protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p],
src_ip_address=r_cfg.get("src_ip"),
dst_ip_address=r_cfg.get("dst_ip"),
src_wildcard_mask=r_cfg.get("src_wildcard_mask"),
dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"),
position=r_num,
)
if "routes" in cfg:

View File

@@ -265,6 +265,8 @@ class WirelessRouter(Router):
protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p],
src_ip_address=r_cfg.get("src_ip"),
dst_ip_address=r_cfg.get("dst_ip"),
src_wildcard_mask=r_cfg.get("src_wildcard_mask"),
dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"),
position=r_num,
)
if "routes" in cfg: