diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-02-06 16:08:45 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-02-06 16:08:45 +0100 |
commit | 28b3b551222ab58456a067a9be4790824cdbb60e (patch) | |
tree | c0ed7fa2a8aa7a221ee91b610a3d08a6f51663cc /sysdep | |
parent | 85ad5855a02e8b185a61bbcb601f005d2e6747db (diff) |
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
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/krt.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 |