[sane-devel] IPv6 patch for saned and net backend

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 23 Mar 2003 16:41:27 +0100


Hi,

On Sun, Mar 23, 2003 at 12:09:25AM +0100, Julien BLACHE wrote:
> Julien BLACHE <jb@jblache.org> wrote:
> 
> Hi,
> 
> > I updated the patch, new version at
> > <http://people.debian.org/~jblache/sane-IPv6-20030322.patch> (50 KB)
> 
> <http://people.debian.org/~jblache/sane-IPv6-20030323.patch> (48 KB)
> 
> Patch updated again, nothing critical.

*** Tru64 4.1: no IPV6, compiles and works

*** Tru64 5.1: IPV6=yes, compile error:
cc: Error: saned.c, line 507: Missing ")". (closeparen)
        if (SANE_IN6_IS_ADDR_LOOPBACK (sin6->sin6_addr.s6_addr))
------------^

The expanded code looks like this:
      case  26 :
      	    if ( ( ( ( __const uint32_t * ) ( sin6 -> sin6_addr .
	    s6_un . sa6_addr ) ) [ 0 ] == 0 && ( ( __const uint32_t *
	    ) ( sin6 -> sin6_addr . s6_un . sa6_addr ) ) [ 1 ] == 0 &&
	    ( ( __const uint32_t * ) ( sin6 -> sin6_addr . s6_un .
	    sa6_addr ) ) [ 2 ] == 0 && ( ( __const uint32_t * ) ( sin6
	    -> sin6_addr . s6_un . sa6_addr ) ) [ 3 ] == htonl ( 1 ) ) )


*** HPUX 11: IPV6=yes, compiles, but doesn't run (link failures,
    probably unrelated to net/saned)

*** FreeBSD: IPV6=yes, compiles ok, but running net doesn't really work:
bash-2.05$ saned -d128 &
[1] 43196
bash-2.05$ [saned] main: starting debug mode (level 128)
[saned] main: trying to get port for service sane' (getaddrinfo)
[saned] main: "sane" service unknown on your host; you should add
[saned] main:      sane 6566/tcp saned # SANE network scanner daemon
[saned] main: to your /etc/services file (or equivalent). Proceeding
anyway.
[saned] main: [0] socket ()
[saned] main: [0] setsockopt ()
[saned] main: [0] bind ()
[saned] main: [0] listen ()
[saned] main: [1] socket ()
[saned] main: [1] setsockopt ()
[saned] main: [1] bind ()
[saned] main: [1] listen ()
[saned] main: waiting for control connection
scanimage -d net:localhost:test:1 -T
[saned] saned (AF-indep+IPv6) from sane-backends 1.0.11-cvs ready
[saned] check_host: access by remote host: 127.0.0.1
[saned] check_host: remote host is IN_LOOPBACK: access granted
[saned] init: access granted
[saned] init: access granted to hmg@127.0.0.1
[saned] process_request: waiting for request
[saned] process_request: got request 2
[saned] process_request: access to resource test' granted
[saned] process_request: waiting for request
[saned] process_request: got request 4
[saned] process_request: waiting for request
[saned] process_request: bad status 35
[saned] quit: exiting
WARNING: backend requested plain-text password
WARNING: backend requested plain-text password
Authentification required for resource
net:localhost:sane_control_option(handle=%p,option=%d,action=%d,value=%p,info=%p)
. Enter username: 
Enter password: 
[1]+  Done                    saned -d128
Broken pipe

So something seems to go wrong in the communication. It also happens
with ::1 the same way.

It doesn't happen with 1.0.10. I'll do more tests if it's related to
your patch.

*** NetBSD: IPV6=yes, compile is ok, same thing happens as on FreeBSD

Bye,
  Henning