// CleanStaleEntries scans conntrack table and removes any entries // for a service that do not correspond to a serving endpoint. func CleanStaleEntries(ct Interface, ipFamily v1.IPFamily, svcPortMap proxy.ServicePortMap, endpointsMap proxy.EndpointsMap) { … } var ipFamilyMap … var protocolMap … // filterForNAT returns *conntrackFilter to delete the conntrack entries for connections // specified by the destination IP (original direction) and source IP (reply direction). func filterForNAT(origin, dest string, protocol v1.Protocol) *conntrackFilter { … } // filterForPortNAT returns *conntrackFilter to delete the conntrack entries for connections // specified by the destination Port (original direction) and source IP (reply direction). func filterForPortNAT(dest string, port int, protocol v1.Protocol) *conntrackFilter { … }