I figured it out ... the following works fine. Maybe the dq object is readonly?
*-- Any traffic that exeeds max qps will be loggedfunction rateLimitRule(dq) local ca = dq.remoteaddr ca:truncate(24) errlog("Rate Limit Exceeded: DNSDistRateLimiting "..ca:toString()) return DNSAction.None, ""end* Regards, brian On Wed, Aug 28, 2019 at 11:35 AM Brian Sullivan <brian.sulli...@lookout.com> wrote: > Hi All, > > I am trying to use the truncate function associated with the CombAddress > object. > > Here is the config: > > > > > > > *-- Any traffic that exceeds max qps will be loggedfunction > rateLimitRule(dq) dq.remoteaddr:truncate(24) errlog("Rate Limit Exceeded: > DNSDistRateLimiting "..dq.remoteaddr:toString()) return DNSAction.None, > ""endaddAction(MaxQPSIPRule(10, 24, 48), LuaAction(rateLimitRule))* > > Unfortunately I see the following output: > > > *dnsdist: Rate Limit Exceeded: DNSDistRateLimiting 10.51.13.64* > > I know this must work so I must be doing something wrong. > > Regards, > brian > -- > > > > Brian M. Sullivan > Senior Staff Security Intelligence Engineer > bsulli...@lookout.com | www.lookout.com > -- Brian M. Sullivan Senior Staff Security Intelligence Engineer bsulli...@lookout.com | www.lookout.com
_______________________________________________ dnsdist mailing list firstname.lastname@example.org https://mailman.powerdns.com/mailman/listinfo/dnsdist