[Bro] OpenBSD bro-1.1

Stephan Stephan at rheoli.net
Tue May 23 01:27:19 PDT 2006


On Mon, May 22, 2006 at 04:13:05PM +0100, Christian Kreibich wrote:
> On Mon, 2006-05-22 at 00:24 -0700, Lee Sheng wrote:
> > Hi all,
> > 
> > I previously run bro 0.9 on OpenBSD, everything is compiled correctly,
> > however when I compile 1.1, I get this error
> 
> Hi Lee,
> 
> I can confirm this. Arrrrrrrgh OpenBSD. The ARP issue is just a matter
> of figuring out the right headers, but there are more issues later in
> the build. We'll let get back to you.
> 
> Cheers,
> Christian.
> -- 

After patching the src/ files with the attached diff's bro-1.1 compiles
fine on OpenBSD-sparc64 but as soon as I'm starting bro with
# bin/bro -i ... mt
the following error occures:
"""
policy/hot.bro, line 78: error: unknown identifier is_local_addr, at or near "is_local_addr"
"""
-> site.bro is @load'ed.

-Stephan


P.S.:
More or less the sames patches are needed for my Solaris 8 but after the
compilation bro core dump during startup.
-------------- next part --------------
--- ARP.h.orig	Mon May 22 16:48:23 2006
+++ ARP.h	Mon May 22 17:00:41 2006
@@ -25,7 +25,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <net/if_arp.h>
-#include <net/ethernet.h>
+#include <net/ethertypes.h>
 
 #ifndef arp_pkthdr
 #define arp_pkthdr arphdr
-------------- next part --------------
--- DNS_Mgr.cc.orig	Tue May 23 10:02:50 2006
+++ DNS_Mgr.cc	Tue May 23 10:04:29 2006
@@ -930,7 +930,11 @@
 
 void  DNS_Mgr::GetFds(int* read, int* write, int* except)
 	{
+#ifdef HAVE_NB_DNS
 	*read = nb_dns_fd(nb_dns);
+#else
+	*read = -1;
+#endif
 	}
 
 double DNS_Mgr::NextTimestamp()
@@ -1004,7 +1008,11 @@
 
 int DNS_Mgr::AnswerAvailable(int timeout)
 	{
+#ifdef HAVE_NB_DNS
 	int fd = nb_dns_fd(nb_dns);
+#else
+	int fd = -1;
+#endif
 	if ( fd < 0 )
 		internal_error("nb_dns_fd() failed in DNS_Mgr::WaitForReplies");
 
-------------- next part --------------
--- TCP_Rewriter.cc.orig	Tue May 23 09:34:54 2006
+++ TCP_Rewriter.cc	Tue May 23 09:36:13 2006
@@ -50,9 +50,9 @@
 static IP_IDSet* ip_id_set = 0;	// <IP, IP-ID> pairs in the output trace
 int num_packets_held, num_packets_cleaned;
 
-static struct timeval double_to_timeval(double t)
+static struct bpf_timeval double_to_timeval(double t)
 	{
-	struct timeval tv;
+	struct bpf_timeval tv;
 
 	double t1 = floor(t);
 	tv.tv_sec = int(t1);


More information about the Bro mailing list