summaryrefslogtreecommitdiff
path: root/net/ipv6/xfrm6_mode_transport.c
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2017-06-12 23:18:55 +0530
committerSumit Semwal <sumit.semwal@linaro.org>2017-06-12 23:18:55 +0530
commit8cee66e33cf2e740a18c23a785694c7f83e24ee3 (patch)
treef9ac8294378b518b5bb214ccd955f3fbf0763524 /net/ipv6/xfrm6_mode_transport.c
parent611a390fbe4eb5e1ec2a7d535343c676c79fe292 (diff)
parent01f99201744662692ca6888ee9aeee36776f47fb (diff)
Merge remote-tracking branch 'stable-rc/linux-4.4.y' into 4.4.72-rc-hikey4.4-72-rc-hikey-201706124.4.y-rc-hikey
Resolved conficts: Makefile fs/xfs/xfs_xattr.c net/bridge/br_stp_if.c net/ipv6/ip6_offload.c Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'net/ipv6/xfrm6_mode_transport.c')
-rw-r--r--net/ipv6/xfrm6_mode_transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c
index 4e344105b3fd..1d3bbe6e1183 100644
--- a/net/ipv6/xfrm6_mode_transport.c
+++ b/net/ipv6/xfrm6_mode_transport.c
@@ -28,6 +28,8 @@ static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb)
iph = ipv6_hdr(skb);
hdr_len = x->type->hdr_offset(x, skb, &prevhdr);
+ if (hdr_len < 0)
+ return hdr_len;
skb_set_mac_header(skb, (prevhdr - x->props.header_len) - skb->data);
skb_set_network_header(skb, -x->props.header_len);
skb->transport_header = skb->network_header + hdr_len;