Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: /
Date: Fri, 02 Mar 2012 19:55:12
Message-Id: 1330717869.0dc9431bdb989231cfa20560d69aebebd487a926.robbat2@gentoo
1 commit: 0dc9431bdb989231cfa20560d69aebebd487a926
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 2 19:51:09 2012 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 2 19:51:09 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=0dc9431b
7
8 Add a potential future problem I can see with metric calculation and interfaces that change often.
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 ---
13 TODO | 14 ++++++++++++++
14 1 files changed, 14 insertions(+), 0 deletions(-)
15
16 diff --git a/TODO b/TODO
17 index cd9ac0c..ccc074b 100644
18 --- a/TODO
19 +++ b/TODO
20 @@ -5,3 +5,17 @@
21 - oldnet[bridging]: Review setting of bridge configuration on dynamic interface add
22
23 - Document rc-depend binary.
24 +
25 +- _ifindex is not a reliable means of calculating metrics:
26 + _ifindex is used for calculating metrics for new devices but has a major
27 + problem: Since it's only the nth entry in /proc/net/dev
28 + And devices may be removed from that file, and reordered, you won't always
29 + get the same result.
30 + If you do:
31 + - add eth0 - _ifindex (eth0=0)
32 + - add vlan1 - _ifindex (eth0=0,vlan1=1)
33 + - add vlan2 - _ifindex (eth0=0,vlan1=1,vlan2=2)
34 + - rem vlan1 - _ifindex (eth0=0,vlan2=1)
35 + - add vlan3 - _ifindex (eth0=0,vlan2=1,vlan3=2)
36 + Now your routing table has entries for both vlan2 and vlan3 with a metric of 2.
37 +