code: func (sb *sandbox) needDefaultGW() bool {
  	var needGW bool
  
  	for _, ep := range sb.getConnectedEndpoints() {
  		if ep.endpointInGWNetwork() {
  			continue
  		}
  		if ep.getNetwork().Type() == "null" || ep.getNetwork().Type() == "host" {
  			continue
  		}
  		if ep.getNetwork().Internal() {
  			continue
  		}
  		// During stale sandbox cleanup, joinInfo may be nil
  		if ep.joinInfo != nil && ep.joinInfo.disableGatewayService {
  			continue
  		}
  		// TODO v6 needs to be handled.
  		if len(ep.Gateway()) > 0 {
  			return false
  		}
  		for _, r := range ep.StaticRoutes() {
  			if r.Destination != nil && r.Destination.String() == "0.0.0.0/0" {
  				return false
  			}
  		}
  		needGW = true
  	}
  
  	return needGW
  }
docs: // Evaluate whether the sandbox requires a default gateway based
  // on the endpoints to which it is connected. It does not account
  // for the default gateway network endpoint.