nerdctl 2.2.0版本ipv6bug

发布时间:2026/5/27 6:35:43

nerdctl 2.2.0版本ipv6bug 问题现象nerdctl run -d -p 81:80 nginx:1.25.2-alpine然后去 telnet [xxx]:81 会看到 81端口不通根本原因nerdctl 创建ipv6 bridge时 缺少 ipv6的route导致容器的映射端口无法访问。命令nerdctl network create --ipv6 --subnet::ac12:0/112 --gateway::ac12:1 hahaha生成的cni文件内容如下{ cniVersion: 1.0.0, name: hahaha, nerdctlID: be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912, nerdctlLabels: {}, plugins: [ { type: bridge, bridge: br-be178c0543eb, isGateway: true, ipMasq: true, hairpinMode: true, ipam: { ranges: [ [ { gateway: ::ac12:1, subnet: ::ac12:0/112 } ] ], routes: [ { dst: 0.0.0.0/0 } ], type: host-local }, capabilities: { ips: true } }, { type: portmap, capabilities: { portMappings: true } }, { type: firewall, ingressPolicy: same-bridge }, { type: tuning } ] }很明显 routes那 dst的值不对只是ipv4的路由并没有ipv6的。代码出处nerdctl/pkg/netutil/netutil_unix.go 224行routes这根本就没管ipv6的事

相关新闻