()
| 143 | ) |
| 144 | |
| 145 | func init() { |
| 146 | mode := envknob.String("TS_DEBUG_NETSTACK_LEAK_MODE") |
| 147 | if mode == "" { |
| 148 | return |
| 149 | } |
| 150 | var lm refs.LeakMode |
| 151 | if err := lm.Set(mode); err != nil { |
| 152 | panic(err) |
| 153 | } |
| 154 | refs.SetLeakMode(lm) |
| 155 | } |
| 156 | |
| 157 | // Impl contains the state for the netstack implementation, |
| 158 | // and implements wgengine.FakeImpl to act as a userspace network |