Jelajahi Sumber

alloc: fix nil ptr bug

Eugene Yakubovich 9 tahun lalu
induk
melakukan
41cb09f0e8
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      backend/alloc/alloc.go

+ 1 - 0
backend/alloc/alloc.go

@@ -37,6 +37,7 @@ func (m *AllocBackend) Init(extIface *net.Interface, extIP net.IP) (*backend.Sub
 	l, err := m.sm.AcquireLease(m.ctx, m.network, &attrs)
 	switch err {
 	case nil:
+		m.lease = l
 		return &backend.SubnetDef{
 			Net: l.Subnet,
 			MTU: extIface.MTU,