File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,17 @@ func StartGVisorNetstack(ctx context.Context, gVisorOpts *GVisorNetstackOpts) {
39
39
protocol = types .QemuProtocol
40
40
}
41
41
42
+ // The way gvisor-tap-vsock implemented slirp is different from tradition SLIRP,
43
+ // - GatewayIP handling all request, also answers DNS queries
44
+ // - based on NAT configuration, gateway forwards and translates calls to host
45
+ // Comparing this with QEMU SLIRP,
46
+ // - DNS is equivalent to GatewayIP
47
+ // - GatewayIP is equivalent to NAT configuration
42
48
config := types.Configuration {
43
49
Debug : false ,
44
50
MTU : opts .MTU ,
45
51
Subnet : SlirpNetwork ,
46
- GatewayIP : SlirpGateway ,
52
+ GatewayIP : SlirpDNS ,
47
53
GatewayMacAddress : "5a:94:ef:e4:0c:dd" ,
48
54
DHCPStaticLeases : map [string ]string {
49
55
SlirpIPAddress : opts .MacAddress ,
@@ -54,9 +60,9 @@ func StartGVisorNetstack(ctx context.Context, gVisorOpts *GVisorNetstackOpts) {
54
60
DNS : []types.Zone {},
55
61
DNSSearchDomains : searchDomains (),
56
62
NAT : map [string ]string {
57
- SlirpDNS : "127.0.0.1" ,
63
+ SlirpGateway : "127.0.0.1" ,
58
64
},
59
- GatewayVirtualIPs : []string {SlirpDNS },
65
+ GatewayVirtualIPs : []string {SlirpGateway },
60
66
Protocol : protocol ,
61
67
}
62
68
You can’t perform that action at this time.
0 commit comments