BPF compiler bug fixed + improvements
- General
- output '@ False @', caused by syntax error is now return BPF that drops all packets
- Fixed protocol offset errors when VLAN and MPLS is present
- Fixed tcp[n], udp[n], or sctp[n] operation not calculating length of IPv4 headers
- Added vlan expansions for linux. Triggered by adding -linux_vlan flag.
- Added 'ip6 net'
- added vlanrange feature by allowing syntax 'vlan floor-ceil'
- Added 'icmp protochain' and 'icmp6 protochain'
- added graphviz output. Triggered by adding -graph flag. Output is .dot file format that can be transformed into image using graphviz.
- Prevented jt and jf instructions to jump more than 255 lines by utilizing 'jmp' instruction.
- Added more test cases related to protochain (max_rec = 2)
- Optimizer
- Crunches alternative similar blocks
- changes ("and n; jeq 0" to "jset n") and ("sub n; jeq 0" to "jeq n")
- Fixed optimizer behaviors that delete redundant codes too ambitiously
- Seperated protochain from optimizer for better performance
Edited by Hyunsuk Bang