f4ce573be1f24215ddd8b249b3fee50d78a7b852
[feed/routing.git] / bird2 / patches / 0003-babel-Fix-type-of-route-entry-router-ID.patch
1 From 40e7bd0e39849a03bd3f6f44d6719a5f8b1dd291 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
3 Date: Mon, 30 Apr 2018 16:29:20 +0200
4 Subject: [PATCH] babel: Fix type of route entry router ID
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 The router ID being assigned to routes was a uint, which discards the upper
10 32 bits. This also has the nice side effect of echoing the wrong router ID
11 back to other routers.
12
13 Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
14 ---
15 proto/babel/babel.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 diff --git a/proto/babel/babel.c b/proto/babel/babel.c
19 index 4fd88042..a8eb5ea8 100644
20 --- a/proto/babel/babel.c
21 +++ b/proto/babel/babel.c
22 @@ -2140,7 +2140,7 @@ babel_rt_notify(struct proto *P, struct channel *c UNUSED, struct network *net,
23 uint internal = (new->attrs->src->proto == P);
24 uint rt_seqno = internal ? new->u.babel.seqno : p->update_seqno;
25 uint rt_metric = ea_get_int(attrs, EA_BABEL_METRIC, 0);
26 - uint rt_router_id = internal ? new->u.babel.router_id : p->router_id;
27 + u64 rt_router_id = internal ? new->u.babel.router_id : p->router_id;
28
29 if (rt_metric > BABEL_INFINITY)
30 {
31 --
32 2.17.0
33