Merged PR 320: #2419- Created a Router-specific version of SessionManager
## Summary Created a Router-specific version of `SessionManager` that looks at route table rather than default gateway when dst ip address isn't for a locally attached network. Carried these changes through to arp. Added test for this. Made some minor improvements to show functions in container and node that assist debugging. ## Test process TDD approach: wrote the test, ran it and watched it fail. The implemented the fix and re-ran the test; it passes. **Before fix:**  **After fix:**  ## Checklist - [ ] PR is linked to a **work item** - [ ] **acceptance criteria** of linked ticket are met - [ ] performed **self-review** of the code - [ ] written **tests** for any new functionality added with this PR - [ ] updated the **documentation** if this PR changes or adds functionality - [ ] written/updated **design docs** if this PR implements new functionality - [ ] updated the **change log** - [ ] ran **pre-commit** checks for code style - [ ] attended to any **TO-DOs** left in the code #2419 Related work items: #2419
This commit is contained in:
@@ -72,7 +72,6 @@ class SessionManager:
|
||||
Manages network sessions, including session creation, lookup, and communication with other components.
|
||||
|
||||
:param sys_log: A reference to the system log component.
|
||||
:param arp_cache: A reference to the ARP cache component.
|
||||
"""
|
||||
|
||||
def __init__(self, sys_log: SysLog):
|
||||
|
||||
@@ -65,6 +65,10 @@ class ARP(Service):
|
||||
"""Clears the arp cache."""
|
||||
self.arp.clear()
|
||||
|
||||
def get_default_gateway_network_interface(self) -> Optional[NetworkInterface]:
|
||||
"""Not used at the parent ARP level. Should return None when there is no override by child class."""
|
||||
return None
|
||||
|
||||
def add_arp_cache_entry(
|
||||
self, ip_address: IPV4Address, mac_address: str, network_interface: NetworkInterface, override: bool = False
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user