Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream.inline: add 'auto' mode #152

Closed
wants to merge 1 commit into from

Conversation

regit
Copy link
Contributor

@regit regit commented Oct 30, 2012

stream.inline YAML configuration variable now support the 'auto' value.
In this case, inline mode is activated for IPS running mode (NFQ and
IPFW) and is deactivated for IDS mode. This patch should fix bug #592.

stream.inline YAML configuration variable now support the 'auto' value.
In this case, inline mode is activated for IPS running mode (NFQ and
IPFW) and is deactivated for IDS mode. This patch should fix bug OISF#592.
if (ConfGet("stream.inline", &temp_stream_inline_str) == 1) {
/* checking for "auto" and falling back to boolean to provide
* backward compatibility */
if (!strncmp(temp_stream_inline_str, "auto", strlen("auto"))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the !strcmp notation, I always read it as "not equal", while it means the opposite. Thats why I always use explicit == 0. Also, why the strNcmp? ConfGet returns a normal string, so a regular strcmp is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, it makes sense. I was not trusting the user received string. But control may have been made previously.

@regit regit closed this Oct 30, 2012
@regit regit deleted the bug592-stream-inline-auto branch December 16, 2013 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants