Re: [PATCH ipsec-next 02/10] tunnel4: add cb_handler to struct xfrm_tunnel

2020-06-22 Thread Xin Long
On Mon, Jun 22, 2020 at 9:16 PM Sabrina Dubroca wrote: > > 2020-06-17, 01:36:27 +0800, Xin Long wrote: > > @@ -231,6 +255,7 @@ static int __init tunnel4_init(void) > > goto err; > > } > > #endif > > + xfrm_input_register_afinfo(&tunnel4_input_afinfo); > > This can fail. Sh

Re: [PATCH ipsec-next 02/10] tunnel4: add cb_handler to struct xfrm_tunnel

2020-06-22 Thread Sabrina Dubroca
2020-06-17, 01:36:27 +0800, Xin Long wrote: > @@ -231,6 +255,7 @@ static int __init tunnel4_init(void) > goto err; > } > #endif > + xfrm_input_register_afinfo(&tunnel4_input_afinfo); This can fail. Shouldn't you handle that error? > return 0; > > err: -- Sabrin

Re: [PATCH ipsec-next 02/10] tunnel4: add cb_handler to struct xfrm_tunnel

2020-06-22 Thread Xin Long
On Thu, Jun 18, 2020 at 12:19 AM Jakub Kicinski wrote: > > On Wed, 17 Jun 2020 01:36:27 +0800 Xin Long wrote: > > This patch is to register a callback function tunnel4_rcv_cb with > > is_ipip set in a xfrm_input_afinfo object for tunnel4 and tunnel64. > > > > It will be called by xfrm_rcv_cb() fro

Re: [PATCH ipsec-next 02/10] tunnel4: add cb_handler to struct xfrm_tunnel

2020-06-17 Thread Jakub Kicinski
On Wed, 17 Jun 2020 01:36:27 +0800 Xin Long wrote: > This patch is to register a callback function tunnel4_rcv_cb with > is_ipip set in a xfrm_input_afinfo object for tunnel4 and tunnel64. > > It will be called by xfrm_rcv_cb() from xfrm_input() when family > is AF_INET and proto is IPPROTO_IPIP o

[PATCH ipsec-next 02/10] tunnel4: add cb_handler to struct xfrm_tunnel

2020-06-16 Thread Xin Long
This patch is to register a callback function tunnel4_rcv_cb with is_ipip set in a xfrm_input_afinfo object for tunnel4 and tunnel64. It will be called by xfrm_rcv_cb() from xfrm_input() when family is AF_INET and proto is IPPROTO_IPIP or IPPROTO_IPV6. Signed-off-by: Xin Long --- include/net/xf