summaryrefslogtreecommitdiffstats
path: root/sysdep/linux
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2003-02-23 00:06:32 +0100
committerMartin Mares <mj@ucw.cz>2003-02-23 00:06:32 +0100
commitabf06173a3d84559dd26d2a78a1e5df9656a4d80 (patch)
treea2c84beb9d4a2ea717c9fdaf89d08a748d70c4b6 /sysdep/linux
parent11d4474c17e76e9811dcb32f555fa1c6f3684fab (diff)
downloadbird-abf06173a3d84559dd26d2a78a1e5df9656a4d80.tar
bird-abf06173a3d84559dd26d2a78a1e5df9656a4d80.zip
Current Linux kernels don't remember rtm_protocol for IPv6 routes and supply RTPROT_BOOT instead.
Work around that.
Diffstat (limited to 'sysdep/linux')
-rw-r--r--sysdep/linux/netlink/netlink.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c
index 146148a..c911642 100644
--- a/sysdep/linux/netlink/netlink.c
+++ b/sysdep/linux/netlink/netlink.c
@@ -625,7 +625,7 @@ nl_parse_route(struct nlmsghdr *h, int scan)
else
oif = ~0;
- DBG("Got %I/%d, type=%d, oif=%d, table=%d, proto=%s\n", dst, i->rtm_dst_len, i->rtm_type, oif, i->rtm_table, p->p.name);
+ DBG("Got %I/%d, type=%d, oif=%d, table=%d, prid=%d, proto=%s\n", dst, i->rtm_dst_len, i->rtm_type, oif, i->rtm_table, i->rtm_protocol, p->p.name);
switch (i->rtm_protocol)
{
@@ -636,6 +636,10 @@ nl_parse_route(struct nlmsghdr *h, int scan)
DBG("Route originated in kernel, ignoring\n");
return;
case RTPROT_BIRD:
+#ifdef IPV6
+ case RTPROT_BOOT:
+ /* Current Linux kernels don't remember rtm_protocol for IPv6 routes and supply RTPROT_BOOT instead */
+#endif
if (!scan)
{
DBG("Echo of our own route, ignoring\n");
@@ -887,6 +891,8 @@ krt_scan_construct(struct krt_config *x)
{
#ifndef IPV6
x->scan.table_id = RT_TABLE_MAIN;
+#else
+ x->scan.table_id = 254;
#endif
}