Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix parsing of interface options with _ (#4334) #4378
Sorry heading out for tonight but wanted to share my findings in regard to issue #4334.
Hmm, yeah, looks like this broke with #2928. :(
@zecke Thanks a lot for finding & fixing this. Can you add
Our system tests didn't catch these because they always work on reading from files, rather than opening an interface.
@tsg Shouldn't bpf_filter work for reading from files too? I have not looked at the test setup but setting a filter that should only match a subset of the packets in a file and verifying the number of imported packets should be doable?
I annotated the struct (and aligned the tags to match the longest one). I have left the last options out as they are not documented in the reference file and I didn't know what is being used (top_speed, topspeed, topSpeed)
@zecke Currently it's not applied on reading from file. We could implement it, but then it would probably be a different setting, because this one applies to "interfaces"?
I'm going to merge it for now like this and improve on the system tests if something like this ever surfaces again. I'll add the Changelog while backporting, thanks a lot for the fix!
May 29, 2017
5 checks passed
referenced this pull request
May 29, 2017
@tsg "interfaces": True, let's not do that then.
In zecke@73e275d I created a new interface (to allow easy porting of the existing beats?!) and played a bit with printing a yaml representation of what has been parsed. It prints something like this...
I think in general it is a nice addition:
What do you think?