I'm using nagios-plugins-1.4.3. I wanted check_ping to ping from an
My eth0 has ip 10.0.0.1 and 10.0.0.2, and I want the ping to come from
So I (horribly) hacked check_ping.c to use the -I function of /bin/ping.
Patch is provided in attachment.
But the problem is that from then check_ping randomly segfault. When
launched as fast as possible (in a shell 'while true; do' loop, pinging
an unreachable ip so falling in timeout after 6 seconds) it segfault in
average every 15 minutes (but it can not segfault during more than one
houre, and segfault every 2 minutes during 10 minutes)
As check_ping didn't core dump, I hacked it to make it core (as seen in
the patch). I caught the core, but nothing is visible in the gdb (I must
mention that I compile on a machine and using it on an other. Both are
the same OS (Mandriva) with the same versions of libs).
So I tried to link it statically and hope seeing something in gdb...
I must say that my C skills are pretty crap :)
Could someone help me finding what happens? Or indicating me an other
way to achieve want I want to do (ping from a different ip) ?