Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
input framework does not raise Input::end_of_data and other events after 1st "Bad address:" errors #692
I am writing a script to update zeek's local nets without restarting the program, using the input framework to load a file containing the local nets. It is also important that if something is wrong in this file, for example a bad ip address or a typo etc., this is handled gracefully, i.e. the error is reported and if the file is corrected this will be updated with the latest version.
A preliminary script I wrote is here:
The networks.cfg file in it, contains a bad ip. The first time, everything goes as expected, i.e. I get a
Bad address: 1cfehjb00.0.0
error from the read_error event. If I subsequently correct the file with a correct ip, however, the events read_error and Input::end_of_data are not raised anymore. I expected such events to be raised for any further updates of this file, as it happens for other kind of errors.
I believe this happens somehow because the above error is detected in