Skip to content

Commit

Permalink
Add comment about loopback network
Browse files Browse the repository at this point in the history
Signed-off-by: Archit Kulkarni <architkulkarni@google.com>
  • Loading branch information
architkulkarni committed Oct 23, 2024
1 parent a7839ab commit 1d06125
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import (
"github.com/containernetworking/cni/pkg/version"
)

const LoopbackNetworkName = "cni-loopback"

type CNI interface {
// Setup setup the network for the namespace
Setup(ctx context.Context, id string, path string, opts ...NamespaceOpts) (*Result, error)
Expand Down Expand Up @@ -322,7 +324,9 @@ func (c *libcni) StatusDetail(ctx context.Context) ([]*NetworkStatus, error) {
var networks []*NetworkStatus

for _, network := range c.Networks() {
if network.config.Name == "cni-loopback" {
// Skip checking the status of the loopback network. It would have
// always returned the same thing, and is being deprecated anyway.
if network.config.Name == LoopbackNetworkName {
continue
}

Expand Down

0 comments on commit 1d06125

Please sign in to comment.