cannot detect IPv6 scanner

Bug #1160650 reported by Kevin Otte
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sane-backends (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

A network scanner running only in IPv6 mode cannot be detected by SANE.

$ avahi-browse -av
Server version: avahi 0.6.31; Host name: scooter.local
E Ifce Prot Name Type Domain
...
+ wlan0 IPv6 Canon MX870 series _3E420E3BFE0D _scanner._tcp local

$ scanimage -L
scanimage: no SANE devices found

However, if the device is configured for IPv4, it is visiable to SANE:

$ avahi-browse -av
Server version: avahi 0.6.31; Host name: scooter.local
E Ifce Prot Name Type Domain
...
+ wlan0 IPv4 Canon MX870 series _3E420E3BFE0D _scanner._tcp local

$ scanimage -L
device `pixma:MX870_gonzo' is a CANON Canon PIXMA MX870 multi-function peripheral

The device in question can only operate in one mode or the other, not dual-stack. We would prefer to use IPv6 wherever possible in our environment, so this is a blocker.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: libsane 1.0.23-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-26.42-generic 3.5.7.6
Uname: Linux 3.5.0-26-generic i686
ApportVersion: 2.6.1-0ubuntu10
Architecture: i386
Date: Tue Mar 26 20:07:52 2013
InstallationDate: Installed on 2013-01-23 (62 days ago)
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Release i386 (20121017.1)
MarkForUpload: True
SourcePackage: sane-backends
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kevin Otte (nivex) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Revision history for this message
Kevin Otte (nivex) wrote :

Note: Initial bug report was made under 12.10, but the following retest performed under 14.04.1.

We seem to have a couple of different problems, both indicating a lack of IPv6 support.

1) Scanner detection over the network is performed with BJNP, and the specification seems to be tied to using IPv4 broadcast.
2) Manual specification of the scanner in the backend configuration is unsuccessful:

kjotte@daedalus:~$ cat /etc/sane.d/pixma.conf
# pixma.conf configuration for the sane pixma backend
#
# define URI's of scanners (one per line)
# This is only used for network scanners.
# normally scanners will be detected by sending a broadcast
# if this does not work under your OS, or if the scanners
# are on a different subnet, configure your scanners URI here
#
# method must be bjnp
# port number can normally be left out, port 8612 is used as default
# Example:
# bjnp://myscanner.my.domain:8612
# bjnp://printer-1.pheasant.org
#
bjnp://gonzo.mibloving.net

kjotte@daedalus:~$ scanimage -L
[pixma] Cannot resolve hostname: gonzo.mibloving.net

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
kjotte@daedalus:~$ host gonzo.mibloving.net
gonzo.mibloving.net has IPv6 address 2001:470:8:f04:8a87:17ff:fe3b:fe0d

Revision history for this message
Kevin Otte (nivex) wrote :

I have located the problem of specifying the scanner directly in the backend config.

kjotte@mystic:/tmp$ apt-get source sane-backends
...
kjotte@mystic:/tmp/sane-backends-1.0.23/backend$ grep -n gethostbyname pixma*
pixma_bjnp.c:1145: result = gethostbyname (hostname);

This will need to be rewritten to use getaddrinfo().

See: IPv6 Porting Information, http://owend.corp.he.net/ipv6/

Revision history for this message
Kevin Otte (nivex) wrote :

At some point along the line this bug has been fixed:

kjotte@mystic:/tmp/sane-backends-1.0.27/backend$ grep -n gethostbyname pixma*
kjotte@mystic:/tmp/sane-backends-1.0.27/backend$ grep -n getaddrinfo pixma*
pixma_bjnp.c:849: if (getaddrinfo(host , service, NULL, &results) == 0)
pixma_bjnp.c:1714: result = getaddrinfo (host, port, &hints, &res );

Tested with same scanner in IPv6 only mode. Discovery and scanning are working correctly.

Manual specification with pixma.conf of a device with AAAA record also appears succesful:
$ scanimage -L
device `pixma:MX870_gonzo' is a CANON Canon PIXMA MX870 multi-function peripheral

Changed in sane-backends (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.