NetBSD Problem Report #39603

From www@NetBSD.org  Mon Sep 22 02:16:22 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 1C26863BC83
	for <gnats-bugs@gnats.netbsd.org>; Mon, 22 Sep 2008 02:16:22 +0000 (UTC)
Message-Id: <20080922021621.AB5D763BA98@narn.NetBSD.org>
Date: Mon, 22 Sep 2008 02:16:21 +0000 (UTC)
From: Ephaeton@gmx.net
Reply-To: Ephaeton@gmx.net
To: gnats-bugs@NetBSD.org
Subject: postfix doesn't see all "active" network interfaces
X-Send-Pr-Version: www-1.0

>Number:         39603
>Category:       bin
>Synopsis:       postfix doesn't see all "active" network interfaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 22 02:20:00 +0000 2008
>Last-Modified:  Mon Jun 22 09:15:00 +0000 2015
>Originator:     Martin S. Weber
>Release:        4.99.72 / i386
>Organization:
>Environment:
NetBSD agamemnon.entropie.local 4.99.72 NetBSD 4.99.72 (AGAMEMNON) #4: Sat Sep 20 20:45:58 EDT 2008  root@agamemnon.entropie.local:/home/netbsd/obj/sys/arch/i386/compile/AGAMEMNON i386
>Description:
postfix on startup checks for its own inet-address(es). On my machine it wouldn't find the (active) ath0, maybe because there's an inactive wm0, too. Complaint at system startup, or even later after wpa_supplicant and dhclient helped ath0 come online, are simply:

postfix: fatal: could not find any active network interfaces

But look:

# ifconfig -a
wm0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        capabilities=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
        enabled=0
        address: somemac
        media: Ethernet autoselect (none)
        status: no carrier
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid SOME nwkey yeahsuremykeystandshere
        powersave off
        bssid somebssid chan 1
        address: somemac
        media: IEEE802.11 autoselect (OFDM54 mode 11g)
        status: active
        inet 192.168.1.12 netmask 0xffffff00 broadcast 192.168.1.255
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000

I mean I'm writing this via that ath0, it surely is active.
>How-To-Repeat:
Not sure exactly. On my machine, start postfix with wm0 inactive and ath0 active. Maybe it's enough to have > 1 network if on the machine and simply configure the second+ while leaving the 1st offline ?
>Fix:
Find postfix developers and give them more beer.

