<div dir="ltr">Yes, I am running in real traffic.<div>I need to record a custom HTTP request header. (Since I don't want to log all HTTP headers, I didn't enable the dump-all-headers option.)<br><div>I uploaded my Suricata.yaml file and lua script.<br></div><div><br></div><div><b>http_audit_demo.lua</b></div><div><b>suricata_5.0_rc1_60G_36C.yaml</b><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Peter Manev <<a href="mailto:petermanev@gmail.com">petermanev@gmail.com</a>> 于2019年10月3日周四 下午1:48写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Sep 27, 2019 at 7:45 AM Shell_Xu <<a href="mailto:xuh881026@gmail.com" target="_blank">xuh881026@gmail.com</a>> wrote:<br>
><br>
> HI, Suricata Team:<br>
><br>
>     I tried to use Lua scripts to audit all HTTP traffic, but after the script runs for about 30 seconds, the program automatically exits and outputs the following message: PANIC: unprotected error in call to Lua API (stack overflow).Since I don't want to log all HTTP headers, I didn't enable the dump-all-headers option.Lua scripts were used to implement my needs.But obviously, I have a problem now, can anyone help me?<br>
> Is this problem caused by Lua scripts unable to withstand HTTP traffic?<br>
><br>
> Traffic 1.5Gbpps<br>
> CPU: 1 CPU 36 core<br>
> Memory: 60G<br>
> Suricata 5.0.0-rc1<br>
><br>
> My lua script code is in the attachment, please correct me my mistake, any help makes sense to me.<br>
><br>
<br>
<br>
Hi,<br>
<br>
You are running it on live traffic right?<br>
Is it possible to share your conf and a pcap for that as well?<br>
(after  a short glance)<br>
What is the purpose of the script - you want to log each http<br>
transaction substituting true client ip for src wherever available ?<br>
<br>
Thank you<br>
<br>
<br>
<br>
-- <br>
Regards,<br>
Peter Manev<br>
</blockquote></div>