diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-06-04 23:09:46 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-06-04 23:09:46 -0400 |
| commit | 78059b43e3d00a0f2b75677461692745cce34a63 (patch) | |
| tree | 4a3359f978485141fe610f227d483e23552a702e /internal/namespace/preflight_test.go | |
| parent | 04dca5dada8c2d971ff3b54eeedc5ab6e53a29ac (diff) | |
refactor: remove dependency on ip CLI tool and abstract network logic
Eliminate the external dependency on the `ip` (iproute2) command-line tool by centralizing network configuration and diagnostics within a new `internal/network` package using the `netlink` library.
Changes:
- Introduced `internal/network` package to handle network interface listing and configuration.
- Replaced `exec.Command("ip", "link")` in `internal/namespace.VerifyIsolation` with `network.ListInterfaces()`.
- Improved `VerifyIsolation` to explicitly ensure only the loopback interface is present in a fresh network namespace.
- Moved interface and routing configuration logic from `internal/wireguard` to `internal/network`.
- Removed unnecessary `os/exec` imports from network-related files.
This change increases the tool's portability by removing the requirement for `iproute2` to be installed in the target environment.
Diffstat (limited to 'internal/namespace/preflight_test.go')
0 files changed, 0 insertions, 0 deletions
