android_kernel_xiaomi_sm8350/net/xfrm
Thomas Egerer 8444cf712c xfrm: Allow different selector family in temporary state
The family parameter xfrm_state_find is used to find a state matching a
certain policy. This value is set to the template's family
(encap_family) right before xfrm_state_find is called.
The family parameter is however also used to construct a temporary state
in xfrm_state_find itself which is wrong for inter-family scenarios
because it produces a selector for the wrong family. Since this selector
is included in the xfrm_user_acquire structure, user space programs
misinterpret IPv6 addresses as IPv4 and vice versa.
This patch splits up the original init_tempsel function into a part that
initializes the selector respectively the props and id of the temporary
state, to allow for differing ip address families whithin the state.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-20 11:11:38 -07:00
..
Kconfig
Makefile
xfrm_algo.c
xfrm_hash.c
xfrm_hash.h
xfrm_input.c
xfrm_ipcomp.c
xfrm_output.c xfrm: dont assume rcu_read_lock in xfrm_output_one() 2010-09-16 21:46:15 -07:00
xfrm_policy.c xfrm: Allow different selector family in temporary state 2010-09-20 11:11:38 -07:00
xfrm_proc.c
xfrm_state.c xfrm: Allow different selector family in temporary state 2010-09-20 11:11:38 -07:00
xfrm_sysctl.c
xfrm_user.c xfrm_user: avoid a warning with some compiler 2010-09-01 14:29:35 -07:00