Skip to content

Commit daab55b

Browse files
committed
pasta: add IPv6 --map-guest-addr, --address, --gateway
Fixes: podman-container-tools/podman#28771 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
1 parent 1374ba3 commit daab55b

2 files changed

Lines changed: 142 additions & 72 deletions

File tree

common/libnetwork/pasta/pasta_linux.go

Lines changed: 70 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import (
2828
const (
2929
dnsForwardOpt = "--dns-forward"
3030
mapGuestAddrOpt = "--map-guest-addr"
31+
addressOpt = "--address"
32+
gatewayOpt = "--gateway"
3133

3234
// dnsForwardIpv4 static ip used as nameserver address inside the netns,
3335
// given this is a "link local" ip it should be very unlikely that it causes conflicts.
@@ -36,6 +38,18 @@ const (
3638
// mapGuestAddrIpv4 static ip used as forwarder address inside the netns to reach the host,
3739
// given this is a "link local" ip it should be very unlikely that it causes conflicts.
3840
mapGuestAddrIpv4 = "169.254.1.2"
41+
42+
// mapGuestAddrIpv6 static ip used as IPv6 forwarder address inside the netns to reach the host.
43+
mapGuestAddrIpv6 = "fc00::1"
44+
45+
// guestAddrIpv6 is assigned to the guest interface so the IPv6 gateway is reachable.
46+
guestAddrIpv6 = "fc00::2"
47+
48+
// gatewayIpv6 is the IPv6 default gateway for the guest. pasta uses this as the source
49+
// address for inbound IPv6 forwarding. Must differ from mapGuestAddrIpv6 to avoid
50+
// --map-guest-addr intercepting reply traffic.
51+
// See: https://bugs.passt.top/show_bug.cgi?id=217
52+
gatewayIpv6 = "fc00::3"
3953
)
4054

4155
type SetupOptions struct {
@@ -67,39 +81,24 @@ func Setup(opts *SetupOptions) (*SetupResult, error) {
6781

6882
logrus.Debugf("pasta arguments: %s", strings.Join(cmdArgs, " "))
6983

70-
for {
71-
// pasta forks once ready, and quits once we delete the target namespace
72-
out, err := exec.Command(path, cmdArgs...).CombinedOutput()
73-
if err != nil {
74-
exitErr := &exec.ExitError{}
75-
if errors.As(err, &exitErr) {
76-
// special backwards compat check, --map-guest-addr was added in pasta version 20240814 so we
77-
// cannot hard require it yet. Once we are confident that the update is most distros we can remove it.
78-
if exitErr.ExitCode() == 1 &&
79-
strings.Contains(string(out), "unrecognized option '"+mapGuestAddrOpt) &&
80-
len(mapGuestAddrIPs) == 1 && mapGuestAddrIPs[0] == mapGuestAddrIpv4 {
81-
// we did add the default --map-guest-addr option, if users set something different we want
82-
// to get to the error below. We have to unset mapGuestAddrIPs here to avoid a infinite loop.
83-
mapGuestAddrIPs = nil
84-
// Trim off last two args which are --map-guest-addr 169.254.1.2.
85-
cmdArgs = cmdArgs[:len(cmdArgs)-2]
86-
continue
87-
}
88-
return nil, fmt.Errorf("pasta failed with exit code %d:\n%s",
89-
exitErr.ExitCode(), string(out))
90-
}
91-
return nil, fmt.Errorf("failed to start pasta: %w", err)
84+
// pasta forks once ready, and quits once we delete the target namespace
85+
out, err := exec.Command(path, cmdArgs...).CombinedOutput()
86+
if err != nil {
87+
exitErr := &exec.ExitError{}
88+
if errors.As(err, &exitErr) {
89+
return nil, fmt.Errorf("pasta failed with exit code %d:\n%s",
90+
exitErr.ExitCode(), string(out))
9291
}
92+
return nil, fmt.Errorf("failed to start pasta: %w", err)
93+
}
9394

94-
if len(out) > 0 {
95-
// TODO: This should be warning but as of August 2024 pasta still prints
96-
// things with --quiet that we do not care about. In podman CI I still see
97-
// "Couldn't get any nameserver address" so until this is fixed we cannot
98-
// enable it. For now info is fine and we can bump it up later, it is only a
99-
// nice to have.
100-
logrus.Infof("pasta logged warnings: %q", strings.TrimSpace(string(out)))
101-
}
102-
break
95+
if len(out) > 0 {
96+
// TODO: This should be warning but as of August 2024 pasta still prints
97+
// things with --quiet that we do not care about. In podman CI I still see
98+
// "Couldn't get any nameserver address" so until this is fixed we cannot
99+
// enable it. For now info is fine and we can bump it up later, it is only a
100+
// nice to have.
101+
logrus.Infof("pasta logged warnings: %q", strings.TrimSpace(string(out)))
103102
}
104103

105104
var ipv4, ipv6 bool
@@ -187,6 +186,8 @@ func createPastaArgs(opts *SetupOptions) ([]string, []string, []string, error) {
187186

188187
var dnsForwardIPs []string
189188
var mapGuestAddrIPs []string
189+
var gatewayIPs []string
190+
var addressIPs []string
190191
for i, opt := range cmdArgs {
191192
switch opt {
192193
case "-t", "--tcp-ports":
@@ -208,6 +209,14 @@ func createPastaArgs(opts *SetupOptions) ([]string, []string, []string, error) {
208209
if len(cmdArgs) > i+1 {
209210
mapGuestAddrIPs = append(mapGuestAddrIPs, cmdArgs[i+1])
210211
}
212+
case gatewayOpt, "-g":
213+
if len(cmdArgs) > i+1 {
214+
gatewayIPs = append(gatewayIPs, cmdArgs[i+1])
215+
}
216+
case addressOpt, "-a":
217+
if len(cmdArgs) > i+1 {
218+
addressIPs = append(addressIPs, cmdArgs[i+1])
219+
}
211220
}
212221
}
213222

@@ -265,15 +274,38 @@ func createPastaArgs(opts *SetupOptions) ([]string, []string, []string, error) {
265274
cmdArgs = append(cmdArgs, "--quiet")
266275
}
267276

268-
cmdArgs = append(cmdArgs, "--netns", opts.Netns)
269-
270-
// do this as last arg so we can easily trim them off in the error case when we have an older version
271277
if len(mapGuestAddrIPs) == 0 {
272-
// the user did not request custom --map-guest-addr so add our own so that we can use this
273-
// for our own host.containers.internal host entry.
274-
cmdArgs = append(cmdArgs, mapGuestAddrOpt, mapGuestAddrIpv4)
275-
mapGuestAddrIPs = append(mapGuestAddrIPs, mapGuestAddrIpv4)
278+
cmdArgs = append(cmdArgs, mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6)
279+
mapGuestAddrIPs = append(mapGuestAddrIPs, mapGuestAddrIpv4, mapGuestAddrIpv6)
280+
}
281+
282+
// Pass --address and --gateway with non-link-local IPv6 addresses so pasta
283+
// uses a routable source for inbound IPv6 forwarding (instead of link-local
284+
// which is not routable across bridges). --address is required so the kernel
285+
// can add the route to the gateway.
286+
// See: https://bugs.passt.top/show_bug.cgi?id=217
287+
hasIPv6Gateway := false
288+
for _, ip := range gatewayIPs {
289+
if strings.Contains(ip, ":") {
290+
hasIPv6Gateway = true
291+
break
292+
}
276293
}
294+
if !hasIPv6Gateway {
295+
hasIPv6Addr := false
296+
for _, ip := range addressIPs {
297+
if strings.Contains(ip, ":") {
298+
hasIPv6Addr = true
299+
break
300+
}
301+
}
302+
if !hasIPv6Addr {
303+
cmdArgs = append(cmdArgs, addressOpt, guestAddrIpv6)
304+
}
305+
cmdArgs = append(cmdArgs, gatewayOpt, gatewayIpv6)
306+
}
307+
308+
cmdArgs = append(cmdArgs, "--netns", opts.Netns)
277309

278310
return cmdArgs, dnsForwardIPs, mapGuestAddrIPs, nil
279311
}

common/libnetwork/pasta/pasta_linux_test.go

Lines changed: 72 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ func Test_createPastaArgs(t *testing.T) {
3636
),
3737
wantArgs: []string{
3838
"--config-net", "--dns-forward", dnsForwardIpv4, "-t", "none", "-u", "none",
39-
"-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
40-
mapGuestAddrOpt, mapGuestAddrIpv4,
39+
"-T", "none", "-U", "none", "--no-map-gw", "--quiet",
40+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
41+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
42+
"--netns", "netns123",
4143
},
4244
wantDNSForward: []string{dnsForwardIpv4},
4345
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -51,8 +53,10 @@ func Test_createPastaArgs(t *testing.T) {
5153
),
5254
wantArgs: []string{
5355
"--config-net", "-t", "80-80:80-80", "--dns-forward", dnsForwardIpv4, "-u", "none",
54-
"-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
55-
mapGuestAddrOpt, mapGuestAddrIpv4,
56+
"-T", "none", "-U", "none", "--no-map-gw", "--quiet",
57+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
58+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
59+
"--netns", "netns123",
5660
},
5761
wantDNSForward: []string{dnsForwardIpv4},
5862
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -66,8 +70,10 @@ func Test_createPastaArgs(t *testing.T) {
6670
),
6771
wantArgs: []string{
6872
"--config-net", "-t", "80-82:80-82", "--dns-forward", dnsForwardIpv4, "-u", "none",
69-
"-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
70-
mapGuestAddrOpt, mapGuestAddrIpv4,
73+
"-T", "none", "-U", "none", "--no-map-gw", "--quiet",
74+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
75+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
76+
"--netns", "netns123",
7177
},
7278
wantDNSForward: []string{dnsForwardIpv4},
7379
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -81,8 +87,10 @@ func Test_createPastaArgs(t *testing.T) {
8187
),
8288
wantArgs: []string{
8389
"--config-net", "-t", "80-80:60-60", "--dns-forward", dnsForwardIpv4, "-u", "none",
84-
"-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
85-
mapGuestAddrOpt, mapGuestAddrIpv4,
90+
"-T", "none", "-U", "none", "--no-map-gw", "--quiet",
91+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
92+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
93+
"--netns", "netns123",
8694
},
8795
wantDNSForward: []string{dnsForwardIpv4},
8896
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -99,8 +107,10 @@ func Test_createPastaArgs(t *testing.T) {
99107
),
100108
wantArgs: []string{
101109
"--config-net", "-t", "80-80:60-60", "-u", "100-100:100-100", "--dns-forward",
102-
dnsForwardIpv4, "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
103-
mapGuestAddrOpt, mapGuestAddrIpv4,
110+
dnsForwardIpv4, "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
111+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
112+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
113+
"--netns", "netns123",
104114
},
105115
wantDNSForward: []string{dnsForwardIpv4},
106116
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -117,8 +127,10 @@ func Test_createPastaArgs(t *testing.T) {
117127
),
118128
wantArgs: []string{
119129
"--config-net", "-t", "80-80:60-60", "-t", "100-100:100-100", "--dns-forward",
120-
dnsForwardIpv4, "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
121-
mapGuestAddrOpt, mapGuestAddrIpv4,
130+
dnsForwardIpv4, "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
131+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
132+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
133+
"--netns", "netns123",
122134
},
123135
wantDNSForward: []string{dnsForwardIpv4},
124136
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -143,8 +155,10 @@ func Test_createPastaArgs(t *testing.T) {
143155
),
144156
wantArgs: []string{
145157
"--config-net", "-i", "eth0", "-n", "24", "--dns-forward", dnsForwardIpv4,
146-
"-t", "none", "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
147-
mapGuestAddrOpt, mapGuestAddrIpv4,
158+
"-t", "none", "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
159+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
160+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
161+
"--netns", "netns123",
148162
},
149163
wantDNSForward: []string{dnsForwardIpv4},
150164
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -158,8 +172,10 @@ func Test_createPastaArgs(t *testing.T) {
158172
),
159173
wantArgs: []string{
160174
"--config-net", "-i", "eth0", "-n", "24", "--dns-forward", dnsForwardIpv4,
161-
"-t", "none", "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
162-
mapGuestAddrOpt, mapGuestAddrIpv4,
175+
"-t", "none", "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
176+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
177+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
178+
"--netns", "netns123",
163179
},
164180
wantDNSForward: []string{dnsForwardIpv4},
165181
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -173,8 +189,10 @@ func Test_createPastaArgs(t *testing.T) {
173189
),
174190
wantArgs: []string{
175191
"--config-net", "-T", "80", "--dns-forward", dnsForwardIpv4,
176-
"-t", "none", "-u", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
177-
mapGuestAddrOpt, mapGuestAddrIpv4,
192+
"-t", "none", "-u", "none", "-U", "none", "--no-map-gw", "--quiet",
193+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
194+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
195+
"--netns", "netns123",
178196
},
179197
wantDNSForward: []string{dnsForwardIpv4},
180198
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -188,8 +206,10 @@ func Test_createPastaArgs(t *testing.T) {
188206
),
189207
wantArgs: []string{
190208
"--config-net", "--tcp-ns", "80", "--dns-forward", dnsForwardIpv4,
191-
"-t", "none", "-u", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
192-
mapGuestAddrOpt, mapGuestAddrIpv4,
209+
"-t", "none", "-u", "none", "-U", "none", "--no-map-gw", "--quiet",
210+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
211+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
212+
"--netns", "netns123",
193213
},
194214
wantDNSForward: []string{dnsForwardIpv4},
195215
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -203,8 +223,10 @@ func Test_createPastaArgs(t *testing.T) {
203223
),
204224
wantArgs: []string{
205225
"--config-net", "--dns-forward", dnsForwardIpv4, "-t", "none",
206-
"-u", "none", "-T", "none", "-U", "none", "--quiet", "--netns", "netns123",
207-
mapGuestAddrOpt, mapGuestAddrIpv4,
226+
"-u", "none", "-T", "none", "-U", "none", "--quiet",
227+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
228+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
229+
"--netns", "netns123",
208230
},
209231
wantDNSForward: []string{dnsForwardIpv4},
210232
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -218,8 +240,10 @@ func Test_createPastaArgs(t *testing.T) {
218240
),
219241
wantArgs: []string{
220242
"--config-net", "-T", "80", "--dns-forward", dnsForwardIpv4,
221-
"-t", "none", "-u", "none", "-U", "none", "--quiet", "--netns", "netns123",
222-
mapGuestAddrOpt, mapGuestAddrIpv4,
243+
"-t", "none", "-u", "none", "-U", "none", "--quiet",
244+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
245+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
246+
"--netns", "netns123",
223247
},
224248
wantDNSForward: []string{dnsForwardIpv4},
225249
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -233,8 +257,10 @@ func Test_createPastaArgs(t *testing.T) {
233257
),
234258
wantArgs: []string{
235259
"--config-net", "-T", "80", "--dns-forward", dnsForwardIpv4,
236-
"-t", "none", "-u", "none", "-U", "none", "--quiet", "--netns", "netns123",
237-
mapGuestAddrOpt, mapGuestAddrIpv4,
260+
"-t", "none", "-u", "none", "-U", "none", "--quiet",
261+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
262+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
263+
"--netns", "netns123",
238264
},
239265
wantDNSForward: []string{dnsForwardIpv4},
240266
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -248,8 +274,10 @@ func Test_createPastaArgs(t *testing.T) {
248274
),
249275
wantArgs: []string{
250276
"--config-net", "--dns-forward", "192.168.255.255", "-t", "none",
251-
"-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
252-
mapGuestAddrOpt, mapGuestAddrIpv4,
277+
"-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
278+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
279+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
280+
"--netns", "netns123",
253281
},
254282
wantDNSForward: []string{"192.168.255.255"},
255283
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -263,8 +291,10 @@ func Test_createPastaArgs(t *testing.T) {
263291
),
264292
wantArgs: []string{
265293
"--config-net", "--dns-forward", "192.168.255.255", "--dns-forward", "::1", "-t", "none",
266-
"-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
267-
mapGuestAddrOpt, mapGuestAddrIpv4,
294+
"-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
295+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
296+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
297+
"--netns", "netns123",
268298
},
269299
wantDNSForward: []string{"192.168.255.255", "::1"},
270300
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -278,8 +308,10 @@ func Test_createPastaArgs(t *testing.T) {
278308
),
279309
wantArgs: []string{
280310
"--config-net", "-i", "eth0", "-t", "80-80:80-80", "--dns-forward", dnsForwardIpv4,
281-
"-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
282-
mapGuestAddrOpt, mapGuestAddrIpv4,
311+
"-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
312+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
313+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
314+
"--netns", "netns123",
283315
},
284316
wantDNSForward: []string{dnsForwardIpv4},
285317
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -294,7 +326,10 @@ func Test_createPastaArgs(t *testing.T) {
294326
wantArgs: []string{
295327
"--config-net", "--log-file=/tmp/log", "--trace", "--debug",
296328
"--dns-forward", dnsForwardIpv4, "-t", "none", "-u", "none", "-T", "none", "-U", "none",
297-
"--no-map-gw", "--netns", "netns123", mapGuestAddrOpt, mapGuestAddrIpv4,
329+
"--no-map-gw",
330+
mapGuestAddrOpt, mapGuestAddrIpv4, mapGuestAddrOpt, mapGuestAddrIpv6,
331+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
332+
"--netns", "netns123",
298333
},
299334
wantDNSForward: []string{dnsForwardIpv4},
300335
wantMapGuestAddr: []string{mapGuestAddrIpv4},
@@ -309,6 +344,7 @@ func Test_createPastaArgs(t *testing.T) {
309344
wantArgs: []string{
310345
"--config-net", mapGuestAddrOpt, "192.168.255.255", dnsForwardOpt, dnsForwardIpv4,
311346
"-t", "none", "-u", "none", "-T", "none", "-U", "none", "--no-map-gw", "--quiet",
347+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
312348
"--netns", "netns123",
313349
},
314350
wantDNSForward: []string{dnsForwardIpv4},
@@ -324,7 +360,9 @@ func Test_createPastaArgs(t *testing.T) {
324360
wantArgs: []string{
325361
"--config-net", mapGuestAddrOpt, "192.168.255.255", mapGuestAddrOpt, "::1",
326362
dnsForwardOpt, dnsForwardIpv4, "-t", "none", "-u", "none", "-T", "none",
327-
"-U", "none", "--no-map-gw", "--quiet", "--netns", "netns123",
363+
"-U", "none", "--no-map-gw", "--quiet",
364+
addressOpt, guestAddrIpv6, gatewayOpt, gatewayIpv6,
365+
"--netns", "netns123",
328366
},
329367
wantDNSForward: []string{dnsForwardIpv4},
330368
wantMapGuestAddr: []string{"192.168.255.255", "::1"},

0 commit comments

Comments
 (0)