mirror of https://github.com/hashicorp/consul
fix more incorrect type conversions
parent
7a2ea4bf92
commit
442dca74e2
|
@ -301,6 +301,7 @@ func (s *Converter) filterSubsetEndpoints(subset *structs.ServiceResolverSubset,
|
|||
|
||||
// used in clusters.go
|
||||
func makeHostPortEndpoint(host string, port int) *pbproxystate.Endpoint {
|
||||
if port >= 0 && port <= 65535 {
|
||||
return &pbproxystate.Endpoint{
|
||||
Address: &pbproxystate.Endpoint_HostPort{
|
||||
HostPort: &pbproxystate.HostPortAddress{
|
||||
|
@ -309,6 +310,8 @@ func makeHostPortEndpoint(host string, port int) *pbproxystate.Endpoint {
|
|||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func makeUnixSocketEndpoint(path string) *pbproxystate.Endpoint {
|
||||
|
|
|
@ -764,6 +764,7 @@ func makeListenerWithDefault(opts makeListenerOpts) *pbproxystate.Listener {
|
|||
// // Since access logging is non-essential for routing, warn and move on
|
||||
// opts.logger.Warn("error generating access log xds", err)
|
||||
//}
|
||||
if opts.port >= 0 && opts.port <= 65535 {
|
||||
return &pbproxystate.Listener{
|
||||
Name: fmt.Sprintf("%s:%s:%d", opts.name, opts.addr, opts.port),
|
||||
//AccessLog: accessLog,
|
||||
|
@ -775,6 +776,8 @@ func makeListenerWithDefault(opts makeListenerOpts) *pbproxystate.Listener {
|
|||
},
|
||||
Direction: opts.direction,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func makePipeListener(opts makeListenerOpts) *pbproxystate.Listener {
|
||||
|
|
Loading…
Reference in New Issue