From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 9 07:10:03 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB1A1106566B for ; Fri, 9 Dec 2011 07:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 724758FC13 for ; Fri, 9 Dec 2011 07:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pB97A2Fe055447 for ; Fri, 9 Dec 2011 07:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pB97A2wG055446; Fri, 9 Dec 2011 07:10:02 GMT (envelope-from gnats) Resent-Date: Fri, 9 Dec 2011 07:10:02 GMT Resent-Message-Id: <201112090710.pB97A2wG055446@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Isami Hanaoka Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 454F8106564A for ; Fri, 9 Dec 2011 07:00:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 1B8468FC14 for ; Fri, 9 Dec 2011 07:00:37 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pB970ak3097577 for ; Fri, 9 Dec 2011 07:00:36 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pB970adM097576; Fri, 9 Dec 2011 07:00:36 GMT (envelope-from nobody) Message-Id: <201112090700.pB970adM097576@red.freebsd.org> Date: Fri, 9 Dec 2011 07:00:36 GMT From: Isami Hanaoka To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/163144: There is no way to set nic's alias with both IPv4 and IPv6. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2011 07:10:03 -0000 >Number: 163144 >Category: conf >Synopsis: There is no way to set nic's alias with both IPv4 and IPv6. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 09 07:10:02 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Isami Hanaoka >Release: 9.0-RC2 >Organization: Heart Solutions >Environment: FreeBSD minato.private 9.0-RC2 FreeBSD 9.0-RC2 #0: Sat Nov 12 18:35:25 UTC 2011 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: In 9.0-RC2, RC3, "network.subr" uses "ifconfig_IF_aliasN" for alias setting(both IPv4 and IPv6) The function named "ifalias_ipv4_up" set IPv4's alias and the function named "if alias_ipv6_up" set IPv6's alias. However, the alias index number start from 0 in each function. so there is no way to set nic's alias with both IPv4 and IPv6. The only way is using backward compatibility method, such as "ipv6_ifconfig_IF_aliasN". But this method generate warning. >How-To-Repeat: see my rc.conf: ifconfig_bge0="inet 192.168.252.170 netmask 255.255.255.0" ifconfig_bge0_alias0="inet 192.168.253.171 netmask 255.255.255.255" ifconfig_bge0_alias1="inet 192.168.253.172 netmask 255.255.255.255" ifconfig_bge0_alias2="inet6 2400:XXXX:XXXX:0000::192.168.253.171 prefixlen 64" ifconfig_bge0_alias3="inet6 2400:XXXX:XXXX:0000::192.168.253.172 prefixlen 64" The function named "ifalias_ipv6_up" checks ifconfig_bge0_alias0 first, but no such variables. so, this function exit immediately and alias2 and alias3 are ignored. >Fix: Simple solution: ipv4_alias_up ignores inet6 alias and ipv6_alias_up ignores inet alias. I dont know the solutions is best or not. *** /etc/network.subr- 2011-12-09 15:33:47.471197003 +0900 --- /etc/network.subr 2011-12-09 15:34:43.810200121 +0900 *************** *** 707,712 **** --- 707,714 ---- inet\ *) ifconfig $1 ${ifconfig_args} alias && _ret=0 ;; + inet6\ *) + ;; "") break ;; *************** *** 733,738 **** --- 735,742 ---- inet6\ *) ifconfig $1 ${ifconfig_args} alias && _ret=0 ;; + inet\ *) + ;; "") break ;; >Release-Note: >Audit-Trail: >Unformatted: