aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ah6.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2011-11-20 22:39:03 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-22 16:43:32 -0500
commit4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6 (patch)
treeda3fbec7672ac6b967dfa31cec6c88f468a57fa2 /net/ipv6/ah6.c
parent40ba84993d66469d336099c5af74c3da5b73e28d (diff)
net: remove ipv6_addr_copy()
C assignment can handle struct in6_addr copying. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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)