summaryrefslogtreecommitdiff
path: root/sysdep/linux/netlink
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-09-08 13:45:02 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-09-08 13:45:02 +0200
commitbe862406627da3bd1facea9309b3f32e67422eab (patch)
treea1463c4feca6145d4a2e36b39c893a7253316b73 /sysdep/linux/netlink
parentf9c799a00e705b1420b214628c2bb2a30bf491d9 (diff)
Temporary OSPFv3 development commit.
Finally, it is working.
Diffstat (limited to 'sysdep/linux/netlink')
-rw-r--r--sysdep/linux/netlink/netlink.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c
index b7fd479b..0f7b7070 100644
--- a/sysdep/linux/netlink/netlink.c
+++ b/sysdep/linux/netlink/netlink.c
@@ -472,6 +472,9 @@ krt_capable(rte *e)
switch (a->dest)
{
case RTD_ROUTER:
+ if (ipa_has_link_scope(a->gw) && (a->iface == NULL))
+ return 0;
+
case RTD_DEVICE:
case RTD_BLACKHOLE:
case RTD_UNREACHABLE:
@@ -514,6 +517,11 @@ nl_send_route(struct krt_proto *p, rte *e, int new)
case RTD_ROUTER:
r.r.rtm_type = RTN_UNICAST;
nl_add_attr_ipa(&r.h, sizeof(r), RTA_GATEWAY, a->gw);
+
+ /* a->iface != NULL checked in krt_capable() */
+ if (ipa_has_link_scope(a->gw))
+ nl_add_attr_u32(&r.h, sizeof(r), RTA_OIF, a->iface->index);
+
break;
case RTD_DEVICE:
if (!a->iface)