# problem setting default variable value

**URL:** <https://community.zeek.org/t/problem-setting-default-variable-value/3776>\
**Category:** Zeek\
**Created:** [August 20, 2015, 2:40pm UTC](https://community.zeek.org/t/problem-setting-default-variable-value/3776 "2015-08-20T14:40:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earl\_Eiland](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Earl\_Eiland](https://community.zeek.org/u/Earl_Eiland)\
**Post date:** [August 20, 2015, 2:40pm UTC](https://community.zeek.org/t/problem-setting-default-variable-value/3776/1 "2015-08-20T14:40:42Z")

</div>

I’m trying to define a record variable and getting the error “&default value has inconsistent type”. The line is:

whitelist\_l4\_protocol: set[transport\_proto] &default=unknown\_transport &log;

unknown\_transport is one of the values for enum transport\_proto. I’ve tried enclosing the value in quotes. I get the same error.

I’ve also tried

whitelist\_l4\_protocol: set[transport\_proto] &default={unknown\_transport} &log;

This throws the error “syntax error, at or near “{“.

Please advise!

Best Regards,

Earl Eiland,

Sr. Cyber Security Engineer,

Emerging Technologies, root9B,

San Antonio, Texas

---

<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:42pm UTC](https://community.zeek.org/t/problem-setting-default-variable-value/3776/2 "2022-05-06T15:42:59Z")

</div>


