Commit graph

2047 commits

Author SHA1 Message Date
Robin Sommer
d24cdd3ba3 Merge remote-tracking branch 'origin/master' into topic/robin/log-threads
Conflicts:
	src/LogMgr.h
	src/RemoteSerializer.cc
	src/logging/Manager.cc
	src/logging/writers/Ascii.cc
	src/net_util.cc
2012-02-27 19:05:47 -08:00
Robin Sommer
ada5f38d04 Merge branch 'master-merge-helper'
* master-merge-helper:
  possible use after free forbidden
  Suppression of unused code
  Fix of some memory leaks
  removing dead code
  A destructor must free the memory allocated by the constructor
  Good overridance with the good qualifier
  Better use of operators priorities
  protection from bad frees on unallocated strings
2012-02-24 16:37:45 -08:00
Robin Sommer
d2b2157454 Fixing merge relict. 2012-02-24 15:52:15 -08:00
Julien Sentier
900cc8f2ab possible use after free forbidden 2012-02-24 15:39:50 -08:00
Julien Sentier
d65b2f12c6 Suppression of unused code 2012-02-24 15:39:50 -08:00
Julien Sentier
2e069c9596 Fix of some memory leaks 2012-02-24 15:39:50 -08:00
Julien Sentier
a3e419fee0 removing dead code 2012-02-24 15:39:50 -08:00
Julien Sentier
1df650eb0d A destructor must free the memory allocated by the constructor 2012-02-24 15:39:49 -08:00
Julien Sentier
7dfb5657a2 Good overridance with the good qualifier 2012-02-24 15:39:49 -08:00
Julien Sentier
b84fd05912 Better use of operators priorities 2012-02-24 15:39:49 -08:00
Julien Sentier
c2ee15b09f protection from bad frees on unallocated strings 2012-02-24 15:39:49 -08:00
Robin Sommer
2eeac54857 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add to_subnet bif (fixes #782).
  Refactor IPAddr v4 initialization from string. (fixes #775)

Closes #782.
Closes #775.
Closes #784.
2012-02-24 15:26:18 -08:00
Robin Sommer
3323692771 Merge remote-tracking branch 'origin/topic/jsiwek/ipaddr-refactoring'
* origin/topic/jsiwek/ipaddr-refactoring:
  Refactoring various usages of new IPAddr class.

Conflicts:
	src/bro.bif

Closes #784.
2012-02-24 15:21:57 -08:00
Robin Sommer
33777f13c5 Merge branch 'master' of ssh://git.bro-ids.org/bro 2012-02-24 15:04:06 -08:00
Robin Sommer
4ef8607e60 Merge remote-tracking branch 'origin/topic/dnthayer/ftp-ipv6'
* origin/topic/dnthayer/ftp-ipv6:
  Add test case for FTP over IPv4
  Fix IPv6 URLs
  Add a test for FTP over IPv6
  Update FTP EPSV response processing for IPv6
  Fix parsing of FTP EPRT command and EPSV response

Conflicts:
	src/bro.bif

Closes #778.
2012-02-24 15:00:41 -08:00
Jon Siwek
b552979011 Raise minimum required CMake version to 2.6.3 2012-02-24 13:14:49 -06:00
Jon Siwek
32aabe8432 Add to_subnet bif (fixes #782).
Also fix IPAddr::Mask/ReverseMask not allowing argument of 0.

And clarified return value of to_addr bif when the input string
does not parse into a valid IP address.
2012-02-24 12:34:29 -06:00
Jon Siwek
c84394d07f Refactor IPAddr v4 initialization from string. (fixes #775)
Revived code from old dotted_to_addr function to parse the
dotted address string directly instead of canonicalizing and
passing to inet_pton.
2012-02-22 15:44:05 -06:00
Jon Siwek
d7dafe2fe2 Refactoring various usages of new IPAddr class.
Reducing number of places that internal representation was exposed
via GetBytes/CopyIPv6.

Also fixed a bug in remask_addr bif.
2012-02-22 14:45:44 -06:00
Robin Sommer
d887eb3178 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  GeoIP installation documentation update.
  Decrease strictness of parsing IPv4 strings into addrs. (fixes #775)
  Fix memory leak in DNS manager (fixes #777).

Closes #777.
2012-02-22 05:28:29 -08:00
Seth Hall
c0839cb945 GeoIP installation documentation update. 2012-02-21 16:13:08 -05:00
Daniel Thayer
96df1bac40 Add test case for FTP over IPv4 2012-02-21 11:18:43 -06:00
Jon Siwek
b66b74e5dc Decrease strictness of parsing IPv4 strings into addrs. (fixes #775)
IPv4 strings in dotted-decimal format with decimal parts containing
leading zeroes now parse better.
2012-02-20 14:28:42 -06:00
Jon Siwek
1f7bfbb83c Fix memory leak in DNS manager (fixes #777). 2012-02-20 11:56:21 -06:00
Robin Sommer
52cfec8830 Merge remote-tracking branch 'origin/topic/robin/v6-addr-merge' into topic/robin/v6-addr-merge 2012-02-17 18:40:38 -08:00
Robin Sommer
14cd6c155c Merge branch 'master' into topic/robin/v6-addr-merge 2012-02-17 17:48:07 -08:00
Robin Sommer
b3333a7da2 Reverting loopback change which doesn't seem to fully work. 2012-02-17 17:46:51 -08:00
Robin Sommer
0e3934b196 Updating NEWS. 2012-02-17 15:39:59 -08:00
Robin Sommer
7ab36dbf8f Updating NEWS. 2012-02-17 15:36:12 -08:00
Robin Sommer
1f0b88041a Changing ARP detection to always kick in even if no analyzer is
activated.

Without that, we get "unknown_protocol" weird for ARP, which doesn't
seem right.
2012-02-17 13:24:47 -08:00
Robin Sommer
be3fb5fb81 Merge remote-tracking branch 'origin/topic/jsiwek/v6-dns-name-lookup' into topic/robin/v6-addr-merge
* origin/topic/jsiwek/v6-dns-name-lookup:
  DNS name lookups performed by Bro now also query AAAA records.

Conflicts:
	src/DNS_Mgr.cc
2012-02-17 10:39:24 -08:00
Jon Siwek
06e59e1398 Fix IPAddr/IPPrefix serialization bugs. (all unit tests pass) 2012-02-17 12:01:00 -06:00
Jon Siwek
c227563baf Fix compile error. 2012-02-17 12:00:35 -06:00
Daniel Thayer
d61fad4f9e Fix IPv6 URLs 2012-02-17 10:55:17 -06:00
Robin Sommer
5565e19e57 Merge remote-tracking branch 'origin/topic/v6-addr' into topic/v6-addr-merge
Conflicts:
	src/DNS_Mgr.cc
	src/Expr.cc
	src/bro.bif
2012-02-16 20:50:46 -08:00
Robin Sommer
94b9644da7 Working on merging the v6-addr branch. This is checkpoint, tests don't
pass yet.

Changes:

- Gave IPAddress/IPPrefix methods AsString() so that one doesn't need
  to cast to get a string represenation.

- Val::AsAddr()/AsSubnet() return references rather than pointers. I
  find that more intuitive.

- ODesc/Serializer/SerializationFormat get methods to support
  IPAddress/IPPrefix directly.

- Reformatted the comments in IPAddr.h from /// to /** style.

- Given IPPrefix a Contains() method.

- A bit of cleanup.
2012-02-16 20:39:16 -08:00
Daniel Thayer
278704f7a3 Add a test for FTP over IPv6 2012-02-16 15:17:55 -06:00
Daniel Thayer
6d98008d07 Merge remote-tracking branch 'origin/topic/v6-addr' into topic/dnthayer/ftp-ipv6 2012-02-16 13:22:53 -06:00
Jon Siwek
93fa116738 Various tweaks/refactor of new IPAddr class usages or IPv6 related code.
- non-binpac DNS analyzer now also generates dns_a6_reply event
- ExpectedConn class refactored to use IPAddr's
- BinaryExpr::AddrFold simplified
- IP_Hdr src/dst address accessor methods changed to construct IPAddr
  objects on the fly from ip4/ip6 members.

Addresses #770.
2012-02-16 11:27:22 -06:00
Daniel Thayer
2f2509fdce Merge remote-tracking branch 'origin/topic/v6-addr' into topic/dnthayer/ftp-ipv6 2012-02-15 16:29:31 -06:00
Robin Sommer
7458ebf385 Checkpoint after pass. 2012-02-15 13:07:08 -08:00
Jon Siwek
2ef18e98a2 DNS name lookups performed by Bro now also query AAAA records.
DNS_Mgr handles combining the results of the A and AAAA queries
for a given hostname such that at the scripting layer, the name
resolution can yield a set with both IPv4 and IPv6 addresses.
2012-02-15 11:02:18 -06:00
Robin Sommer
1f8b299aaf Shortening file names a bit. 2012-02-14 10:12:09 -08:00
Robin Sommer
e2794c809f Merge remote-tracking branch 'origin/topic/bernhard/log-threads' into topic/robin/log-threads
* origin/topic/bernhard/log-threads:
  typo
  fix CreateBackend function - the way that the right backend was chosen & backends were initialized did not make sense...
  backend does not need friend access to manager
  move Value and Field from the logging namespace to the threading namespace, because other modules using threading will need them.
  send enum instead of string
  memleak fix.
  make logging framework send the protocol to the writer.
2012-02-14 10:08:46 -08:00
Jon Siwek
808f3915e5 Merge branch 'master' into topic/v6-addr 2012-02-13 16:01:33 -06:00
Jon Siwek
0f207c243c Port DNS_Mgr to use new IPAddr class, enable lookups on IPv6 addrs.
Host lookups still need to be changed to also do AAAA queries.
2012-02-13 15:57:59 -06:00
Daniel Thayer
c87f82c492 Merge remote-tracking branch 'origin/topic/v6-addr' into topic/dnthayer/ftp-ipv6 2012-02-13 15:39:01 -06:00
Bernhard Amann
1e4a93c767 Merge remote-tracking branch 'origin/topic/bernhard/log-threads' into topic/bernhard/log-threads 2012-02-13 02:35:10 -08:00
Bernhard Amann
8a6dfee00c Merge remote-tracking branch 'origin/topic/robin/log-threads' into topic/bernhard/log-threads 2012-02-13 02:30:24 -08:00
Robin Sommer
7fcb7b5f17 Save CPU when idle.
This needs a bit more testing. It may also with the general problem of
high CPU usage with low traffic.
2012-02-12 13:08:45 -08:00