mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-24 19:45:06 +08:00
2ab6096db2
There are only two implementaions, one for ipv4 and one for ipv6. Both are almost identical, they clear skb->cb[], set the TRANSFORMED flag in IP(6)CB and then call the common xfrm_output() function. By placing the IPCB handling into the common function, we avoid the need for the output_finish indirection as the output functions can simply use xfrm_output(). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
25 lines
469 B
C
25 lines
469 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* xfrm4_state.c
|
|
*
|
|
* Changes:
|
|
* YOSHIFUJI Hideaki @USAGI
|
|
* Split up af-specific portion
|
|
*
|
|
*/
|
|
|
|
#include <net/xfrm.h>
|
|
|
|
static struct xfrm_state_afinfo xfrm4_state_afinfo = {
|
|
.family = AF_INET,
|
|
.proto = IPPROTO_IPIP,
|
|
.output = xfrm4_output,
|
|
.transport_finish = xfrm4_transport_finish,
|
|
.local_error = xfrm4_local_error,
|
|
};
|
|
|
|
void __init xfrm4_state_init(void)
|
|
{
|
|
xfrm_state_register_afinfo(&xfrm4_state_afinfo);
|
|
}
|