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:
@@ -152,6 +152,17 @@ def test_with_routes_can_ping(multi_hop_network):
|
||||
assert pc_a.ping(pc_b.network_interface[1].ip_address)
|
||||
|
||||
|
||||
def test_ping_router_port_multi_hop(multi_hop_network):
|
||||
pc_a = multi_hop_network.get_node_by_hostname("pc_a")
|
||||
router_2 = multi_hop_network.get_node_by_hostname("router_2")
|
||||
|
||||
router_2.route_table.add_route(
|
||||
address="192.168.0.0", subnet_mask="255.255.255.0", next_hop_ip_address="192.168.1.1"
|
||||
)
|
||||
|
||||
assert pc_a.ping(router_2.network_interface[1].ip_address)
|
||||
|
||||
|
||||
def test_routing_services(multi_hop_network):
|
||||
pc_a = multi_hop_network.get_node_by_hostname("pc_a")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user