[Bro-Dev] [JIRA] (BIT-1573) 3 useless EventHandlerPtr in the ARP Analyzer

Johanna Amann (JIRA) jira at bro-tracker.atlassian.net
Tue Apr 26 08:29:04 PDT 2016


    [ https://bro-tracker.atlassian.net/browse/BIT-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=25902#comment-25902 ] 

Johanna Amann commented on BIT-1573:
------------------------------------

I might miss something - but it seems that those EventHanderPtrs are initialized in ARP_Analyzer::ARP_Analyzer in ARP.cc (lines 13-15).

They are also used to send events later in ARP.cc

> 3 useless EventHandlerPtr in the ARP Analyzer
> ---------------------------------------------
>
>                 Key: BIT-1573
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1573
>             Project: Bro Issue Tracker
>          Issue Type: Improvement
>          Components: Bro
>            Reporter: llh
>            Priority: Trivial
>
> The class analyzer::arp::ARP_Analyzer declared in the file src/analyzer/protocol/arp/ARP.h declares 3 protected EventHandlerPtr that are never initialized and never used.
> What the corresponding source file refer to are the following global variables :
> * bad_arp
> * arp_request
> * arp_reply
> which are declared as "extern" in the file build/src/analyzer/protocol/arp/events.bif.h which is generated by bifcl from src/analyzer/protocol/arp/events.bif.
> Fixing this issue is trivial : deleting the 3 lines declaring the unused EventHandlerPtr.
> The expected improvement is saving 3 bytes of memory and mostly not messing with those who will try to understand the code of this analyzer in the future. 



--
This message was sent by Atlassian JIRA
(v1000.5.0#72002)


More information about the bro-dev mailing list