summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/bsd/krt-sock.c6
-rw-r--r--sysdep/unix/krt.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index c65cba65..d353d629 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -146,8 +146,9 @@ krt_capable(rte *e)
{
rta *a = e->attrs;
+ /* XXXX device routes are broken */
return
- ((a->dest == RTD_UNICAST && !a->nh.next) /* No multipath support */
+ ((a->dest == RTD_UNICAST && ipa_nonzero(a->nh.gw) && !a->nh.next) /* No multipath support */
#ifdef RTF_REJECT
|| a->dest == RTD_UNREACHABLE
#endif
@@ -254,7 +255,7 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e)
af = AF_INET6;
break;
default:
- log(L_ERR "KRT: Not sending VPN route %N to kernel", net->n.addr);
+ log(L_ERR "KRT: Not sending route %N to kernel", net->n.addr);
return -1;
}
@@ -299,6 +300,7 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e)
sockaddr_fill(&gate, ipa_is_ip4(i->addr->ip) ? AF_INET : AF_INET6, i->addr->ip, NULL, 0);
msg.rtm.rtm_addrs |= RTA_GATEWAY;
+ break;
}
default:
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index c6ff6275..a1b10cea 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -1142,7 +1142,9 @@ krt_start(struct proto *P)
{
case NET_IP4: p->af = AF_INET; break;
case NET_IP6: p->af = AF_INET6; break;
+#ifdef AF_MPLS
case NET_MPLS: p->af = AF_MPLS; break;
+#endif
default: log(L_ERR "KRT: Tried to start with strange net type: %d", p->p.net_type); return PS_START; break;
}