freebsd-dev/contrib/ipfilter/lib
Cy Schubert 971fa117c0 Currently the fragment info is placed at the top of the linked list
under a shared read lock. This patch attempts to upgrade the lock to
an exclusive write lock. If the exclusive write lock fails to be
obtained, the current fragment is not placed at the head of the list.

This portion of the patch was inspired by NetBSD ip_frag.c r1.4 (which
effectively removed the section of code that performed the reordering).

The patch to sys/contrib/ipfilter/netinet/ip_compat.h adds the
MUTEX_TRY_UPGRADE macro to support the patch to ip_frag.c.

The patch to contrib/ipfilter/lib/rwlock_emul.c supports this patch
by emulating the mutex in userspace when exercised by ipftest(1).

Inspired by:	NetBSD ip_frag.c r1.4
MFC after:	1 month
2017-01-26 01:24:05 +00:00
..
addicmp.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
addipopt.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
alist_free.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
alist_new.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
allocmbt.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
assigndefined.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
bcopywrap.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
binprint.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
buildopts.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
checkrev.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
connecttcp.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
count4bits.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
count6bits.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
debug.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
dupmbt.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
facpri.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
facpri.h Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
familyname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
fill6bits.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
findword.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
flags.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
freembt.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ftov.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
gethost.c #553 gethost needs to zero entire IP address structure 2014-09-22 16:06:37 +00:00
geticmptype.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
getifname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
getnattype.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
getport.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
getportproto.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
getproto.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
getsumd.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
hostname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
icmpcode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
icmptypename.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
icmptypes.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
inet_addr.c As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
initparse.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
interror.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ionames.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipf_dotuning.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipf_perror.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipft_hx.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipft_pc.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipft_tx.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipoptsec.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
kmem.c Stop including if_var.h from userland. 2015-04-06 09:42:23 +00:00
kmem.h Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
kmemcpywrap.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
kvatoname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_dstlist.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_dstlistnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_file.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_hash.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_hashnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_http.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_pool.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_poolnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
load_url.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
Makefile Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
mb_hexdump.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
msgdsize.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
mutex_emul.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
nametokva.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
nat_setgroupmap.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ntomask.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
optname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
optprint.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
optprintv6.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
optvalue.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
parsefields.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
parseipfexpr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
parsewhoisline.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
poolio.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
portname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
prependmbt.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
print_toif.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printactiveaddr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printactivenat.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printaddr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printaps.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printbuf.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printdstl_live.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printdstlist.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printdstlistdata.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printdstlistnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printdstlistpolicy.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printfieldhdr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printfr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printfraginfo.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printhash_live.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printhash.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printhashdata.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printhashnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printhost.c Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT 2014-07-05 07:15:19 +00:00
printhostmap.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printhostmask.c Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT 2014-07-05 07:15:19 +00:00
printifname.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printip.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printipfexpr.c Unbreak with gcc. 2014-07-13 10:38:01 +00:00
printiphdr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printlog.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printlookup.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printmask.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printnat.c #536 ipnat can try to print rule as dstlist incorrectly 2014-09-22 16:09:18 +00:00
printnataddr.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printnatfield.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printnatside.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpacket6.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpacket.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpool_live.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpool.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpooldata.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpoolfield.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printpoolnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printportcmp.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printproto.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printsbuf.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printstate.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printstatefields.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printtcpflags.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printtqtable.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printtunable.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
printunit.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
remove_hash.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
remove_hashnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
remove_pool.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
remove_poolnode.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
resetlexer.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
rwlock_emul.c Currently the fragment info is placed at the top of the linked list 2017-01-26 01:24:05 +00:00
save_execute.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
save_file.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
save_nothing.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
save_syslog.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
save_v1trap.c Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT 2014-07-05 07:15:19 +00:00
save_v2trap.c Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT 2014-07-05 07:15:19 +00:00
tcp_flags.c As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
tcpflags.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
tcpoptnames.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
v6ionames.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
v6optvalue.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
var.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
verbose.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
vtof.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00