Lines Matching refs:err
96 static void esp_output_done(struct crypto_async_request *base, int err) in esp_output_done() argument
101 xfrm_output_resume(skb, err); in esp_output_done()
106 int err; in esp_output() local
124 err = -ENOMEM; in esp_output()
138 if ((err = skb_cow_data(skb, clen - skb->len + alen, &trailer)) < 0) in esp_output()
140 nfrags = err; in esp_output()
217 err = crypto_aead_givencrypt(req); in esp_output()
218 if (err == -EINPROGRESS) in esp_output()
221 if (err == -EBUSY) in esp_output()
222 err = NET_XMIT_DROP; in esp_output()
227 return err; in esp_output()
230 static int esp_input_done2(struct sk_buff *skb, int err) in esp_input_done2() argument
245 if (unlikely(err)) in esp_input_done2()
251 err = -EINVAL; in esp_input_done2()
302 err = nexthdr[1]; in esp_input_done2()
305 if (err == IPPROTO_NONE) in esp_input_done2()
306 err = -EINVAL; in esp_input_done2()
309 return err; in esp_input_done2()
312 static void esp_input_done(struct crypto_async_request *base, int err) in esp_input_done() argument
316 xfrm_input_resume(skb, esp_input_done2(skb, err)); in esp_input_done()
337 int err = -EINVAL; in esp_input() local
345 if ((err = skb_cow_data(skb, 0, &trailer)) < 0) in esp_input()
347 nfrags = err; in esp_input()
349 err = -ENOMEM; in esp_input()
375 err = crypto_aead_decrypt(req); in esp_input()
376 if (err == -EINPROGRESS) in esp_input()
379 err = esp_input_done2(skb, err); in esp_input()
382 return err; in esp_input()
448 int err; in esp_init_aead() local
451 err = PTR_ERR(aead); in esp_init_aead()
457 err = crypto_aead_setkey(aead, x->aead->alg_key, in esp_init_aead()
459 if (err) in esp_init_aead()
462 err = crypto_aead_setauthsize(aead, x->aead->alg_icv_len / 8); in esp_init_aead()
463 if (err) in esp_init_aead()
467 return err; in esp_init_aead()
480 int err; in esp_init_authenc() local
482 err = -EINVAL; in esp_init_authenc()
486 err = -ENAMETOOLONG; in esp_init_authenc()
493 err = PTR_ERR(aead); in esp_init_authenc()
501 err = -ENOMEM; in esp_init_authenc()
522 err = -EINVAL; in esp_init_authenc()
532 err = crypto_aead_setauthsize( in esp_init_authenc()
534 if (err) in esp_init_authenc()
541 err = crypto_aead_setkey(aead, key, keylen); in esp_init_authenc()
547 return err; in esp_init_authenc()
555 int err; in esp_init_state() local
564 err = esp_init_aead(x); in esp_init_state()
566 err = esp_init_authenc(x); in esp_init_state()
568 if (err) in esp_init_state()
602 return err; in esp_init_state()