From be862406627da3bd1facea9309b3f32e67422eab Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 8 Sep 2009 13:45:02 +0200 Subject: Temporary OSPFv3 development commit. Finally, it is working. --- sysdep/linux/netlink/netlink.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sysdep/linux') diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index b7fd479..0f7b707 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) -- cgit v1.2.3