aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discv5/udp.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/discv5/udp.go')
-rw-r--r--p2p/discv5/udp.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/discv5/udp.go b/p2p/discv5/udp.go
index 49e1cb811..ff5ed983b 100644
--- a/p2p/discv5/udp.go
+++ b/p2p/discv5/udp.go
@@ -230,7 +230,8 @@ type udp struct {
}
// ListenUDP returns a new table that listens for UDP packets on laddr.
-func ListenUDP(priv *ecdsa.PrivateKey, conn conn, realaddr *net.UDPAddr, nodeDBPath string, netrestrict *netutil.Netlist) (*Network, error) {
+func ListenUDP(priv *ecdsa.PrivateKey, conn conn, nodeDBPath string, netrestrict *netutil.Netlist) (*Network, error) {
+ realaddr := conn.LocalAddr().(*net.UDPAddr)
transport, err := listenUDP(priv, conn, realaddr)
if err != nil {
return nil, err