Skip to content

Conversation

@eklabn
Copy link

@eklabn eklabn commented Jun 29, 2023

Here are a couple of changes to (1) handle interface addresses with /32 masks and (2) create a dummy for each unconnected interface.

@choppsv1 choppsv1 force-pushed the main branch 2 times, most recently from 91b4758 to eb56767 Compare August 9, 2023 04:23
@choppsv1 choppsv1 force-pushed the main branch 2 times, most recently from 741d071 to 7a41244 Compare September 14, 2024 03:15
@eklabn eklabn force-pushed the ekinzie/ip-p2p branch 4 times, most recently from 983e795 to e5b6180 Compare December 29, 2025 20:38
For p2p links with each endpoint in a different IP subnet, as would be
found with IPv4 addresses and 32-bit subnet masks, configure the peer
address.  In Linux, adding an interface route with the peer's address
as the destination is not sufficient; no other route will be able to
use the peer's address as a next-hop.
An interface with no connection is currently omitted from the target
network namespace.  Instead, add a Linux "dummy" interface and assign
IP addresses.
@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 78.94737% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.15%. Comparing base (5ef25cf) to head (e365d1d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
munet/native.py 77.94% 15 Missing ⚠️
munet/base.py 81.48% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
- Coverage   59.19%   59.15%   -0.05%     
==========================================
  Files          19       19              
  Lines        5833     5912      +79     
==========================================
+ Hits         3453     3497      +44     
- Misses       2380     2415      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@liambrady liambrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line with some of my comments, can you split these two commits into two separate PRs?

I am happy to push through the /32 address support changes, but don't yet want to merge the unconnected interface changes until I can work on a proper solution for configuring parallel p2p connections.

EDIT: Ignore my previous comment, you can keep both of these commits in this PR.

and ifaddr.network != oifaddr.network
):
con.cmd_raises(
f"ip addr add {ifaddr} peer {oifaddr.ip} dev {ifname}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You drop the peer's network mark here, which is the opposite of what you did in _set_p2p_addr (where you instead kept the peer's network mask and instead dropped the address's mask). Is this intentional?

and ifaddr.network != oifaddr.network
):
con.cmd_raises(
f"ip addr add {ifaddr} peer {oifaddr.ip} dev {ifname}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above

@@ -0,0 +1,28 @@
version: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this test to the tests/config directory

@@ -0,0 +1,31 @@
version: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this test to the tests/config directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants