From 28b3b551222ab58456a067a9be4790824cdbb60e Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 6 Feb 2018 16:08:45 +0100 Subject: KRT: Fix IPv6 route learn Internal table used for route learn was created with non-matching net type for IPv6 kernel proto. Thanks to Toke Hoiland-Jorgensen for the bugreport --- sysdep/unix/krt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sysdep') diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index e7bd79e3..a3cbb336 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -506,7 +506,13 @@ static void krt_learn_init(struct krt_proto *p) { if (KRT_CF->learn) - rt_setup(p->p.pool, &p->krt_table, "Inherited", NULL); + { + struct rtable_config *cf = mb_allocz(p->p.pool, sizeof(struct rtable_config)); + cf->name = "Inherited"; + cf->addr_type = p->p.net_type; + + rt_setup(p->p.pool, &p->krt_table, cf); + } } static void -- cgit v1.2.3