snmp backend binary dies if no IPv6 support in kernel #4109

Closed
michaelrsweet opened this Issue May 28, 2012 · 2 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented May 28, 2012

Version: 1.6-current
CUPS.org User: katemonster

My system is Gentoo, 32-bit, on 3.3.0 kernel, compiled without support for ipv6. The binary for snmp dies with no error message, and running "strace /usr/libexec/cups/backend/snmp" shows that it dies on the call to socket(AF_INET6...), which failed because my system lacks support for the protocol. The socket call directly preceding that one successfully creates an IPv4 socket, so there's no reason the code should die here.

Steps to reproduce:

  1. Remove IPv6 support from kernel
  2. Re-compile.
  3. Run snmp binary.
Collaborator

michaelrsweet commented Jun 22, 2012

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Jun 22, 2012

"str4109.patch":

Index: backend/snmp.c

--- backend/snmp.c (revision 10534)
+++ backend/snmp.c (working copy)
@@ -251,7 +251,7 @@

#ifdef AF_INET6
if ((ipv6 = _cupsSNMPOpen(AF_INET6)) < 0)

  • return (1);
  • perror("DEBUG: Unable to create IPv6 socket");
    #else
    ipv6 = -1;
    #endif /* AF_INET6 */

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment