[sane-devel] saned on Gentoo 1.4: disable IPv6?

Wolfgang Fabics wolfgang.fabics@chello.at
Mon, 22 Dec 2003 14:20:06 +0100


Hi all,

Maybe this is even somehow related to Jim George's problem... here's
what gives:

- Local scanning thru the parport as root works just fine
  (mustek_pp backend). But ofc I want to use saned...

- Tried to start saned (as usual) from xinetd, which started without
  errors... but saned did not start when connecting to 6566/tcp
  ("connection refused"). So I disabled xinetd completely and tried
  saned manually...

- ...and found that saned doesn't start at all without debug parameters.
   saned -d gives me:

   [saned] main: [1] bind failed: Address already in use

   A more thorough saned -d128 shows (same thing as at Jim's place):

  [saned] main: starting debug mode (level 128)
  [saned] main: trying to get port for service `sane' (getaddrinfo)
  [saned] main: [0] socket () using IPv6
  [saned] main: [0] setsockopt ()
  [saned] main: [0] bind () to port 6566
  [saned] main: [0] listen ()
  [saned] main: [1] socket () using IPv4
  [saned] main: [1] setsockopt ()
  [saned] main: [1] bind () to port 6566
  [saned] main: [1] bind failed: Address already in use
  [saned] main: waiting for control connection

  But - hooray! - saned runs finally. I can confirm this by a quick
  scanimage -L from a different terminal window:

  # scanimage -L
  device `mustek_pp:Mustek-1200CP' is a Mustek 1200CP flatbed scanner
  device `net:127.0.0.1:mustek_pp:Mustek-1200CP' is a Mustek 1200CP
  flatbed scanner

- But at the same time, the following happens to saned (I do not run
   1.0.13 bcs it is not in the portage tree yet, and I want to keep at
   least 'this' system somewhat tidy ;-):

   [saned] saned (AF-indep+IPv6) from sane-backends 1.0.12 ready
   [saned] check_host: detected an IPv4-mapped address
   [saned] check_host: access by remote host: ::ffff:127.0.0.1
   [saned] check_host: remote host is IN_LOOPBACK: access granted
   [saned] init: access granted
   [saned] init: access granted to @::ffff:127.0.0.1
   [saned] process_request: waiting for request
   [saned] process_request: got request 1
   [saned] process_request: waiting for request
   [saned] process_request: got request 10
   [saned] quit: exiting

   Pop goes the world, no more saned 'round here *sob*.

So, my questions circle around that IPv6 thing in the first place:
Despite the fact that I have disabled IPv6 on my system (USE="-ipv6),
the sane-backends' ./configure script claimed

"checking whether to use IPv6... yes"

How come? And how do I turn that off? Didn't find anything in the
manuals (neither sane nor Gentoo) that I could relate to that. In fact,
sane-backends does not seem to recognize USE flags at all:

# etcat uses sane-backends
[ Colour Code : set unset ]
[ Legend      : (U) Col 1 - Current USE flags        ]
[             : (I) Col 2 - Installed With USE flags ]
[ No USE flags found for : media-gfx/sane-backends ]

Any help with this would be much appreciated!

TIA,
-wolfgang