aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-03-02 19:51:09 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-03-02 19:51:09 +0000
commit0dc9431bdb989231cfa20560d69aebebd487a926 (patch)
treee50e46bd0e88f74fd03e586f23307afc7b4b25ae
parent0fa164dff25969dd56a868446e0644396b2587dc (diff)
Add a potential future problem I can see with metric calculation and interfaces that change often.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--TODO14
1 files changed, 14 insertions, 0 deletions
diff --git a/TODO b/TODO
index cd9ac0c5..ccc074b4 100644
--- a/TODO
+++ b/TODO
@@ -5,3 +5,17 @@
- oldnet[bridging]: Review setting of bridge configuration on dynamic interface add
- 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 major
+ 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 always
+ get the same result.
+ If you do:
+ - add eth0 - _ifindex (eth0=0)
+ - add vlan1 - _ifindex (eth0=0,vlan1=1)
+ - add vlan2 - _ifindex (eth0=0,vlan1=1,vlan2=2)
+ - rem vlan1 - _ifindex (eth0=0,vlan2=1)
+ - add vlan3 - _ifindex (eth0=0,vlan2=1,vlan3=2)
+ Now your routing table has entries for both vlan2 and vlan3 with a metric of 2.
+