[liboping] Removing files without FQDN (was: oping bug?)

Florian Forster octo at verplant.org
Sat Jan 26 10:44:35 CET 2008


Hi Alex,

thanks for you bugreport. Thanks to your testcase it was easy to
reproduce and fix the bug :) The problem is that the hostname is set to
the `canonical hostname', if they differ.

I've fixed this by keeping a copy of the `user supplied name' and using
that when doing lookups in the linked list. You can also query that name
from an iterator using `PING_INFO_USERNAME' now.

I'll pack a new release soon, probably this weekend. Since I don't plan
to do any backwards-incompatible changes to the interface I'll probably
bump the version to 1.0.

Regards,
-octo

P. S.: Sorry for the full quote below, it's for the people on the
       mailing list.

On Sat, Jan 26, 2008 at 01:32:56PM +1100, Alex Brooks wrote:
> Hi Florian,
> 
> I think I may have found a bug in liboping.  I've attached a simple program 
> which reproduces it.
> 
> The problem is with ping_host_add and ping_host_remove.  Sometimes if a host 
> is added then removed, the remove fails.
> 
> If the fully-qualified domain name is used, it always works.  For hosts with 
> static IPs (ie in /etc/hosts) it always works (this includes 'localhost').  
> However, the following doesn't seem to work: a host specified by hostname 
> only, whose domain is found through the 'search' line in etc/resolv.conf.
> 
> For example, my /etc/resolv.conf is:
> [a.brooks at mango test]$ cat /etc/resolv.conf
> search acfr.usyd.edu.au
> nameserver 172.17.7.242
> nameserver 129.78.210.242
> nameserver 172.17.7.243
> nameserver 129.78.210.243
> 
> A host on my network is 'bamboo'.
> Adding and removing "bamboo.acfr.usyd.edu.au" works.
> But adding and removing "bamboo" does not work.
> 
> My test program tries this.  The output I see is:
> 
> TRACE(opingerror.cpp): Testing bamboo
> TRACE(opingerror.cpp): retAdd: -1: socket: Operation not permitted
> TRACE(opingerror.cpp): retRemove: -1: ping_host_remove: Host not found
> TRACE(opingerror.cpp): Testing bamboo.acfr.usyd.edu.au
> TRACE(opingerror.cpp): retAdd: -1: socket: Operation not permitted
> TRACE(opingerror.cpp): retRemove: -1: ping_host_remove: Host not found
> 
> 
> Does this look like a bug to you?
> 
> 
> 
> Cheers,
> 
> Alex
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/liboping/attachments/20080126/e5b88f5a/attachment.pgp 


More information about the liboping mailing list