UDP server reply to client refused
Hi,
I'm working on a multiprocess udp server that replies to an initial client request from another port than the one it received the initial request. This scenario is described in the Stevens Unix Network Programming book.
However, the client responds with a "ICMP udp port unreachable" to the reply from another server port (other than the one on which server received the initial client request). recvfrom() just blocks in the client since there is no reply to read from the server.
netstat shows that the client is set to use the original server IP-port pair as the foreign address.
By default, the dgram socket should not be in a 'connected' state? I tried to set the client dgram socket to unconnected state with connect() (AF_UNSPEC), but that doesn't seem to work either. Actually, how can I verify that the socket is not in connected state? What could be the other causes which make the client refuse to receive replies from other server ports?
Ideas? Thanks!
|