[sane-devel] Several strange occurrences in using Sane...

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 8 Feb 2002 21:40:06 +0100


Hi,

On Thu, Feb 07, 2002 at 10:46:56PM -0500, Sunil William Savkar wrote:
> (1)     When I tried using SaneTwain from a win32 machine which uses
> DHCP for getting its IP from my linux box, I would constantly get
> rejected by saned.  The only way to get saned to communicate with my box
> was to edit /etc/hosts.
 
Yes, saned uses gethostbyaddr() and similar functions. With the new way
to check the client, also IP addresses can be entered into saned.conf,
however gethostbyaddr is always called, if the client is not localhost.
So name resolution must work. This can also be done using a name
server, no /etc/hosts necessary.
 
> This just does not seem right.  I tried all sorts of other answers,
> modified saned.conf to allow for all hosts, but this still didn't work.

I think this is a bug. I will think about how we can avoid this. Maybe
an additional check if "+" is present at before the first lookup?

> What is the reason for this?  I was starting to look at the source code,
> but it is still not obvious.

That's just the way it works since I know saned. I thin you must ask
Andreas Beck what he thought about it.

I will add a TODO entry about this. I don't think it's that easy to
fix. Patches are welcome :-)

If I remember correctly, you are the first person who reported this
misfeature so I wasn't aware that it could be a problem.

Bye,
  Henning