Commit graph

9 commits

Author SHA1 Message Date
Jon Siwek
2f33245b35 GH-205: prioritize use of sigaction() over sigset() 2019-01-14 16:12:38 -06:00
Jonathan Perkins
1ae7d3b349 Replace GeoIP Legacy DB support with MaxMind DB support
This updates the "lookup_location" and "lookup_asn" BIFs to use
libmaxminddb.  The motivation for this is that MaxMind is discontinuing
GeoLite Legacy databases: no updates after April 1, 2018, no downloads
after January 2, 2019.  It's also noted that all GeoIP Legacy databases
may be discontinued as they are superseded by GeoIP2.
2018-07-30 16:04:58 -05:00
Johanna Amann
5d5dd65cab Merge branch 'krb_changes2' of https://github.com/jwallior/bro
I did some cleanup work.
2018-06-01 12:28:45 -07:00
Robin Sommer
8ae30d8aac Extend plugin infrastructure to catch Bro version mismatches at link
time.

People keep running into the problem that they upgrade Bro but forget
to recompile their plugins--which can lead to crashes. While the
plugins' API version was supposed to catch this, it's not reliable as
that check may come too late. This change takes a different tack: We
compile a C function into the Bro binary that has Bro's version number
encoded into its name. A plugin can then reference that function. If
the Bro version changes, the function goes away and the plugin won't
load anymore.

I've integrated that function reference into the plugin skeleton code
so that new plugins get it automatically (unless explicitly removed).
I couldn't see a way to do it transparently for already existing
plugins unfortunately.

The version number used for the function name is slightly normalized
to skip any git revision postfixes (i.e., "2.5-xxx" is always treated
as "2.5-git") so that one doesn't need to recompile all plugins after
every master commit. That seems good enough, usually people run into
this when upgrading to a new release.

If one loads an old plugin into a new Bro, the error message looks
like this:

    $ bro -NN Demo::Foo
    fatal error in /home/robin/bro/master/scripts/base/init-bare.bro, line 1:
    cannot load plugin library /home/robin/tmp/p/build//lib/Demo-Foo.linux-x86_64.so:
    /home/robin/tmp/p/build//lib/Demo-Foo.linux-x86_64.so: undefined symbol: bro_version_2_5_git_debug

Not the prettiest, but better than a crash!

TODO: I'm still unsure if we should remove the plugin API version
altogetger now. This link-time check should catch everything the API
version does, except for master commits.
2017-07-07 15:58:05 -07:00
Johanna Amann
607b51f3b2 Unbreak header issue on Linux again 2016-06-02 17:05:42 -07:00
Seth Hall
88517230b6 Fix memory usage collection on Mac OS X.
- getrusage is broken on Mac OS X, but there is a Mach
   API available which can collect the same memory
   usage information.
2016-01-04 00:57:11 -05:00
Robin Sommer
a6b884e764 Removing pcap options for AF_PACKET support.
Turns out that's not working. Addresses BIT-1363.
2015-10-23 15:06:02 -07:00
Kris Nielander
d8c9b7255e Allow Bro to run in fanout mode. 2015-08-09 22:45:23 +02:00
Robin Sommer
907b58dc38 Adding missing file. 2015-07-28 15:02:19 -07:00