Skip to content

Advertisment converting ipv4 into ipv6 #290

@danthegoodman1

Description

@danthegoodman1

with the code noise.NewNode(noise.WithNodeBindHost(netIP), noise.WithNodeBindPort(uint16(*NodePort))), when a message is sent to something using the ipv4 address 192.168.0.4 it works fine. However when I go back through kademlia table:
for _, node := range overlay.Table().Peers() {
log.Println(node)
log.Println(node.Host)
}
I get addresses like "address": "[c0a8:1c1::]:4444" and a host of c0a8:1c1::.

How do I prevent it from converting into an IPv6 address?

Edit: I'll also add that the node knows the IPv4 itself: log.Println("Node listening on:", TestNode.Addr()) -> Node listening on: 192.168.1.193:4444

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions