- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ValidateProtocol (0.11 sec)
-
pkg/proxy/ipvs/ipset/ipset.go
func (e *Entry) checkIPandProtocol(set *IPSet) bool { // set default protocol to tcp if empty if len(e.Protocol) == 0 { e.Protocol = ProtocolTCP } else if !validateProtocol(e.Protocol) { return false } return e.checkIP(set) } // checkIP checks if IP of Entry is valid. func (e *Entry) checkIP(set *IPSet) bool { if netutils.ParseIPSloppy(e.IP) == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 19 01:20:51 UTC 2023 - 17.1K bytes - Viewed (0) -
pkg/config/validation/validation.go
func ValidatePortName(name string) error { if !labels.IsDNS1123Label(name) { return fmt.Errorf("invalid port name: %s", name) } return nil } // ValidateProtocol validates a portocol name is known func ValidateProtocol(protocolStr string) error { // Empty string is used for protocol sniffing. if protocolStr != "" && protocol.Parse(protocolStr) == protocol.Unsupported {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 04:03:33 UTC 2024 - 107.2K bytes - Viewed (0) -
pkg/proxy/ipvs/ipset/ipset_test.go
}, { // case[7] protocol: "", valid: false, }, { // case[8] protocol: ProtocolSCTP, valid: true, }, } for i := range testCases { valid := validateProtocol(testCases[i].protocol) if valid != testCases[i].valid { t.Errorf("case [%d]: unexpected mismatch, expect valid[%v], got valid[%v], desc: %s", i, testCases[i].valid, valid, testCases[i].desc) } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 19 01:20:51 UTC 2023 - 41.5K bytes - Viewed (0)