Hi,

I was hoping someone could help me with an issue. I have a simple UDP 
server that listens on a specific port, responding with a message back.

conn, err := net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4(0, 0, 0, 0), 
Port: *port})

When reading messages, I use the source address for sending a response back.

n, sourceAddr, err := conn.ReadFromUDP(buff)
conn.WriteToUDP(reply, sourceAddr)

When my WAN interface has a single IPv4 address, the server can read and 
respond properly. When there's an additional IPv4 address on the WAN, 
requests to the second IP are successful received, but the response is not 
received by the original sender.

Is there another way to fix this other than explicitly calling ListenUDP on 
the two addresses?


Best,
Tanner

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/accf321d-75ad-4afb-9709-54ced8b37c5e%40googlegroups.com.

Reply via email to