code: func FilterResolvDNS(resolvConf []byte, ipv6Enabled bool) (*File, error) {
  	cleanedResolvConf := localhostNSRegexp.ReplaceAll(resolvConf, []byte{})
  	// if IPv6 is not enabled, also clean out any IPv6 address nameserver
  	if !ipv6Enabled {
  		cleanedResolvConf = nsIPv6Regexp.ReplaceAll(cleanedResolvConf, []byte{})
  	}
  	// if the resulting resolvConf has no more nameservers defined, add appropriate
  	// default DNS servers for IPv4 and (optionally) IPv6
  	if len(GetNameservers(cleanedResolvConf, types.IP)) == 0 {
  		logrus.Infof("No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: %v", defaultIPv4Dns)
  		dns := defaultIPv4Dns
  		if ipv6Enabled {
  			logrus.Infof("IPv6 enabled; Adding default IPv6 external servers: %v", defaultIPv6Dns)
  			dns = append(dns, defaultIPv6Dns...)
  		}
  		cleanedResolvConf = append(cleanedResolvConf, []byte("\n"+strings.Join(dns, "\n"))...)
  	}
  	hash, err := ioutils.HashData(bytes.NewReader(cleanedResolvConf))
  	if err != nil {
  		return nil, err
  	}
  	return &File{Content: cleanedResolvConf, Hash: hash}, nil
  }
docs: // FilterResolvDNS cleans up the config in resolvConf.  It has two main jobs:
  // 1. It looks for localhost (127.*|::1) entries in the provided
  //    resolv.conf, removing local nameserver entries, and, if the resulting
  //    cleaned config has no defined nameservers left, adds default DNS entries
  // 2. Given the caller provides the enable/disable state of IPv6, the filter
  //    code will remove all IPv6 nameservers if it is not enabled for containers
  //