Optimization #832
closedclean up packet action macros
Description
Clean up is need for packet action macro's:
- PASS_PACKET, DROP_PACKET and the others should be wrappers to UPDATE_PACKET_ACTION
- Lets rename things to have PACKET_* prefix, as we use almost everywhere
- Consumers of these macro's should use PASS/DROP/etc macro's directly as much as possible, instead of the UPDATE macro
Updated by Eric Leblond over 11 years ago
Some questions:
Point 2:
So we have
UPDATE_PACKET_ACTION > PACKET_UPDATE_ACTION>PACKET_DROP
DROP_PACKET
Point 3:
Currently, I've choose to use UPDATE_PACKET_ACTION where we add a "|= ACTION". In place with a simple =, I've used direct access to PASS/DROP macros. So the question is. Is there a reason to use |= when setting DROP or PASS ?
Updated by Victor Julien over 11 years ago
Point 2: ya.
Point 3: we need to review this carefully. For example in case of reject, we also set drop to that we both drop and send out a rst/icmp err. Some actions are obviously conflicting, like pass and drop.
Updated by Eric Leblond over 11 years ago
- % Done changed from 0 to 90
Implemented by https://github.com/inliniac/suricata/pull/402
Updated by Victor Julien over 11 years ago
- Status changed from Assigned to Closed
- % Done changed from 90 to 100
Merged, thanks Eric.