From owner-freebsd-bugs@freebsd.org Mon Aug 10 10:12:28 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88D92998872 for ; Mon, 10 Aug 2015 10:12:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B4DF99C for ; Mon, 10 Aug 2015 10:12:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t7AACS47025346 for ; Mon, 10 Aug 2015 10:12:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 202215] /etc/network.subr IP aliases broken for vlan subinterfaces Date: Mon, 10 Aug 2015 10:12:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 9.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: hhw@pce-net.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 10:12:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202215 Bug ID: 202215 Summary: /etc/network.subr IP aliases broken for vlan subinterfaces Product: Base System Version: 9.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: conf Assignee: freebsd-bugs@FreeBSD.org Reporter: hhw@pce-net.com MFC r267812 for normalizing interface names ($_if) with ".+-" in them before using it in a pattern to list_vars() broke the ability to have aliases on vlan sub-interfaces by modifying the value of $_if instead of just using the normalized form for matching. By using a separate local variable for the matching pattern and leaving the original value of $_if intact, list_vars can return the appropriate values without causing issues for configuring the IP aliases themselves. Unified diff for fix included below: --- /etc/network.subr.orig 2014-07-10 16:50:15.000000000 -0700 +++ /etc/network.subr 2015-08-10 02:35:39.000000000 -0700 @@ -1010,7 +1010,7 @@ # ifalias_af_common() { - local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf + local _ret _if _nif _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf local _punct=".-/+" _ret=1 @@ -1020,10 +1020,10 @@ _action=$3 # Normalize $_if before using it in a pattern to list_vars() - ltr "$_if" "$_punct" "_" _if + ltr "$_if" "$_punct" "_" _nif # ifconfig_IF_aliasN which starts with $_af - for alias in `list_vars ifconfig_${_if}_alias[0-9]\* | + for alias in `list_vars ifconfig_${_nif}_alias[0-9]\* | sort_lite -nk1.$((9+${#_if}+7))` do eval ifconfig_args=\"\$$alias\" -- You are receiving this mail because: You are the assignee for the bug.