Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164507688
D50847.id157024.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50847.id157024.diff
View Options
Index: net/containernetworking-plugins/Makefile
===================================================================
--- net/containernetworking-plugins/Makefile
+++ net/containernetworking-plugins/Makefile
@@ -1,7 +1,7 @@
PORTNAME= containernetworking-plugins
DISTVERSIONPREFIX= freebsd-v
DISTVERSION= 0.5
-PORTREVISION= 14
+PORTREVISION= 15
CATEGORIES= net
MAINTAINER= dfr@FreeBSD.org
Index: net/containernetworking-plugins/files/patch-plugins_freebsd_meta_portmap_portmap.go
===================================================================
--- /dev/null
+++ net/containernetworking-plugins/files/patch-plugins_freebsd_meta_portmap_portmap.go
@@ -0,0 +1,34 @@
+--- plugins/freebsd/meta/portmap/portmap.go.orig 2025-06-14 16:53:13 UTC
++++ plugins/freebsd/meta/portmap/portmap.go
+@@ -82,11 +82,28 @@ func forwardPorts(config *PortMapConf, containerNet ne
+ // rdr inet proto tcp from any to ! 10.89.0.77 port 8080 -> 10.89.0.77 port 80
+ containerIP := containerNet.IP.String()
+ var af string
+- if containerNet.IP.To4() != nil {
+- af = "inet"
++
++ // Determine address family based on host IP, not container IP
++ if pmap.HostIP != "" {
++ // Parse the host IP to determine if it's IPv4 or IPv6
++ hostIPParsed := net.ParseIP(pmap.HostIP)
++ if hostIPParsed == nil {
++ return nil, fmt.Errorf("invalid host IP: %s", pmap.HostIP)
++ }
++ if hostIPParsed.To4() != nil {
++ af = "inet"
++ } else {
++ af = "inet6"
++ }
+ } else {
+- af = "inet6"
++ // If no specific host IP, use container's address family
++ if containerNet.IP.To4() != nil {
++ af = "inet"
++ } else {
++ af = "inet6"
++ }
+ }
++
+ hostIP := pmap.HostIP
+ if hostIP == "" {
+ hostIP = "self"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 2, 1:37 PM (15 m, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35865643
Default Alt Text
D50847.id157024.diff (1 KB)
Attached To
Mode
D50847: net/containernetworking-plugins: use correct family during rule generation
Attached
Detach File
Event Timeline
Log In to Comment