code: func (n *network) destroySandbox() {
  	if n.sbox != nil {
  		for _, iface := range n.sbox.Info().Interfaces() {
  			if err := iface.Remove(); err != nil {
  				logrus.Debugf("Remove interface %s failed: %v", iface.SrcName(), err)
  			}
  		}
  
  		for _, s := range n.subnets {
  			if hostMode {
  				if err := removeFilters(n.id[:12], s.brName); err != nil {
  					logrus.Warnf("Could not remove overlay filters: %v", err)
  				}
  			}
  
  			if s.vxlanName != "" {
  				err := deleteInterface(s.vxlanName)
  				if err != nil {
  					logrus.Warnf("could not cleanup sandbox properly: %v", err)
  				}
  			}
  		}
  
  		if hostMode {
  			if err := removeNetworkChain(n.id[:12]); err != nil {
  				logrus.Warnf("could not remove network chain: %v", err)
  			}
  		}
  
  		// Close the netlink socket, this will also release the watchMiss goroutine that is using it
  		if n.nlSocket != nil {
  			n.nlSocket.Close()
  			n.nlSocket = nil
  		}
  
  		n.sbox.Destroy()
  		n.sbox = nil
  	}
  }
docs: // to be called while holding network lock