aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ah6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r--net/ipv6/ah6.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 4c0f894d0843..2ae79dbeec2f 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -193,9 +193,9 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des
193 printk(KERN_WARNING "destopt hao: invalid header length: %u\n", hao->length); 193 printk(KERN_WARNING "destopt hao: invalid header length: %u\n", hao->length);
194 goto bad; 194 goto bad;
195 } 195 }
196 ipv6_addr_copy(&final_addr, &hao->addr); 196 final_addr = hao->addr;
197 ipv6_addr_copy(&hao->addr, &iph->saddr); 197 hao->addr = iph->saddr;
198 ipv6_addr_copy(&iph->saddr, &final_addr); 198 iph->saddr = final_addr;
199 } 199 }
200 break; 200 break;
201 } 201 }
@@ -241,13 +241,13 @@ static void ipv6_rearrange_rthdr(struct ipv6hdr *iph, struct ipv6_rt_hdr *rthdr)
241 segments = rthdr->hdrlen >> 1; 241 segments = rthdr->hdrlen >> 1;
242 242
243 addrs = ((struct rt0_hdr *)rthdr)->addr; 243 addrs = ((struct rt0_hdr *)rthdr)->addr;
244 ipv6_addr_copy(&final_addr, addrs + segments - 1); 244 final_addr = addrs[segments - 1];
245 245
246 addrs += segments - segments_left; 246 addrs += segments - segments_left;
247 memmove(addrs + 1, addrs, (segments_left - 1) * sizeof(*addrs)); 247 memmove(addrs + 1, addrs, (segments_left - 1) * sizeof(*addrs));
248 248
249 ipv6_addr_copy(addrs, &iph->daddr); 249 addrs[0] = iph->daddr;
250 ipv6_addr_copy(&iph->daddr, &final_addr); 250 iph->daddr = final_addr;
251} 251}
252 252
253static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir) 253static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir)