Libunbound and hosts files

Hi,

I have been playing with libunbound (0.11). It works great :slight_smile:

I found that my hosts file (OS X 10.5.2) contains entries like

fe80::1%lo0 localhost

which ub_ctx_hosts doesn't like. You get (presumably from line 896 of libunbound.c)

error reading hosts: syntax error. errno says: Invalid argument

Also, It made me wonder if in general ub_ctx_hosts should just skip lines it can not read and continue trying to parse the rest of the hosts file.

thanks
John

Hi John,

John Dickinson wrote:

I have been playing with libunbound (0.11). It works great :slight_smile:

Thanks!

I found that my hosts file (OS X 10.5.2) contains entries like

fe80::1%lo0 localhost

which ub_ctx_hosts doesn't like. You get (presumably from line 896 of
libunbound.c)

error reading hosts: syntax error. errno says: Invalid argument

Also, It made me wonder if in general ub_ctx_hosts should just skip
lines it can not read and continue trying to parse the rest of the hosts
file.

Fixed in svn trunk version, it skips lines with % in the address.

Best regards,
~ Wouter