>Audit-Trail:
From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/39603: postfix doesn't see all "active" network interfaces
Date: Wed, 24 Sep 2008 00:21:29 -0400

 One further point of info, I just saw this on the console:
 Sep 24 00:13:35 agamemnon postfix[452]: fatal: inet_addr_local[siocgif]: ioctl SIOCGIFNETMASK: Device not configured

 does that ring any bell for somebody?

 I'd really like to move over to that machine but without mail.. that's kind of hard.
 I should probably try again with a GENERIC...

 -Martin

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/39603: postfix doesn't see all "active" network interfaces
Date: Wed, 24 Sep 2008 00:32:03 -0400

 On Wed, Sep 24, 2008 at 04:25:02AM +0000, Martin S. Weber wrote:
 >  I should probably try again with a GENERIC...

 Which doesn't help either. So next step is to get a sandbox
 somewhere with an IPv6 aware install to compare it to that?
 But that sucks. Next thing I'll try is with linux emu enabled
 as that's as useful for me :(

 -Martin

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/39603: postfix doesn't see all "active" network interfaces
Date: Fri, 26 Sep 2008 10:56:53 -0400

 On Wed, Sep 24, 2008 at 04:25:02AM +0000, Martin S. Weber wrote:
 >  One further point of info, I just saw this on the console:
 >  Sep 24 00:13:35 agamemnon postfix[452]: fatal: inet_addr_local[siocgif]: ioctl SIOCGIFNETMASK: Device not configured

 Yeah well, it was my "broken configuration" (Matthias Scheler) userland. 
 (mail-index.netbsd.org/pkgsrc-users/2007/09/12/0006.html in response to
  mail-index.netbsd.org/pkgsrc-users/2007/09/12/0002.html -- a problem which
  still exists but given the rest of the thread you're not really interested
  in hearing about it anyways).

 I now could rant on how it sucks that lack of IPv6 breaks IPv4,
 how use of a plain build system variable renders your system unusable,
 how IPv6 is forced upon all of us like the federal surveillance and
 how the ugly ipv6 warts now sprout all over my system but well...

 Sorry for the noise. If you wanna make something sensible out of this
 PR, change it to mean "Remove MKINET6 and USE_INET6 from the system as
 their use will break it"

 Hail IPV6!

 -Martin

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, Ephaeton@gmx.net
Subject: Re: bin/39603: postfix doesn't see all "active" network interfaces
Date: Sat, 27 Sep 2008 18:35:28 +0000

 On Fri, Sep 26, 2008 at 03:00:05PM +0000, Martin S. Weber wrote:
  >  Yeah well, it was my "broken configuration" (Matthias Scheler) userland. 
  >  (mail-index.netbsd.org/pkgsrc-users/2007/09/12/0006.html in response to
  >   mail-index.netbsd.org/pkgsrc-users/2007/09/12/0002.html -- a problem which
  >   still exists but given the rest of the thread you're not really interested
  >   in hearing about it anyways).

 Yeah, whatever. A system where both userland and kernel are built
 without IPv6 ought to work. If it doesn't, it's a bug, even if some
 people might consider it a low priority.

 What's happening with IPv6 that causes the symptoms you reported?

 Also note PR 38114. :-/

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: David Holland <dholland-bugs@netbsd.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/39603: postfix doesn't see all "active" network interfaces
Date: Sat, 27 Sep 2008 16:14:10 -0400

 On Sat, Sep 27, 2008 at 06:35:28PM +0000, David Holland wrote:
 > On Fri, Sep 26, 2008 at 03:00:05PM +0000, Martin S. Weber wrote:
 >  >  Yeah well, it was my "broken configuration" (Matthias Scheler) userland. 
 >  >  (mail-index.netbsd.org/pkgsrc-users/2007/09/12/0006.html in response to
 >  >   mail-index.netbsd.org/pkgsrc-users/2007/09/12/0002.html -- a problem which
 >  >   still exists but given the rest of the thread you're not really interested
 >  >   in hearing about it anyways).
 > 
 > Yeah, whatever. A system where both userland and kernel are built
 > without IPv6 ought to work. If it doesn't, it's a bug, even if some
 > people might consider it a low priority.

 That's what I was thinking, too, especially that when using some of
 the "builtin" MK* variables, your system -never- should come out
 unusable. But on different occassions different people answered me
 like m.s. so at some point you're just giving up.

 > 
 > What's happening with IPv6 that causes the symptoms you reported?
 > 

 I don't know what's wrong with postfix really, the error message from
 the kernel is the best clue I have and thinking of IPv6 was only the
 last thing I did (because gif(4) mentions IP6). I'd expect 'gif' to
 work for ipv4 over v4 tunneling too, so it really might be considered
 a bug in postfix.

 As soon as I install a userland without MKINET6=no, and run on a kernel
 without IP6, I'm fine. IPv6 seems present but it won't work so it's
 just ugly and verbose but not as evil as running with IPv6 supported.

 > Also note PR 38114. :-/

 At least for me it built; then again I was building natively on a
 i386 for i386, and not on/for evbarm...

 The build cluster should imho build with every combination of MK*
 variables possible, even if only once a week, and bugs / build-failures
 rising up there should be considered seriously. Then again I understand
 this is an oss project and if nobody's interested in fixing breakage
 introduced by too deeply embedding IPv6, then tough luck.

 I at least don't have the expertise in that area, and surely not the
 time to get it within any considerable amount of time.

 the only further thing I could do is opening (another) PR saying
 "IPv6 is embedded too tightly into the system" but I guess I'm only
 hearing a mix of silence and insults for it. NetBSD and IPv6 is picky,
 just as ad@ and any non-ad thread library.

 -Martin

From: Rin Okuyama <okuyama@flex.phys.tohoku.ac.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/39603 postfix doesn't see all "active" network interfaces
Date: Mon, 22 Jun 2015 16:53:13 +0900

 Dear All,

 This problem occurs even in NetBSD 7.99.19, but I've found a solution.

 You can repeat the problem to build postfix with MKINET6=no:

   # cd /usr/src/external/ibm-public/postfix
   # make MKINET6=no
   # make MKINET6=no DESTDIR= install
   # /etc/rc.d/postfix start

 Then, it fails to start with following messages:

   /usr/sbin/postconf: fatal: could not find any active network interfaces
   postfix: fatal: could not find any active network interfaces

 This is because postfix assumes that getifaddrs(3) is absent when IPv6
 is not supported. Therefore, it fails to detect network interfaces.

 To fix this, apply a patch below: define HAVE_GETIFADDRS regardless of
 IPv6 support, which works fine for me. Note that this change has also
 affects on other systems than NetBSD. It might be better to check
 __NetBSD__ macro before defining HAVE_GETIFADDRS, though I guess that
 getifaddrs(3) has nothing to do with IPv6 in other systems too.

 All the best,
 Rin Okuyama

 --- external/ibm-public/postfix/dist/src/util/sys_defs.h.orig	2015-06-22
 15:30:14.000000000 +0900
 +++ external/ibm-public/postfix/dist/src/util/sys_defs.h	2015-06-22
 15:36:21.000000000 +0900
 @@ -181,9 +181,10 @@
      || (defined(OpenBSD) && OpenBSD >= 200003) \
      || defined(__DragonFly__) \
      || defined(USAGI_LIBINET6)
 +#define HAVE_GETIFADDRS
 +
  #ifndef NO_IPV6
  # define HAS_IPV6
 -# define HAVE_GETIFADDRS
  #endif

  #if (defined(__FreeBSD_version) && __FreeBSD_version >= 300000) \

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.