in reply to how can I set LocalAddr to INADDR_ANY in IO::Socket::INET

Your whole problem rest on the claim that the source address must be '0.0.0.0'. Are you sure about that? It would normally be that since the machine has no other address, but I don't think it's a requirement.

For example, wouldn't the source address be something other than '0.0.0.0' in the case where the request is forwarded by a router? It's been a while since I've read the spec and it's not jumping out at me.

  • Comment on Re: how can I set LocalAddr to INADDR_ANY in IO::Socket::INET

Replies are listed 'Best First'.
Re^2: how can I set LocalAddr to INADDR_ANY in IO::Socket::INET
by phio (Acolyte) on Mar 19, 2008 at 12:46 UTC
    Thanks ikegami, you are right! I tried the script and the discovery packet with a non-zero SA packet can be recognized by the DHCP server, which means my assumption is wrong. Thank you all :-)
      which means my assumption is wrong. Thank you all :-)
      Humans, still making assumptions :)
Re^2: how can I set LocalAddr to INADDR_ANY in IO::Socket::INET
by phio (Acolyte) on Mar 19, 2008 at 11:44 UTC
    Yes, I'm trying to simulate a DHCP client to communicate with the server. And normally, when I issue a DHCP discovery request, the Source IP Address should be 0.0.0.0, I haven't seen any discovery packet with a non-0.0.0.0 source address. So if I want to send out a DHCP discovery packet, the SA must be 0.0.0.0.