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

Ips bpf #333

Closed
wants to merge 2 commits into from
Closed

Ips bpf #333

wants to merge 2 commits into from

Conversation

regit
Copy link
Contributor

@regit regit commented Mar 26, 2013

This small patchset adds warning or cause error when BPF is used in IPS mode.

This patch add a message to warn user about the impact of using a
BPF filter in IPS mode.
@@ -1545,8 +1545,14 @@ TmEcode ReceiveAFPThreadInit(ThreadVars *tv, void *initdata, void **data) {
if (ptv->copy_mode != AFP_COPY_MODE_NONE) {
strlcpy(ptv->out_iface, afpconfig->out_iface, AFP_IFACE_NAME_LENGTH);
ptv->out_iface[AFP_IFACE_NAME_LENGTH - 1]= '\0';
/* Warn about BPF filter consequence */
if (ptv->bpf_filter) {
SCLogInfo("WARNING, enabling a BPF filter in IPS mode result"
Copy link
Contributor

Choose a reason for hiding this comment

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

Think SCLogWarning is more appropriate for, well, warnings? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You've got a serious argument here :) I've choose Info because it can be normal if the user really know what he does.

Copy link
Contributor

Choose a reason for hiding this comment

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

On 03/26/2013 05:42 PM, Eric Leblond wrote:

In src/source-af-packet.c:

@@ -1545,8 +1545,14 @@ TmEcode ReceiveAFPThreadInit(ThreadVars _tv, void *initdata, void *_data) {
if (ptv->copy_mode != AFP_COPY_MODE_NONE) {
strlcpy(ptv->out_iface, afpconfig->out_iface, AFP_IFACE_NAME_LENGTH);
ptv->out_iface[AFP_IFACE_NAME_LENGTH - 1]= '\0';

  •    /\* Warn about BPF filter consequence */
    
  •    if (ptv->bpf_filter) {
    
  •        SCLogInfo("WARNING, enabling a BPF filter in IPS mode result"
    

You've got a serious argument here :) I've choose Info because it can be
normal if the user really know what he does.

I'm sure a user like that can ignore a real warning then :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol, you've got me ;)

@regit
Copy link
Contributor Author

regit commented Mar 26, 2013

Closing and submitting update version.

@regit regit closed this Mar 26, 2013
@regit regit deleted the ips-bpf branch December 16, 2013 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants