Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NetnsDo (0.05 sec)

  1. cni/pkg/nodeagent/netns_other.go

    	return errors.New("not implemented")
    }
    
    func OpenNetns(nspath string) (NetnsCloser, error) {
    	return nil, errors.New("not implemented")
    }
    
    // inspired by netns.Do() but with an existing fd.
    func NetnsDo(fdable NetnsFd, toRun func() error) error {
    	return errors.New("not implemented")
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Mar 14 09:32:25 UTC 2024
    - 1K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/netns_linux.go

    	if err := unix.Setns(int(n.Fd()), unix.CLONE_NEWNET); err != nil {
    		return fmt.Errorf("Error switching to ns fd %v: %v", n.Fd(), err)
    	}
    	return nil
    }
    
    // inspired by netns.Do() but with an existing fd.
    func NetnsDo(fdable NetnsFd, toRun func() error) error {
    	containedCall := func() error {
    		threadNS, err := netns.GetCurrentNS()
    		if err != nil {
    			return fmt.Errorf("failed to open current netns: %v", err)
    		}
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jan 31 10:05:36 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/net.go

    	return &NetServer{
    		ztunnelServer:      ztunnelServer,
    		currentPodSnapshot: podNsMap,
    		podNs:              podNs,
    		podIptables:        podIptables,
    		netnsRunner:        NetnsDo,
    	}
    }
    
    func (s *NetServer) Start(ctx context.Context) {
    	log.Debug("starting ztunnel server")
    	go s.ztunnelServer.Run(ctx)
    }
    
    func (s *NetServer) Stop() {
    	log.Debug("stopping ztunnel server")
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Oct 21 16:48:55 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top