Date: Tue, 14 Jan 2003 04:27:47 -0700 (MST) From: "Forrest W. Christian" <forrestc@imach.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/47044: Sendmail "Can't assign requested addresses" Message-ID: <200301141127.h0EBRi092030@workhorse.imach.com>
next in thread | raw e-mail | index | archive | help
>Number: 47044 >Category: bin >Synopsis: Sendmail "Can't assign requested addresses" >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 14 03:30:04 PST 2003 >Closed-Date: >Last-Modified: >Originator: Forrest W. Chritian >Release: FreeBSD 4.7-STABLE i386 >Organization: Montana Internet Corporation >Environment: System: FreeBSD relay.mt.net 4.7-STABLE FreeBSD 4.7-STABLE #7: Tue Jan 14 18:45:13 GMT 2003 root@relay.mt.net:/usr/src/sys/compile/MAIL i386 This is on a multiprocessor box. IPv6 has tried both compiled into the kernel, and not. IPv6 has been both enabled and disabled in rc.conf. >Description: For some reason, the following code snippet from the daemon.c source file in /usr/src/contrib/sendmail/src results in a corrupted address in the clt_addr.sin.sin_addr.s_addr field on my system, along with clt_bind being set to true, which indicates the code *thinks* it got a valid address. --------------- clt_bind = false; /* Set up the address for outgoing connection. */ if (bitnset(D_BINDIF, d_flags) && (p = macvalue(macid("{if_addr}"), e)) != NULL && *p != '\0') { #if NETINET6 char p6[INET6_ADDRSTRLEN]; #endif /* NETINET6 */ memset(&clt_addr, '\0', sizeof clt_addr); /* infer the address family from the address itself */ clt_addr.sa.sa_family = addr_family(p); switch (clt_addr.sa.sa_family) { #if NETINET case AF_INET: clt_addr.sin.sin_addr.s_addr = inet_addr(p); if (clt_addr.sin.sin_addr.s_addr != INADDR_NONE && clt_addr.sin.sin_addr.s_addr != INADDR_LOOPBACK) { clt_bind = true; socksize = sizeof (struct sockaddr_in); } break; #endif /* NETINET */ #if NETINET6 case AF_INET6: if (inet_addr(p) != INADDR_NONE) (void) sm_snprintf(p6, sizeof p6, "IPv6:::ffff:%s", p); else (void) sm_strlcpy(p6, p, sizeof p6); if (anynet_pton(AF_INET6, p6, &clt_addr.sin6.sin6_addr) == 1 && !IN6_IS_ADDR_LOOPBACK(&clt_addr.sin6.sin6_addr)) { clt_bind = true; socksize = sizeof (struct sockaddr_in6); } break; #endif /* NETINET6 */ #if 0 default: syserr("554 5.3.5 Address= option unsupported for family %d", clt_addr.sa.sa_family); break; #endif /* 0 */ } if (clt_bind) family = clt_addr.sa.sa_family; } ------------------- As stands, this results in sendmail failing when doing a queue run, getting errors like: ------------ relay# sendmail -v -qRmtha.org Running /var/spool/mqueue/h0E9KMnX000089 (sequence 1 of 108) <xxxxx@mtha.org>... Connecting to mail.mtha.org. via esmtp... makeconnection: cannot bind socket [209.181.34.149]: Can't assign requested address <xxxx@mtha.org>... Connecting to mail.mt.net. via esmtp... makeconnection: cannot bind socket [209.181.34.149]: Can't assign requested address <xxxx@mtha.org>... Deferred: Can't assign requested address Running /var/spool/mqueue/h0E9KMnV000089 (sequence 2 of 108) <xxxx@mtha.org>... Deferred: Can't assign requested address ------------- 209.181.34.149 varies from run to run (although seems to be consistent for several runs in a row, then it changes). 209.181.34.149 is *not* any address here and is *not* associated with the domains in question. On occasion the code works as designed. I have also tried changing -DINET6 to -DINET in the sendmail makefile to verify that it isn't IPV6 code specific. No changes. I have worked around the issue by adding a clt_bind=0; statement at the end of the code snipplet above, which forces the next section of code to disregard the corrupted address and refill the fields. >How-To-Repeat: Easily repeatable on my installation. First time I've seen it. System was originally running earlier (>6months old) copy of FreeBSD-Stable, and had same issues. May just be a subtle configuration error. Willing to work with appropriate FreeBSD/Sendmail team members to help reproduce or fix the problem. I am unsure if this is a FreeBSD library bug or a sendmail bug, thus the freebsd-pr (as I'm more active in the FreeBSD community than the sendmail one). >Fix: Unknown. >Release-Note: >Audit-Trail: >Unformatted: Sendmail "Can't assign requested addresses" From: Forrest W. Christian <forrestc@imach.com> Reply-To: Forrest W. Christian <forrestc@imach.com> Cc: X-send-pr-version: 3.113 X-GNATS-Notify: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301141127.h0EBRi092030>