# ignoring ContentGap and friends

**URL:** <https://community.zeek.org/t/ignoring-contentgap-and-friends/1466>\
**Category:** Zeek\
**Created:** [December 8, 2008, 8:09pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466 "2008-12-08T20:09:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![0100](https://avatars.discourse-cdn.com/v4/letter/0/e19b73/32.png) [@0100](https://community.zeek.org/u/0100)\
**Post date:** [December 8, 2008, 8:09pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/1 "2008-12-08T20:09:15Z")

</div>

Hi.

New to bro so this is probably a dumb question.

I’m following the instructions here ([http://www.bro-ids.org/wiki/index.php/User\_Manual:\_Customizing\_Bro](http://www.bro-ids.org/wiki/index.php/User_Manual:_Customizing_Bro)) on how to squelch the ContentGap and various other messages. Here’s my config file:

@load bittorrent  
@load bt-tracker

redef notice\_action\_filters += {  
WeirdActivity, ContentGap = ignore\_notice,  
};

When I run this, I get:

Line 6: error: unknown identifier WeirdActivity, at or near “WeirdActivity”

I couldn’t figure out if these have been renamed or what?

Thanks for the help…

0100

---

<div class="post-metadata">

**Author:** ![rmkml](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rmkml](https://community.zeek.org/u/rmkml)\
**Post date:** [December 8, 2008, 6:36pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/2 "2008-12-08T18:36:10Z")

</div>

Hi,  
maybe add `Weird::`, example:  
&nbsp;&nbsp;Weird::WeirdActivity, Weird::ContentGap = ignore\_notice,  
Regards  
Rmkml  
[Crusoe-Researches.com](http://Crusoe-Researches.com)

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [December 8, 2008, 8:56pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/3 "2008-12-08T20:56:32Z")

</div>

You're likely using a newer version than this was written for (as it  
seems you already guessed). The variables from weird.bro are now in  
a namespace Weird so you should write Weird::WeirdActivity etc. (and  
also @load weird).

Robin

---

<div class="post-metadata">

**Author:** ![0100](https://avatars.discourse-cdn.com/v4/letter/0/e19b73/32.png) [@0100](https://community.zeek.org/u/0100)\
**Post date:** [December 8, 2008, 9:24pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/4 "2008-12-08T21:24:41Z")

</div>

Thanks all.

So the good news is that it seems to have found the referenced variables, but they are creating a type error in the notice\_action\_filters table:

notice.bro, line 6 and /usr/local/bro/policy/notice.bro, lines 74-75  
(enum and table[enum] of function(n:record { note:enum; msg:string; sub:string; conn:record { id:record { orig\_h:addr; orig\_p:port; resp\_h:addr; resp\_p:port; }; orig:record { size:count; state:count; }; resp:record { size:count; state:count; }; start\_time:time; duration:interval; service:set[string]; addl:string; hot:count; history:string; }; iconn:record { orig\_h:addr; resp\_h:addr; itype:count; icode:count; len:count; }; id:record { orig\_h:addr; orig\_p:port; resp\_h:addr; resp\_p:port; }; src:addr; dst:addr; p:port; user:string; filename:string; method:string; URL:string; n:count; src\_peer:record { id:count; host:addr; p:port; is\_local:bool; descr:string; class:string; }; tag:string; dropped:bool; captured:string; }; a:enum;) : enum): error, type clash in table initializer

Thoughts? Does this enum need to be updated somewhere?

0100

---

<div class="post-metadata">

**Author:** ![Vern](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/vern/32/630_2.png) [@Vern](https://community.zeek.org/u/Vern)\
**Post date:** [December 8, 2008, 9:38pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/5 "2008-12-08T21:38:10Z")

</div>

> redef notice\_action\_filters += {  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WeirdActivity, ContentGap = ignore\_notice,  
> };

Along with the scoping issues that others have discussed, there's  
a syntax problem here (which explains your follow-on problem). The  
above needs to be:

&nbsp;&nbsp;redef notice\_action\_filters += {  
&nbsp;&nbsp;&nbsp;&nbsp;[[Weird::WeirdActivity, Weird::ContentGap]] = ignore\_notice,  
&nbsp;&nbsp;};

- Vern

---

<div class="post-metadata">

**Author:** ![0100](https://avatars.discourse-cdn.com/v4/letter/0/e19b73/32.png) [@0100](https://community.zeek.org/u/0100)\
**Post date:** [December 8, 2008, 9:44pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/6 "2008-12-08T21:44:50Z")

</div>

Thanks! That seems to work. I will request a wiki account and update the docs if that’s okay.

0100

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:38pm UTC](https://community.zeek.org/t/ignoring-contentgap-and-friends/1466/7 "2022-05-06T15:38:49Z")

</div>


