Bug 298571 - [NEW PORT] sysutils/cni-epair: CNI plugin giving containers a LAN address via epair and bridge
Summary: [NEW PORT] sysutils/cni-epair: CNI plugin giving containers a LAN address via...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jesús Daniel Colmenares Oviedo
URL:
Keywords:
Depends on:
Blocks: 299073
  Show dependency tree / graph
 
Reported: 2026-09-16 10:56 UTC by Michael Johnson
Modified: 2026-10-03 21:32 UTC (History)
2 users (show)

See Also:


Attachments
sysutils/cni-epair (2.55 KB, patch)
2026-09-16 10:56 UTC, Michael Johnson
no flags Details | Diff
sysutils/cni-epair (2.73 KB, patch)
2026-09-19 17:40 UTC, Michael Johnson
no flags Details | Diff
sysutils/cni-epair (2.70 KB, patch)
2026-09-20 08:56 UTC, Michael Johnson
no flags Details | Diff
cni-epair.diff (2.80 KB, patch)
2026-10-03 17:09 UTC, Jesús Daniel Colmenares Oviedo
dtxdf: maintainer-approval? (ahze)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Johnson 2026-09-16 10:56:55 UTC
Created attachment 274802 [details]
sysutils/cni-epair

A CNI plugin that gives FreeBSD containers an address on a real LAN segment.

FreeBSD has no macvlan. This plugin does the native equivalent: it creates an
epair per container, attaches one end to a host bridge, moves the other into
the container's jail, and applies the address supplied by IPAM. It implements
the ADD, DEL, CHECK and VERSION commands, and delegates address allocation to
the IPAM plugin named in the network configuration.

Upstream: https://github.com/daemonless/cni-epair
License:  BSD-2-Clause

- pordriere testport: 15.1-RELEASE-p3 aarch64 
- tested on amd64 & aarch64 (I've been using it since December 2025)
Comment 1 Michael Johnson 2026-09-19 17:40:20 UTC
Created attachment 274901 [details]
sysutils/cni-epair
Comment 2 Michael Johnson 2026-09-20 08:56:34 UTC
Created attachment 274937 [details]
sysutils/cni-epair
Comment 3 Jesús Daniel Colmenares Oviedo freebsd_committer freebsd_triage 2026-10-03 17:09:00 UTC
Created attachment 275341 [details]
cni-epair.diff

* Fix conflict in sysutils/Makefile (happens sometimes, so it's ok).
* Replace hardcoded /usr/local with ${PREFIX} in post-patch.

Everything else looks good to me.
Comment 4 Michael Johnson 2026-10-03 19:01:16 UTC
LGTM, thanks for the fixes!
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-10-03 21:31:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=968b1ae64b83522f159bd57ab3cd85d79334f2f9

commit 968b1ae64b83522f159bd57ab3cd85d79334f2f9
Author:     Michael Johnson <ahze@ahze.net>
AuthorDate: 2026-10-03 17:55:54 +0000
Commit:     Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org>
CommitDate: 2026-10-03 21:29:17 +0000

    sysutils/cni-epair: New port: CNI plugin giving containers a LAN address via epair and bridge

    A CNI plugin that gives FreeBSD containers an address on a real LAN segment.

    FreeBSD has no macvlan. This plugin does the native equivalent: it creates an
    epair per container, attaches one end to a host bridge, moves the other into
    the container's jail, and applies the address supplied by IPAM.

    IPv4 and IPv6 are both supported, together or alone: a network configuration
    carrying a range for each gives the container an address and a default route
    in both families.

    It implements the ADD, DEL, CHECK and VERSION commands, and delegates address
    allocation to the IPAM plugin named in the network configuration.

    WWW: https://github.com/daemonless/cni-epair

    PR:             298571

 sysutils/Makefile                  |  1 +
 sysutils/cni-epair/Makefile (new)  | 44 ++++++++++++++++++++++++++++++++++++++
 sysutils/cni-epair/distinfo (new)  |  3 +++
 sysutils/cni-epair/pkg-descr (new) | 12 +++++++++++
 4 files changed, 60 insertions(+)
Comment 6 Jesús Daniel Colmenares Oviedo freebsd_committer freebsd_triage 2026-10-03 21:32:15 UTC
Committed, thanks!