On Wed, May 15, 2019 at 09:09:34AM +0000, Adrichem, N.L.M. (Niels) van wrote:
> Hello,
>
> Additionally, the bird.log file throws the following error:
> 2019-05-15 10:27:21.869 <INFO> Started
> 2019-05-15 10:27:21.902 <WARN> Missing broadcast address for interface vxlan0
> 2019-05-15 10:27:29.329 <ERR> KRT: Received route 10.0.1.3/32 with strange 
> next-hop 10.0.1.4
> 

> It may be that kernel protocol rejects the route because the next-hop
> is not in the interface its regular netmask (which is set to /32), though
> I am not familiar enough with the source code to determine the exact
> cause except that the error gets thrown from sysdep/linux/netlink.c line
> 1643. However, I think the line should be accepted since there is another
> routing rule confirming that the next-hop is directly attached to device
> eth1. Given the explicit error I don't think this is a configuration
> error (though I am open to learn more), so I hope BIRD can be patched to
> solve this.

Hello

BIRD generally expects that next hop is resolvable through an address range
associated with interfaces, not just through another direct/device route.

This is limitation compared to the Linux kernel which allows next hop
resolvable through another direct/device route (but not through another
regular route with next-hop).

We have some plans to redesign it in a more generic manner, but it is not
a simple fix. As a workaround, attached patch (untested) should disable
next hop checking for all alien routes.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index d773743d..d5d64b6b 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -1632,7 +1632,7 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
 	  if ((i->rtm_family == AF_INET6) && ipa_in_netX(ra->nh.gw, (net_addr *) &sit))
 	    return;
 
-	  if (i->rtm_flags & RTNH_F_ONLINK)
+	  if ((i->rtm_flags & RTNH_F_ONLINK) || (krt_src == KRT_SRC_ALIEN))
 	    ra->nh.flags |= RNF_ONLINK;
 
 	  neighbor *nbr;

Reply via email to