code: func effectiveHairpinMode(s *NetworkPluginSettings) error {
  	// The hairpin mode setting doesn't matter if:
  	// - We're not using a bridge network. This is hard to check because we might
  	//   be using a plugin.
  	// - It's set to hairpin-veth for a container runtime that doesn't know how
  	//   to set the hairpin flag on the veth's of containers. Currently the
  	//   docker runtime is the only one that understands this.
  	// - It's set to "none".
  	if s.HairpinMode == kubeletconfig.PromiscuousBridge || s.HairpinMode == kubeletconfig.HairpinVeth {
  		if s.HairpinMode == kubeletconfig.PromiscuousBridge && s.PluginName != "kubenet" {
  			// This is not a valid combination, since promiscuous-bridge only works on kubenet. Users might be using the
  			// default values (from before the hairpin-mode flag existed) and we
  			// should keep the old behavior.
  			klog.Warningf("Hairpin mode set to %q but kubenet is not enabled, falling back to %q", s.HairpinMode, kubeletconfig.HairpinVeth)
  			s.HairpinMode = kubeletconfig.HairpinVeth
  			return nil
  		}
  	} else if s.HairpinMode != kubeletconfig.HairpinNone {
  		return fmt.Errorf("unknown value: %q", s.HairpinMode)
  	}
  	return nil
  }
docs: // effectiveHairpinMode determines the effective hairpin mode given the
  // configured mode, and whether cbr0 should be configured.