Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for clearEntriesWithIP (0.3 sec)

  1. cni/pkg/ipset/ipset.go

    		err = errors.Join(err, v6err)
    	}
    	return err
    }
    
    func (m *IPSet) ClearEntriesWithIP(ip netip.Addr) error {
    	ipToClear := ip.Unmap()
    
    	if ipToClear.Is6() {
    		return m.Deps.clearEntriesWithIP(m.V6Name, ipToClear)
    	}
    	return m.Deps.clearEntriesWithIP(m.V4Name, ipToClear)
    }
    
    func (m *IPSet) ListEntriesByIP() ([]netip.Addr, error) {
    	var err error
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. cni/pkg/ipset/nldeps_unspecified.go

    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) clearEntriesWithComment(name, comment string) error {
    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) clearEntriesWithIP(name string, ip netip.Addr) error {
    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) listEntriesByIP(name string) ([]netip.Addr, error) {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. cni/pkg/ipset/nldeps_mock.go

    	return args.Error(0)
    }
    
    func (m *MockedIpsetDeps) clearEntriesWithComment(name, comment string) error {
    	args := m.Called(name, comment)
    	return args.Error(0)
    }
    
    func (m *MockedIpsetDeps) clearEntriesWithIP(name string, ip netip.Addr) error {
    	args := m.Called(name, ip)
    	return args.Error(0)
    }
    
    func (m *MockedIpsetDeps) listEntriesByIP(name string) ([]netip.Addr, error) {
    	args := m.Called(name)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/net_test.go

    	fakeIPSetDeps := ipset.FakeNLDeps()
    	set := ipset.IPSet{V4Name: "foo-v4", Prefix: "foo", Deps: fakeIPSetDeps}
    
    	fakeIPSetDeps.On("clearEntriesWithIP",
    		"foo-v4",
    		netip.MustParseAddr("3.3.3.3"),
    	).Return(nil)
    
    	fakeIPSetDeps.On("clearEntriesWithIP",
    		"foo-v4",
    		netip.MustParseAddr("2.2.2.2"),
    	).Return(nil)
    
    	err := removePodFromHostNSIpset(pod, &set)
    	assert.NoError(t, err)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/net.go

    }
    
    func removePodFromHostNSIpset(pod *corev1.Pod, hostsideProbeSet *ipset.IPSet) error {
    	podIPs := util.GetPodIPsIfPresent(pod)
    	for _, pip := range podIPs {
    		if err := hostsideProbeSet.ClearEntriesWithIP(pip); err != nil {
    			return err
    		}
    		log.Debugf("removed pod name %s with UID %s from host ipset %s by ip %s", pod.Name, pod.UID, hostsideProbeSet.Prefix, pip)
    	}
    
    	return nil
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 12.2K bytes
    - Viewed (1)
  6. cni/pkg/ipset/nldeps_linux.go

    			err := netlink.IpsetDel(name, &entry)
    			if err != nil {
    				return fmt.Errorf("failed to delete IP %s from ipset %s: %w", entry.IP, name, err)
    			}
    		}
    	}
    	return nil
    }
    
    func (m *realDeps) clearEntriesWithIP(name string, ip netip.Addr) error {
    	delIP := net.IP(ip.AsSlice())
    	res, err := netlink.IpsetList(name)
    	if err != nil {
    		return fmt.Errorf("failed to list ipset %s: %w", name, err)
    	}
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
Back to top