summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/loader.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-10-09 15:11:46 -0700
committerShentubot <shentubot@google.com>2018-10-09 15:12:44 -0700
commitc36d2ef3733a0619b992f8ddc23b072474b04044 (patch)
tree47e4ede4684bda149658a22bdce585abce786f72 /runsc/boot/loader.go
parentacf7a951894a1b445ff61e945e32c989892f476f (diff)
Add new netstack metrics to the sentry
PiperOrigin-RevId: 216431260 Change-Id: Ia6e5c8d506940148d10ff2884cf4440f470e5820
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r--runsc/boot/loader.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 5716ef217..1ad6b09f4 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -683,11 +683,14 @@ func newEmptyNetworkStack(conf *Config, clock tcpip.Clock) (inet.Stack, error) {
// NetworkNone sets up loopback using netstack.
netProtos := []string{ipv4.ProtocolName, ipv6.ProtocolName, arp.ProtocolName}
protoNames := []string{tcp.ProtocolName, udp.ProtocolName, ping.ProtocolName4}
- s := &epsocket.Stack{stack.New(netProtos, protoNames, stack.Options{Clock: clock})}
+ s := epsocket.Stack{stack.New(netProtos, protoNames, stack.Options{
+ Clock: clock,
+ Stats: epsocket.Metrics,
+ })}
if err := s.Stack.SetTransportProtocolOption(tcp.ProtocolNumber, tcp.SACKEnabled(true)); err != nil {
return nil, fmt.Errorf("failed to enable SACK: %v", err)
}
- return s, nil
+ return &s, nil
default:
panic(fmt.Sprintf("invalid network configuration: %v", conf.Network))