Skip to content

BPF compiler bug fixed + improvements

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

Merge request reports