diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2011-05-22 17:15:21 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2011-05-22 17:15:21 +0000 |
commit | e282e73442538c3985221576f5d7175bc5b4c5c7 (patch) | |
tree | 00b83c36c6d0df43fffb984a228e3c9fdb5da15d /net/libpcap | |
parent | 189dfe429ce3f694116f8b0c13a1fb967acc64b8 (diff) | |
download | ports-e282e73442538c3985221576f5d7175bc5b4c5c7.tar.gz ports-e282e73442538c3985221576f5d7175bc5b4c5c7.zip |
Bring in commit ecdc5c0a7f7591a7cd4aff696e42757c677fbbf7 from upstream.
This fixes a crash when using 'ip6 protochain' filters.
PR: kern/157188
Submitted by: plosher@
Notes
Notes:
svn path=/head/; revision=274462
Diffstat (limited to 'net/libpcap')
-rw-r--r-- | net/libpcap/Makefile | 1 | ||||
-rw-r--r-- | net/libpcap/files/patch-bpf__net__bpf_filter.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/net/libpcap/Makefile b/net/libpcap/Makefile index 6be738b046e2..cdead4c93463 100644 --- a/net/libpcap/Makefile +++ b/net/libpcap/Makefile @@ -7,6 +7,7 @@ PORTNAME= libpcap PORTVERSION= 1.1.1 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= http://www.tcpdump.org/release/ diff --git a/net/libpcap/files/patch-bpf__net__bpf_filter.c b/net/libpcap/files/patch-bpf__net__bpf_filter.c new file mode 100644 index 000000000000..61a532541846 --- /dev/null +++ b/net/libpcap/files/patch-bpf__net__bpf_filter.c @@ -0,0 +1,21 @@ +--- ./bpf/net/bpf_filter.c.orig 2010-03-11 20:56:53.000000000 -0500 ++++ ./bpf/net/bpf_filter.c 2011-05-22 12:59:10.148490778 -0400 +@@ -405,7 +405,18 @@ + continue; + + case BPF_JMP|BPF_JA: ++#if defined(KERNEL) || defined(_KERNEL) ++ /* ++ * No backward jumps allowed. ++ */ + pc += pc->k; ++#else ++ /* ++ * XXX - we currently implement "ip6 protochain" ++ * with backward jumps, so sign-extend pc->k. ++ */ ++ pc += (bpf_int32)pc->k; ++#endif + continue; + + case BPF_JMP|BPF_JGT|BPF_K: |