[sane-devel] saned, dhcp and /etc/hosts

Henning Meier-Geinitz henning at meier-geinitz.de
Fri Feb 8 21:09:47 GMT 2002


Hi,

On Fri, Feb 08, 2002 at 12:13:15PM -0500, Sunil William Savkar wrote:
> Is there anyway around the "bug"/"glitch" in which saned does not appear to
> allow hosts to connect unless the host is in /etc/hosts of the linux
> machine?

See my other mail concerning this.

> This is very disturbing.  I have sane running with my HP scanjet on the
> linux box, with saned up and running.
> 
> If I try to connect from a win32 machine which gets its IP through DHCP, I
> get a rejection from saned with teh error that savkar@(none) is rejected.
> 
> I haev already edited saned.d and put a "+" so that all hosts SHOULD be
> accepted.

All that can be resolved.

> What is going on?  The only way to fix this is to finally set up /etc/hosts
> to point to the win32 machine, except this only works until the win32
> machine gets a different IP.

As a quick workaround you could edit sane-backends/frontend/saned.c,
function check_host() and just return without a check. E.g. remove the
line

if (IN_LOOPBACK (ntohl (sin.sin_addr.s_addr)))

This is untested and dangerous. You should at least use tcpd to avoid
access from anywhere on the net.

I have no experience with DHCP. Is there no way to automatically
assign a name to all ip addresses that may be assigned by DHCP? Don't
you get lots of other problems when name resolution doesn't work?

Bye,
  Henning





More information about the sane-devel mailing list