raw sockets, ping

Hello everybody.

I’ve got a small question about RAW sockets and pinging.

I need to consequently ping N machines.
The problem is that I receive their replies (ICMP echos) twice.

What could be the problem?

MSG_PEEK isn’t set.

Thank you.

Does the same thing happen when you use the ping command? If so, there is something strange about your network. If not, it is probably a software glitch in your code, so you might want to post it.