freebsd-skq/contrib/ipfilter/lib
cy 5fb5bda947 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 Revert r288682 2015-10-05 03:26:51 +00:00
addipopt.c Revert r288682 2015-10-05 03:26:51 +00:00
alist_free.c Revert r288682 2015-10-05 03:26:51 +00:00
alist_new.c Revert r288682 2015-10-05 03:26:51 +00:00
allocmbt.c Revert r288682 2015-10-05 03:26:51 +00:00
assigndefined.c Revert r288682 2015-10-05 03:26:51 +00:00
bcopywrap.c Revert r288682 2015-10-05 03:26:51 +00:00
binprint.c Revert r288682 2015-10-05 03:26:51 +00:00
buildopts.c Revert r288682 2015-10-05 03:26:51 +00:00
checkrev.c Revert r288682 2015-10-05 03:26:51 +00:00
connecttcp.c Revert r288682 2015-10-05 03:26:51 +00:00
count4bits.c Revert r288682 2015-10-05 03:26:51 +00:00
count6bits.c Revert r288682 2015-10-05 03:26:51 +00:00
debug.c Revert r288682 2015-10-05 03:26:51 +00:00
dupmbt.c Revert r288682 2015-10-05 03:26:51 +00:00
facpri.c Revert r288682 2015-10-05 03:26:51 +00:00
facpri.h Revert r288682 2015-10-05 03:26:51 +00:00
familyname.c Revert r288682 2015-10-05 03:26:51 +00:00
fill6bits.c Revert r288682 2015-10-05 03:26:51 +00:00
findword.c Revert r288682 2015-10-05 03:26:51 +00:00
flags.c Revert r288682 2015-10-05 03:26:51 +00:00
freembt.c Revert r288682 2015-10-05 03:26:51 +00:00
ftov.c Revert r288682 2015-10-05 03:26:51 +00:00
gethost.c Revert r288682 2015-10-05 03:26:51 +00:00
geticmptype.c Revert r288682 2015-10-05 03:26:51 +00:00
getifname.c Revert r288682 2015-10-05 03:26:51 +00:00
getnattype.c Revert r288682 2015-10-05 03:26:51 +00:00
getport.c Revert r288682 2015-10-05 03:26:51 +00:00
getportproto.c Revert r288682 2015-10-05 03:26:51 +00:00
getproto.c Revert r288682 2015-10-05 03:26:51 +00:00
getsumd.c Revert r288682 2015-10-05 03:26:51 +00:00
hostname.c Revert r288682 2015-10-05 03:26:51 +00:00
icmpcode.c Revert r288682 2015-10-05 03:26:51 +00:00
icmptypename.c Revert r288682 2015-10-05 03:26:51 +00:00
icmptypes.c Revert r288682 2015-10-05 03:26:51 +00:00
inet_addr.c Revert r288682 2015-10-05 03:26:51 +00:00
initparse.c Revert r288682 2015-10-05 03:26:51 +00:00
interror.c Revert r288682 2015-10-05 03:26:51 +00:00
ionames.c Revert r288682 2015-10-05 03:26:51 +00:00
ipf_dotuning.c Revert r288682 2015-10-05 03:26:51 +00:00
ipf_perror.c Revert r288682 2015-10-05 03:26:51 +00:00
ipft_hx.c Revert r288682 2015-10-05 03:26:51 +00:00
ipft_pc.c Revert r288682 2015-10-05 03:26:51 +00:00
ipft_tx.c Revert r288682 2015-10-05 03:26:51 +00:00
ipoptsec.c Revert r288682 2015-10-05 03:26:51 +00:00
kmem.c Revert r288682 2015-10-05 03:26:51 +00:00
kmem.h Revert r288682 2015-10-05 03:26:51 +00:00
kmemcpywrap.c Revert r288682 2015-10-05 03:26:51 +00:00
kvatoname.c Revert r288682 2015-10-05 03:26:51 +00:00
load_dstlist.c Revert r288682 2015-10-05 03:26:51 +00:00
load_dstlistnode.c Revert r288682 2015-10-05 03:26:51 +00:00
load_file.c Revert r288682 2015-10-05 03:26:51 +00:00
load_hash.c Revert r288682 2015-10-05 03:26:51 +00:00
load_hashnode.c Revert r288682 2015-10-05 03:26:51 +00:00
load_http.c Revert r288682 2015-10-05 03:26:51 +00:00
load_pool.c Revert r288682 2015-10-05 03:26:51 +00:00
load_poolnode.c Revert r288682 2015-10-05 03:26:51 +00:00
load_url.c Revert r288682 2015-10-05 03:26:51 +00:00
Makefile Revert r288682 2015-10-05 03:26:51 +00:00
mb_hexdump.c Revert r288682 2015-10-05 03:26:51 +00:00
msgdsize.c Revert r288682 2015-10-05 03:26:51 +00:00
mutex_emul.c Revert r288682 2015-10-05 03:26:51 +00:00
nametokva.c Revert r288682 2015-10-05 03:26:51 +00:00
nat_setgroupmap.c Revert r288682 2015-10-05 03:26:51 +00:00
ntomask.c Revert r288682 2015-10-05 03:26:51 +00:00
optname.c Revert r288682 2015-10-05 03:26:51 +00:00
optprint.c Revert r288682 2015-10-05 03:26:51 +00:00
optprintv6.c Revert r288682 2015-10-05 03:26:51 +00:00
optvalue.c Revert r288682 2015-10-05 03:26:51 +00:00
parsefields.c Revert r288682 2015-10-05 03:26:51 +00:00
parseipfexpr.c Revert r288682 2015-10-05 03:26:51 +00:00
parsewhoisline.c Revert r288682 2015-10-05 03:26:51 +00:00
poolio.c Revert r288682 2015-10-05 03:26:51 +00:00
portname.c Revert r288682 2015-10-05 03:26:51 +00:00
prependmbt.c Revert r288682 2015-10-05 03:26:51 +00:00
print_toif.c Revert r288682 2015-10-05 03:26:51 +00:00
printactiveaddr.c Revert r288682 2015-10-05 03:26:51 +00:00
printactivenat.c Revert r288682 2015-10-05 03:26:51 +00:00
printaddr.c Revert r288682 2015-10-05 03:26:51 +00:00
printaps.c Revert r288682 2015-10-05 03:26:51 +00:00
printbuf.c Revert r288682 2015-10-05 03:26:51 +00:00
printdstl_live.c Revert r288682 2015-10-05 03:26:51 +00:00
printdstlist.c Revert r288682 2015-10-05 03:26:51 +00:00
printdstlistdata.c Revert r288682 2015-10-05 03:26:51 +00:00
printdstlistnode.c Revert r288682 2015-10-05 03:26:51 +00:00
printdstlistpolicy.c Revert r288682 2015-10-05 03:26:51 +00:00
printfieldhdr.c Revert r288682 2015-10-05 03:26:51 +00:00
printfr.c Revert r288682 2015-10-05 03:26:51 +00:00
printfraginfo.c Revert r288682 2015-10-05 03:26:51 +00:00
printhash_live.c Revert r288682 2015-10-05 03:26:51 +00:00
printhash.c Revert r288682 2015-10-05 03:26:51 +00:00
printhashdata.c Revert r288682 2015-10-05 03:26:51 +00:00
printhashnode.c Revert r288682 2015-10-05 03:26:51 +00:00
printhost.c Revert r288682 2015-10-05 03:26:51 +00:00
printhostmap.c Revert r288682 2015-10-05 03:26:51 +00:00
printhostmask.c Revert r288682 2015-10-05 03:26:51 +00:00
printifname.c Revert r288682 2015-10-05 03:26:51 +00:00
printip.c Revert r288682 2015-10-05 03:26:51 +00:00
printipfexpr.c Revert r288682 2015-10-05 03:26:51 +00:00
printiphdr.c Revert r288682 2015-10-05 03:26:51 +00:00
printlog.c Revert r288682 2015-10-05 03:26:51 +00:00
printlookup.c Revert r288682 2015-10-05 03:26:51 +00:00
printmask.c Revert r288682 2015-10-05 03:26:51 +00:00
printnat.c Revert r288682 2015-10-05 03:26:51 +00:00
printnataddr.c Revert r288682 2015-10-05 03:26:51 +00:00
printnatfield.c Revert r288682 2015-10-05 03:26:51 +00:00
printnatside.c Revert r288682 2015-10-05 03:26:51 +00:00
printpacket6.c Revert r288682 2015-10-05 03:26:51 +00:00
printpacket.c Revert r288682 2015-10-05 03:26:51 +00:00
printpool_live.c Revert r288682 2015-10-05 03:26:51 +00:00
printpool.c Revert r288682 2015-10-05 03:26:51 +00:00
printpooldata.c Revert r288682 2015-10-05 03:26:51 +00:00
printpoolfield.c Revert r288682 2015-10-05 03:26:51 +00:00
printpoolnode.c Revert r288682 2015-10-05 03:26:51 +00:00
printportcmp.c Revert r288682 2015-10-05 03:26:51 +00:00
printproto.c Revert r288682 2015-10-05 03:26:51 +00:00
printsbuf.c Revert r288682 2015-10-05 03:26:51 +00:00
printstate.c Revert r288682 2015-10-05 03:26:51 +00:00
printstatefields.c Revert r288682 2015-10-05 03:26:51 +00:00
printtcpflags.c Revert r288682 2015-10-05 03:26:51 +00:00
printtqtable.c Revert r288682 2015-10-05 03:26:51 +00:00
printtunable.c Revert r288682 2015-10-05 03:26:51 +00:00
printunit.c Revert r288682 2015-10-05 03:26:51 +00:00
remove_hash.c Revert r288682 2015-10-05 03:26:51 +00:00
remove_hashnode.c Revert r288682 2015-10-05 03:26:51 +00:00
remove_pool.c Revert r288682 2015-10-05 03:26:51 +00:00
remove_poolnode.c Revert r288682 2015-10-05 03:26:51 +00:00
resetlexer.c Revert r288682 2015-10-05 03:26:51 +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 Revert r288682 2015-10-05 03:26:51 +00:00
save_file.c Revert r288682 2015-10-05 03:26:51 +00:00
save_nothing.c Revert r288682 2015-10-05 03:26:51 +00:00
save_syslog.c Revert r288682 2015-10-05 03:26:51 +00:00
save_v1trap.c Revert r288682 2015-10-05 03:26:51 +00:00
save_v2trap.c Revert r288682 2015-10-05 03:26:51 +00:00
tcp_flags.c Revert r288682 2015-10-05 03:26:51 +00:00
tcpflags.c Revert r288682 2015-10-05 03:26:51 +00:00
tcpoptnames.c Revert r288682 2015-10-05 03:26:51 +00:00
v6ionames.c Revert r288682 2015-10-05 03:26:51 +00:00
v6optvalue.c Revert r288682 2015-10-05 03:26:51 +00:00
var.c Revert r288682 2015-10-05 03:26:51 +00:00
verbose.c Revert r288682 2015-10-05 03:26:51 +00:00
vtof.c Revert r288682 2015-10-05 03:26:51 +00:00