git: ipfw3: support bpf filter in layer4 module

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Jun 16 20:50:31 PDT 2015


commit e895e94d539d4e7184f4823177557af4e3a227dd
Author: Bill Yuan <bycn82 at leaf.dragonflybsd.org>
Date:   Wed Jun 17 09:35:05 2015 +0800

    ipfw3: support bpf filter in layer4 module
    
    syntax:
    bpf "<bpf string>"
    e.g.
    ipfw3 add allow all bpf "icmp and src 8.8.8.8"
    
    bpf can be used to filter the packet payload.
    
    pcap_compile_nocap was used to compile the bpf string
    and bpf_filter for the filtering.

Summary of changes:
 Makefile.inc1                        |  2 ++
 lib/libipfw3/layer4/Makefile         |  8 ++++--
 lib/libipfw3/layer4/ipfw3_layer4.c   | 53 ++++++++++++++++++++++++++++++++++++
 sys/net/ipfw3/ip_fw3.h               | 13 +++++++++
 sys/net/ipfw3_layer4/ip_fw3_layer4.c | 22 +++++++++++++++
 sys/net/ipfw3_layer4/ip_fw3_layer4.h |  1 +
 6 files changed, 96 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e895e94d539d4e7184f4823177557af4e3a227dd


-- 
DragonFly BSD source repository



More information about the Commits mailing list