summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-03-23 18:25:15 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-04-06 11:46:25 +0200
commite86cfd41d975122cc944db68383aef4028da9575 (patch)
tree55da71e1a9132480391fc5b7045dec8228a214d2 /nest/route.h
parentea0a8be2ff5afb8385a69cc0df70984e0fd3a570 (diff)
KRT: Fix route learn scan when route changed
When a kernel route changed, function krt_learn_scan() noticed that and replaced the route in internal kernel FIB, but after that, function krt_learn_prune() failed to propagate the new route to the nest, because it confused the new route with the (removed) old best route and decided that the best route did not changed. Wow, the original code (and the bug) is almost 17 years old.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h
index c435b9e0..9368808f 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -223,8 +223,8 @@ typedef struct rte {
struct { /* Routes generated by krt sync (both temporary and inherited ones) */
s8 src; /* Alleged route source (see krt.h) */
u8 proto; /* Kernel source protocol ID */
- u8 type; /* Kernel route type */
u8 seen; /* Seen during last scan */
+ u8 best; /* Best route in network, propagated to core */
u32 metric; /* Kernel metric */
} krt;
} u;