summaryrefslogtreecommitdiffstats
path: root/sysdep/linux
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-04 20:00:31 +0100
committerMartin Mares <mj@ucw.cz>1999-03-04 20:00:31 +0100
commit111213f0b66cff8f562f7d9117c9080a9882129e (patch)
tree9f4f8057d91364cea141bf325b526e102ab8364e /sysdep/linux
parente16155ae4aaee5d9ba7b6940f8312b36707718e4 (diff)
downloadbird-111213f0b66cff8f562f7d9117c9080a9882129e.tar
bird-111213f0b66cff8f562f7d9117c9080a9882129e.zip
Fixed processing of !krt_capable() routes. Converted device route decisions
to the krt_capable mechanism as well.
Diffstat (limited to 'sysdep/linux')
-rw-r--r--sysdep/linux/netlink/netlink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c
index 64e3aa2..4aadc85 100644
--- a/sysdep/linux/netlink/netlink.c
+++ b/sysdep/linux/netlink/netlink.c
@@ -430,6 +430,8 @@ krt_capable(rte *e)
if (a->cast != RTC_UNICAST) /* FIXME: For IPv6, we might support anycasts as well */
return 0;
+ if (a->source == RTS_DEVICE) /* Kernel takes care of device routes itself */
+ return 0;
switch (a->dest)
{
case RTD_ROUTER:
@@ -501,9 +503,9 @@ nl_send_route(rte *e, int new)
void
krt_set_notify(struct proto *p, net *n, rte *new, rte *old)
{
- if (old && old->attrs->source == RTS_DEVICE) /* Device routes are left to the kernel */
+ if (old && !krt_capable(old))
old = NULL;
- if (new && new->attrs->source == RTS_DEVICE)
+ if (new && !krt_capable(new))
new = NULL;
if (old && new && old->attrs->tos == new->attrs->tos)
{