From owner-freebsd-stable@FreeBSD.ORG Mon Nov 14 23:16:26 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07F5B106564A for ; Mon, 14 Nov 2011 23:16:26 +0000 (UTC) (envelope-from gr@ubuntu64.secure-side.com) Received: from admin.secure-side.com (admin.secure-side.com [213.251.166.100]) by mx1.freebsd.org (Postfix) with SMTP id 85F3B8FC16 for ; Mon, 14 Nov 2011 23:16:25 +0000 (UTC) Received: (qmail 26624 invoked from network); 14 Nov 2011 22:49:48 -0000 Received: from localhost (HELO ubuntu64.secure-side.com) (@127.0.0.1) by qmail with SMTP; 14 Nov 2011 22:49:48 -0000 Received: from localhost (localhost [127.0.0.1]) by ubuntu64.secure-side.com (Postfix) with ESMTP id C2165469E5; Mon, 14 Nov 2011 23:49:35 +0100 (CET) Received: from ubuntu64.secure-side.com ([127.0.0.1]) by localhost (ubuntu64.secure-side.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05vKXvcjZsiu; Mon, 14 Nov 2011 23:49:31 +0100 (CET) Received: from ubuntu64.secure-side.com (ubuntu64.secure-side.com [192.168.1.146]) by ubuntu64.secure-side.com (Postfix) with ESMTP id 150CB46859; Mon, 14 Nov 2011 23:49:31 +0100 (CET) Date: Mon, 14 Nov 2011 23:49:30 +0100 (CET) From: GomoR To: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Message-ID: <40d293fd-1909-4ccd-a32d-750bdba58c21@ubuntu64> In-Reply-To: <4279f879-81b0-4e08-a2d7-63aad377d437@ubuntu64> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [82.231.148.242] X-Mailer: Zimbra 7.1.3_GA_3346 (ZimbraWebClient - GC15 ([unknown])/7.1.3_GA_3346) Cc: Subject: Something broken with libdnet? Or FreeBSD 9.0-RC1? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2011 23:16:26 -0000 Hello list, I was updating one of my Perl module (Net::Libdnet), and came accross a bug under FreeBSD 9.0-RC1 and libdnet. My setup is one interface configured with multiple aliases. See details at the end of the message. One host works ok (FreeBSD 8.2-RELEASE), and another fails to find correct IP information (FreeBSD 9.0-RC1). The main bug is that under 9.0-RC1, libdnet fails to find the correct inet address for the interface. It gets the first alias instead. I don't know if the bug comes from libdnet or 9.0-RC1, so I let knowledgeable people here to look at it (or not). For those who want to test, you can install libdnet from /usr/ports/net/libdnet. Host FreeBSD 8.2-RELEASE (ok): % ifconfig re0 re0: flags=8843 metric 0 mtu 1500 options=389b ether MAC_ADDR inet PUBLIC_IP4 netmask 0xffffff00 broadcast PUBLIC_IP4.255 inet6 LOCAL_IP6%re0 prefixlen 64 scopeid 0x1 inet 192.168.0.10 netmask 0xffffffff broadcast 192.168.0.10 [...many aliases...] inet6 PUBLIC_IP6::2 prefixlen 128 inet6 PUBLIC_IP6::3 prefixlen 128 inet6 PUBLIC_IP6::4 prefixlen 128 inet6 PUBLIC_IP6::5 prefixlen 128 inet6 PUBLIC_IP6::1 prefixlen 56 % dnet intf get re0 re0: flags=0x31 mtu 1500 inet PUBLIC_IP4/24 link MAC_ADDR alias fe80:1::21c:c0ff:feca:1178/64 alias 192.168.0.10 [...many aliases...] alias PUBLIC_IP6::2/0 alias PUBLIC_IP6::3/0 alias PUBLIC_IP6::4/0 alias PUBLIC_IP6::5/0 alias PUBLIC_IP6::1/0 Host FreeBSD 9.0-RC1 (not ok): % ifconfig re0 re0: flags=8943 metric 0 mtu 1500 options=389b ether MAC_ADDR inet 192.168.2.10 netmask 0xffffffff broadcast 192.168.2.10 [...many aliases...] inet 192.168.1.148 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active % dnet intf get re0 re0: flags=0x31 mtu 1500 inet 192.168.2.10 link MAC_ADDR alias 192.168.2.11 alias 192.168.2.12 alias 192.168.2.13 alias 192.168.2.14 alias 192.168.1.148 # Correct inet address -- ^ ___ ___ http://www.GomoR.org/ <-+ | / __ |__/ Senior Security Engineer | | \__/ | \ ---[ zsh$ alias psed='perl -pe ' ]--- | +--> Net::Frame <=> http://search.cpan.org/~gomor/ <---+