aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/esp4.c1
-rw-r--r--net/ipv6/esp6.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index d57aa64fa7c7..61fe6e4d23fc 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -981,6 +981,7 @@ static int esp_init_state(struct xfrm_state *x)
981 981
982 switch (encap->encap_type) { 982 switch (encap->encap_type) {
983 default: 983 default:
984 err = -EINVAL;
984 goto error; 985 goto error;
985 case UDP_ENCAP_ESPINUDP: 986 case UDP_ENCAP_ESPINUDP:
986 x->props.header_len += sizeof(struct udphdr); 987 x->props.header_len += sizeof(struct udphdr);
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index a902ff8f59be..1a7f00cd4803 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -890,13 +890,12 @@ static int esp6_init_state(struct xfrm_state *x)
890 x->props.header_len += IPV4_BEET_PHMAXLEN + 890 x->props.header_len += IPV4_BEET_PHMAXLEN +
891 (sizeof(struct ipv6hdr) - sizeof(struct iphdr)); 891 (sizeof(struct ipv6hdr) - sizeof(struct iphdr));
892 break; 892 break;
893 default:
893 case XFRM_MODE_TRANSPORT: 894 case XFRM_MODE_TRANSPORT:
894 break; 895 break;
895 case XFRM_MODE_TUNNEL: 896 case XFRM_MODE_TUNNEL:
896 x->props.header_len += sizeof(struct ipv6hdr); 897 x->props.header_len += sizeof(struct ipv6hdr);
897 break; 898 break;
898 default:
899 goto error;
900 } 899 }
901 900
902 align = ALIGN(crypto_aead_blocksize(aead), 4); 901 align = ALIGN(crypto_aead_blocksize(aead), 4);