Skip to content

Commit

Permalink
Fixed bug when processing IPv6 link-local addresses for GRPC server
Browse files Browse the repository at this point in the history
  • Loading branch information
0xef53 committed Aug 24, 2022
1 parent 4f89420 commit cade09d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"golang.org/x/sync/errgroup"
)

const AgentVersion = "1.0.3"
const AgentVersion = "1.0.4"
const DefaultSerialPort = "/dev/virtio-ports/org.guest-agent.0"

type Agent struct {
Expand Down Expand Up @@ -130,10 +130,9 @@ func (a Agent) ListenAndServe(ctx context.Context) error {

for _, addr := range addrs {
if _, ok := processed[addr]; !ok {
processed[addr] = struct{}{}

if tl, err := tls.Listen("tcp", net.JoinHostPort(addr, "8383"), tlsConfig); err == nil {
listeners <- tl
processed[addr] = struct{}{}
} else {
log.Debugf("Non-fatal error: could not bind to %s: %s", addr, err)
}
Expand Down

0 comments on commit cade09d

Please sign in to comment.