Fixing crash with unknown debug streams.

Closes #643.
This commit is contained in:
Robin Sommer 2011-10-21 10:39:09 -07:00
parent c8dfdb4492
commit 5e5e29f345
4 changed files with 60 additions and 5 deletions

51
CHANGES
View file

@ -1,4 +1,55 @@
1.6-dev-1430 | 2011-10-21 10:39:09 -0700
* Fixing crash with unknown debug streams. Closes #643. (Robin
Sommer)
* Code to better handle interpreter errors, which can now be turned
into non-fatal runtime errors rather than immediate aborts. (Robin
Sommer).
* Remove old make-src-packages script. (Jon Siwek)
* Fixing a bunch of format strings. Closes #567. (Robin Sommer)
* Cleaning up some distribution files. (Robin Sommer)
* Various test, doc, and installation fixes/tweaks. (Seth Hall, Jon
Siwek and Robin Sommer).
* Varios smaller policy fixes and tweaks (Seth Hall).
* Moving docs from web server into distribution. (Robin Sommer)
* Fixing more (small) memory leaks. (Robin Sommer)
* Profiling support for DNS_Mgr and triggers. With
misc/profiling.bro, both now report a line in prof.log with some
counters on usage. (Robin Sommer)
* Fixing DNS memory leaks. Closes #534. (Robin Sommer)
* Fix code for disabling analyzers. Closes #577. (Robin Sommer)
* Changed communication option from listen_encrypted to listen_ssl.
(Seth Hall)
* Modification to the Communication framework API. (Seth Hall)
- Simplified the communication API and made it easier to change
to encrypted connections by not having separate variables to
define encrypted and unencrypted ports.
- Now, to enable listening without configuring nodes just
load the frameworks/communication/listen script.
- If encrypted listening is desired set the following:
redef Communication::listen_encrypted=T;
* Connection compressor now disabled by default. Addresses #559.
(Robin Sommer)
1.6-dev-1372 | 2011-10-06 18:09:17 -0700 1.6-dev-1372 | 2011-10-06 18:09:17 -0700
* Filtering some potentially high-volume DNS weirds. (Robin Sommer) * Filtering some potentially high-volume DNS weirds. (Robin Sommer)

View file

@ -1 +1 @@
1.6-dev-1372 1.6-dev-1430

View file

@ -72,7 +72,7 @@ void DebugLogger::EnableStreams(const char* s)
if ( strcasecmp("verbose", tok) == 0 ) if ( strcasecmp("verbose", tok) == 0 )
verbose = true; verbose = true;
else else
reporter->InternalError("unknown debug stream %s\n", tok); reporter->FatalError("unknown debug stream %s\n", tok);
} }
tok = strtok(0, ","); tok = strtok(0, ",");

View file

@ -352,6 +352,7 @@ int main(int argc, char** argv)
char* seed_load_file = getenv("BRO_SEED_FILE"); char* seed_load_file = getenv("BRO_SEED_FILE");
char* seed_save_file = 0; char* seed_save_file = 0;
char* user_pcap_filter = 0; char* user_pcap_filter = 0;
char* debug_streams = 0;
int bare_mode = false; int bare_mode = false;
int seed = 0; int seed = 0;
int dump_cfg = false; int dump_cfg = false;
@ -638,9 +639,7 @@ int main(int argc, char** argv)
#endif #endif
case 'B': case 'B':
#ifdef DEBUG debug_streams = optarg;
debug_logger.EnableStreams(optarg);
#endif
break; break;
case 0: case 0:
@ -660,6 +659,11 @@ int main(int argc, char** argv)
bro_start_time = current_time(true); bro_start_time = current_time(true);
reporter = new Reporter(); reporter = new Reporter();
#ifdef DEBUG
if ( debug_streams )
debug_logger.EnableStreams(debug_streams);
#endif
init_random_seed(seed, (seed_load_file && *seed_load_file ? seed_load_file : 0) , seed_save_file); init_random_seed(seed, (seed_load_file && *seed_load_file ? seed_load_file : 0) , seed_save_file);
// DEBUG_MSG("HMAC key: %s\n", md5_digest_print(shared_hmac_md5_key)); // DEBUG_MSG("HMAC key: %s\n", md5_digest_print(shared_hmac_md5_key));
init_hash_function(); init_hash_function();