summaryrefslogtreecommitdiff
path: root/net/ipv6/exthdrs.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-01-19 13:57:33 +0100
committerTakashi Iwai <tiwai@suse.de>2018-01-19 13:57:33 +0100
commitc86d95cb6b7ecda7b7d56e40c24b7d8b9bf9159a (patch)
tree3d868496a15be09dfb3a471e7b9dce24c0216d89 /net/ipv6/exthdrs.c
parent388fdb8f882af67ff8394d9420c1e0e42ba35619 (diff)
parent8f05b9c65d817dd288da5f1c6ecc134b66f8a190 (diff)
Merge tag 'asoc-v4.16-3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.16 Some final updates for the merge window, this brings in some improvements to the ACPI GPIO handling for Intel and a bunch of fixes.
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r--net/ipv6/exthdrs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 83bd75713535..bc68eb661970 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -925,6 +925,15 @@ static void ipv6_push_rthdr4(struct sk_buff *skb, u8 *proto,
sr_phdr->segments[0] = **addr_p;
*addr_p = &sr_ihdr->segments[sr_ihdr->segments_left];
+ if (sr_ihdr->hdrlen > hops * 2) {
+ int tlvs_offset, tlvs_length;
+
+ tlvs_offset = (1 + hops * 2) << 3;
+ tlvs_length = (sr_ihdr->hdrlen - hops * 2) << 3;
+ memcpy((char *)sr_phdr + tlvs_offset,
+ (char *)sr_ihdr + tlvs_offset, tlvs_length);
+ }
+
#ifdef CONFIG_IPV6_SEG6_HMAC
if (sr_has_hmac(sr_phdr)) {
struct net *net = NULL;