code: func (daemon *Daemon) updateNetwork(container *container.Container) error {
  	var (
  		start = time.Now()
  		ctrl  = daemon.netController
  		sid   = container.NetworkSettings.SandboxID
  	)
  
  	sb, err := ctrl.SandboxByID(sid)
  	if err != nil {
  		return fmt.Errorf("error locating sandbox id %s: %v", sid, err)
  	}
  
  	// Find if container is connected to the default bridge network
  	var n libnetwork.Network
  	for name, v := range container.NetworkSettings.Networks {
  		sn, err := daemon.FindNetwork(getNetworkID(name, v.EndpointSettings))
  		if err != nil {
  			continue
  		}
  		if sn.Name() == runconfig.DefaultDaemonNetworkMode().NetworkName() {
  			n = sn
  			break
  		}
  	}
  
  	if n == nil {
  		// Not connected to the default bridge network; Nothing to do
  		return nil
  	}
  
  	options, err := daemon.buildSandboxOptions(container)
  	if err != nil {
  		return fmt.Errorf("Update network failed: %v", err)
  	}
  
  	if err := sb.Refresh(options...); err != nil {
  		return fmt.Errorf("Update network failed: Failure in refresh sandbox %s: %v", sid, err)
  	}
  
  	networkActions.WithValues("update").UpdateSince(start)
  
  	return nil
  }
docs: // UpdateNetwork is used to update the container's network (e.g. when linked containers
  // get removed/unlinked).