From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S3YZM-0002wn-D5 for garchives@archives.gentoo.org; Fri, 02 Mar 2012 19:55:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A18AEE08E8; Fri, 2 Mar 2012 19:55:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 70F48E08E0 for ; Fri, 2 Mar 2012 19:55:05 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6E251B4004 for ; Fri, 2 Mar 2012 19:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 82E25E542A for ; Fri, 2 Mar 2012 19:55:03 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1330717869.0dc9431bdb989231cfa20560d69aebebd487a926.robbat2@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: / X-VCS-Repository: proj/openrc X-VCS-Files: TODO X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 0dc9431bdb989231cfa20560d69aebebd487a926 X-VCS-Branch: master Date: Fri, 2 Mar 2012 19:55:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 18093006-766f-4ba6-9523-19a2dbc60890 X-Archives-Hash: 30ee02ddd62301ec3024e09f0ddc3227 commit: 0dc9431bdb989231cfa20560d69aebebd487a926 Author: Robin H. Johnson gentoo org> AuthorDate: Fri Mar 2 19:51:09 2012 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Fri Mar 2 19:51:09 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D0dc9431b Add a potential future problem I can see with metric calculation and inte= rfaces that change often. Signed-off-by: Robin H. Johnson gentoo.org> --- TODO | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/TODO b/TODO index cd9ac0c..ccc074b 100644 --- a/TODO +++ b/TODO @@ -5,3 +5,17 @@ - oldnet[bridging]: Review setting of bridge configuration on dynamic in= terface add =20 - Document rc-depend binary. + +- _ifindex is not a reliable means of calculating metrics: + _ifindex is used for calculating metrics for new devices but has a majo= r + problem: Since it's only the nth entry in /proc/net/dev + And devices may be removed from that file, and reordered, you won't alw= ays + get the same result. + If you do: + - add eth0 - _ifindex (eth0=3D0) + - add vlan1 - _ifindex (eth0=3D0,vlan1=3D1) + - add vlan2 - _ifindex (eth0=3D0,vlan1=3D1,vlan2=3D2) + - rem vlan1 - _ifindex (eth0=3D0,vlan2=3D1) + - add vlan3 - _ifindex (eth0=3D0,vlan2=3D1,vlan3=3D2) + Now your routing table has entries for both vlan2 and vlan3 with a metr= ic of 2. +