Hi Kees and Ondrej,

thanks a lot for your answers and your suggestions.

I am rather new to the bird codebase and please forgive me if I make a blunder, but from my point of view openvpn should not be blamed here.

I dug a bit into the code and ospf_rx_hook() got all needed packages. They were just silently filtered. I used the version in Debian Buster (1.6.6) and Unstable (1.6.8) and after adding the patch below, I got an adjacent neighbor over the openvpn link in state "Full/PtP" and in a different area one with "Full/BDR". Probably I broke something else ...

Best regards
Thorsten




Index: bird-1.6.6/proto/ospf/packet.c
===================================================================
--- bird-1.6.6.orig/proto/ospf/packet.c
+++ bird-1.6.6/proto/ospf/packet.c
@@ -230,10 +230,11 @@ ospf_rx_hook(sock *sk, uint len)
   if (ifa->state <= OSPF_IS_LOOP)
     return 1;

-  int src_local, dst_local, dst_mcast;
+  int src_local, dst_local, dst_mcast, link;
   src_local = ipa_in_net(sk->faddr, ifa->addr->prefix, ifa->addr->pxlen);
   dst_local = ipa_equal(sk->laddr, ifa->addr->ip);
dst_mcast = ipa_equal(sk->laddr, ifa->all_routers) || ipa_equal(sk->laddr, ifa->des_routers);
+  link = (ifa->addr->pxlen == MAX_PREFIX_LENGTH);

   if (ospf_is_v2(p))
   {
@@ -243,7 +244,7 @@ ospf_rx_hook(sock *sk, uint len)
      * that (src_local || dst_local), therefore we are eliminating all
      * such cases.
      */
-    if (dst_mcast && !src_local)
+    if (!dst_mcast && !src_local && !link)
       return 1;
     if (!dst_mcast && !dst_local)
       return 1;
@@ -322,10 +322,6 @@ ospf_rx_hook(sock *sk, uint len)
     if (instance_id != ifa->instance_id)
       return 1;

-    /* It is real iface, source should be local (in OSPFv2) */
-    if (ospf_is_v2(p) && !src_local)
-      DROP1("strange source address");
-
     goto found;
   }
   else if ((areaid == 0) && !dst_mcast)




Reply via email to