]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BSD: Fix build on NetBSD
authorOndrej Zajicek <santiago@crfreenet.org>
Fri, 25 Apr 2025 16:29:28 +0000 (18:29 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Fri, 25 Apr 2025 16:29:28 +0000 (18:29 +0200)
Newer NetBSD versions removed RTF_LLINFO and added RTF_LLDATA.
In FreeBSD, RTF_LLINFO is obsolete, but still defined.

sysdep/bsd/krt-sock.c

index e8e555af7cb6171ad1c4161bfc460a408511c09a..d9ec32181058a52f52755896c59a802f63487a2e 100644 (file)
@@ -421,8 +421,17 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan)
   if (!(flags & RTF_DONE) && !scan)
     SKIP("not done in async\n");
 
+#ifdef RTF_LLINFO
+  /* Obsolete in FreeBSD and NetBSD, still used in OpenBSD */
   if (flags & RTF_LLINFO)
     SKIP("link-local\n");
+#endif
+
+#ifdef RTF_LLDATA
+  /* Reported by NetBSD */
+  if (flags & RTF_LLDATA)
+    SKIP("link-local\n");
+#endif
 
   GETADDR(&dst, RTA_DST);
   GETADDR(&gate, RTA_GATEWAY);