diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 3ac42830f13..d75013e4cd5 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -104,6 +104,9 @@ static caddr_t bpf_alloc(); static int bpf_bufsize = BPF_BUFSIZE; SYSCTL_INT(_debug, OID_AUTO, bpf_bufsize, CTLFLAG_RW, &bpf_bufsize, 0, ""); +static int bpf_maxbufsize = BPF_MAXBUFSIZE; +SYSCTL_INT(_debug, OID_AUTO, bpf_maxbufsize, CTLFLAG_RW, + &bpf_maxbufsize, 0, ""); /* * bpf_iflist is the list of interfaces; each corresponds to an ifnet @@ -698,8 +701,8 @@ bpfioctl(dev, cmd, addr, flags, p) else { register u_int size = *(u_int *)addr; - if (size > BPF_MAXBUFSIZE) - *(u_int *)addr = size = BPF_MAXBUFSIZE; + if (size > bpf_maxbufsize) + *(u_int *)addr = size = bpf_maxbufsize; else if (size < BPF_MINBUFSIZE) *(u_int *)addr = size = BPF_MINBUFSIZE; d->bd_bufsize = size; diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 9b04c82944c..a684314e684 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -58,7 +58,7 @@ typedef u_int32_t bpf_u_int32; #define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) #define BPF_MAXINSNS 512 -#define BPF_MAXBUFSIZE 0x8000 +#define BPF_MAXBUFSIZE 0x80000 #define BPF_MINBUFSIZE 32 /*