Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ValidateIPSubnet (0.18 sec)

  1. pkg/config/validation/agent/validation.go

    			}
    		}
    	}
    	errs = AppendErrors(errs, validateSidecarOrGatewayHostnamePart(parts[1], isGateway))
    	return
    }
    
    // ValidateIPSubnet checks that a string is in "CIDR notation" or "Dot-decimal notation"
    func ValidateIPSubnet(subnet string) error {
    	// We expect a string in "CIDR notation" or "Dot-decimal notation"
    	// E.g., a.b.c.d/xx form or just a.b.c.d or 2001:1::1/64
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  2. pkg/config/validation/agent/validation_test.go

    			ok:     true,
    		},
    		{
    			name:   "invalid ipv6 subnet",
    			subnet: "2001:1::1/132",
    			ok:     false,
    		},
    	}
    
    	for _, tt := range tests {
    		if err := ValidateIPSubnet(tt.subnet); err != nil {
    			if tt.ok {
    				t.Errorf("test: \"%s\" expected to succeed but failed with error: %+v", tt.name, err)
    			}
    		} else {
    			if !tt.ok {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  3. pkg/config/validation/validation.go

    			errs = AppendValidation(errs, validateSniHost(sniHost, context))
    		}
    	}
    
    	for _, destinationSubnet := range match.DestinationSubnets {
    		errs = AppendValidation(errs, agent.ValidateIPSubnet(destinationSubnet))
    	}
    
    	if match.Port != 0 {
    		errs = AppendValidation(errs, agent.ValidatePort(int(match.Port)))
    	}
    	errs = AppendValidation(errs, labels.Instance(match.SourceLabels).Validate())
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
Back to top