remarkable-linux/net/xfrm
Thomas Egerer cd808fc9a6 xfrm: Fix aevent generation for each received packet
If asynchronous events are enabled for a particular netlink socket,
the notify function is called by the advance function. The notify
function creates and dispatches a km_event if a replay timeout occurred,
or at least replay_maxdiff packets have been received since the last
asynchronous event has been sent. The function is supposed to return if
neither of the two events were detected for a state, or replay_maxdiff
is equal to zero.
Replay_maxdiff is initialized in xfrm_state_construct to the value of
the xfrm.sysctl_aevent_rseqth (2 by default), and updated if for a state
if the netlink attribute XFRMA_REPLAY_THRESH is set.
If, however, replay_maxdiff is set to zero, then all of the three notify
implementations perform a break from the switch statement instead of
checking whether a timeout occurred, and -- if not -- return.  As a
result an asynchronous event is generated for every replay update of a
state that has a zero replay_maxdiff value.
This patch modifies the notify functions such that they immediately
return if replay_maxdiff has the value zero, unless a timeout occurred.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2013-09-25 07:32:48 +02:00
..
Kconfig net/xfrm: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:40:03 -08:00
Makefile xfrm: make xfrm_algo.c a module 2012-05-15 13:13:34 -04:00
xfrm_algo.c xfrm: add rfc4494 AES-CMAC-96 support 2013-04-25 21:01:48 +08:00
xfrm_hash.c net: allow GFP_HIGHMEM in __vmalloc() 2010-11-21 10:04:04 -08:00
xfrm_hash.h net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xfrm_input.c xfrm: add LINUX_MIB_XFRMACQUIREERROR statistic counter 2013-06-06 06:45:55 +02:00
xfrm_ipcomp.c net: xfrm: use __this_cpu_read per-cpu helper 2012-11-13 14:38:52 +01:00
xfrm_output.c xfrm: choose protocol family by skb protocol 2013-08-19 09:39:04 +02:00
xfrm_policy.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-09-05 14:58:52 -04:00
xfrm_proc.c xfrm: add LINUX_MIB_XFRMACQUIREERROR statistic counter 2013-06-06 06:45:55 +02:00
xfrm_replay.c xfrm: Fix aevent generation for each received packet 2013-09-25 07:32:48 +02:00
xfrm_state.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-09-05 14:58:52 -04:00
xfrm_sysctl.c net: Don't export sysctls to unprivileged users 2012-11-18 20:30:55 -05:00
xfrm_user.c xfrm: Guard IPsec anti replay window against replay bitmap 2013-09-17 12:17:10 +02:00