[Nagiosplug-devel] RE: Check_ping with source address

Thomas Guyot-Sionnest Thomas at zango.com
Fri May 19 09:01:06 CEST 2006


Well, sorry for spamming...

I misread the man page for strlen and used it as if it counted the last \0.

This 3rd patch works well, It only need some autoconf mods as I outlined in
my first post.

Thomas

> -----Original Message-----
> From: Thomas Guyot-Sionnest 
> Sent: May 19, 2006 11:25
> To: 'nagiosplug-devel at lists.sourceforge.net'
> Subject: RE: Check_ping with source address
> 
> Forgot to free() my variable in the loop, here's an updated version.
> 
> I however noted a bug where asprintf segfaults if the -s 
> argument is exactly
> 10 characters long, I don't get what's wrong. Any idea?
> 
> Thomas
> 
> > -----Original Message-----
> > From: Thomas Guyot-Sionnest 
> > Sent: May 19, 2006 10:18
> > To: 'nagiosplug-devel at lists.sourceforge.net'
> > Subject: Check_ping with source address
> > 
> > Hi,
> > 
> > I wrote a patch for check_ping that allow to specify a source 
> > address. The
> > idea is to attach a Nagios box on a trunk and ping from 
> > different VLANs.
> > 
> > This patch works wherever ping accept the -I argument (the 
> > ping it was tested 
> > against is from iputils). To do this correctly the "ping -I 
> > x.x.x.x" behavior 
> > should be checked by configure with some code enclosed in 
> > ifdef's, and I have 
> > no idea how to modify autoconf for that.
> > 
> > 
> > Thomas 
> > 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-plugins-1.4.3.ping_source_address.patch
Type: application/octet-stream
Size: 3494 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060519/3c24df2c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3022 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060519/3c24df2c/attachment.bin>


More information about the Devel mailing list