diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-11-20 22:39:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:43:32 -0500 |
commit | 4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6 (patch) | |
tree | da3fbec7672ac6b967dfa31cec6c88f468a57fa2 /net/ipv6 | |
parent | 40ba84993d66469d336099c5af74c3da5b73e28d (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')
-rw-r--r-- | net/ipv6/addrconf.c | 8 | ||||
-rw-r--r-- | net/ipv6/af_inet6.c | 14 | ||||
-rw-r--r-- | net/ipv6/ah6.c | 12 | ||||
-rw-r--r-- | net/ipv6/anycast.c | 4 | ||||
-rw-r--r-- | net/ipv6/datagram.c | 34 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 18 | ||||
-rw-r--r-- | net/ipv6/fib6_rules.c | 2 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 18 | ||||
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 12 | ||||
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 18 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 12 | ||||
-rw-r--r-- | net/ipv6/ip6mr.c | 12 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 8 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 6 | ||||
-rw-r--r-- | net/ipv6/mip6.c | 4 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 8 | ||||
-rw-r--r-- | net/ipv6/raw.c | 10 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 4 | ||||
-rw-r--r-- | net/ipv6/route.c | 42 | ||||
-rw-r--r-- | net/ipv6/sit.c | 4 | ||||
-rw-r--r-- | net/ipv6/syncookies.c | 8 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 46 | ||||
-rw-r--r-- | net/ipv6/udp.c | 7 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_beet.c | 8 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_output.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_policy.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_state.c | 4 |
30 files changed, 169 insertions, 174 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index cf88df82e2c2..586051726341 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -636,7 +636,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, | |||
636 | goto out; | 636 | goto out; |
637 | } | 637 | } |
638 | 638 | ||
639 | ipv6_addr_copy(&ifa->addr, addr); | 639 | ifa->addr = *addr; |
640 | 640 | ||
641 | spin_lock_init(&ifa->lock); | 641 | spin_lock_init(&ifa->lock); |
642 | spin_lock_init(&ifa->state_lock); | 642 | spin_lock_init(&ifa->state_lock); |
@@ -1228,7 +1228,7 @@ try_nextdev: | |||
1228 | if (!hiscore->ifa) | 1228 | if (!hiscore->ifa) |
1229 | return -EADDRNOTAVAIL; | 1229 | return -EADDRNOTAVAIL; |
1230 | 1230 | ||
1231 | ipv6_addr_copy(saddr, &hiscore->ifa->addr); | 1231 | *saddr = hiscore->ifa->addr; |
1232 | in6_ifa_put(hiscore->ifa); | 1232 | in6_ifa_put(hiscore->ifa); |
1233 | return 0; | 1233 | return 0; |
1234 | } | 1234 | } |
@@ -1249,7 +1249,7 @@ int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr, | |||
1249 | list_for_each_entry(ifp, &idev->addr_list, if_list) { | 1249 | list_for_each_entry(ifp, &idev->addr_list, if_list) { |
1250 | if (ifp->scope == IFA_LINK && | 1250 | if (ifp->scope == IFA_LINK && |
1251 | !(ifp->flags & banned_flags)) { | 1251 | !(ifp->flags & banned_flags)) { |
1252 | ipv6_addr_copy(addr, &ifp->addr); | 1252 | *addr = ifp->addr; |
1253 | err = 0; | 1253 | err = 0; |
1254 | break; | 1254 | break; |
1255 | } | 1255 | } |
@@ -1700,7 +1700,7 @@ addrconf_prefix_route(struct in6_addr *pfx, int plen, struct net_device *dev, | |||
1700 | .fc_protocol = RTPROT_KERNEL, | 1700 | .fc_protocol = RTPROT_KERNEL, |
1701 | }; | 1701 | }; |
1702 | 1702 | ||
1703 | ipv6_addr_copy(&cfg.fc_dst, pfx); | 1703 | cfg.fc_dst = *pfx; |
1704 | 1704 | ||
1705 | /* Prevent useless cloning on PtP SIT. | 1705 | /* Prevent useless cloning on PtP SIT. |
1706 | This thing is done here expecting that the whole | 1706 | This thing is done here expecting that the whole |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index ee3319487c4f..7694c82e629d 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -361,10 +361,10 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
361 | inet->inet_rcv_saddr = v4addr; | 361 | inet->inet_rcv_saddr = v4addr; |
362 | inet->inet_saddr = v4addr; | 362 | inet->inet_saddr = v4addr; |
363 | 363 | ||
364 | ipv6_addr_copy(&np->rcv_saddr, &addr->sin6_addr); | 364 | np->rcv_saddr = addr->sin6_addr; |
365 | 365 | ||
366 | if (!(addr_type & IPV6_ADDR_MULTICAST)) | 366 | if (!(addr_type & IPV6_ADDR_MULTICAST)) |
367 | ipv6_addr_copy(&np->saddr, &addr->sin6_addr); | 367 | np->saddr = addr->sin6_addr; |
368 | 368 | ||
369 | /* Make sure we are allowed to bind here. */ | 369 | /* Make sure we are allowed to bind here. */ |
370 | if (sk->sk_prot->get_port(sk, snum)) { | 370 | if (sk->sk_prot->get_port(sk, snum)) { |
@@ -458,14 +458,14 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr, | |||
458 | peer == 1) | 458 | peer == 1) |
459 | return -ENOTCONN; | 459 | return -ENOTCONN; |
460 | sin->sin6_port = inet->inet_dport; | 460 | sin->sin6_port = inet->inet_dport; |
461 | ipv6_addr_copy(&sin->sin6_addr, &np->daddr); | 461 | sin->sin6_addr = np->daddr; |
462 | if (np->sndflow) | 462 | if (np->sndflow) |
463 | sin->sin6_flowinfo = np->flow_label; | 463 | sin->sin6_flowinfo = np->flow_label; |
464 | } else { | 464 | } else { |
465 | if (ipv6_addr_any(&np->rcv_saddr)) | 465 | if (ipv6_addr_any(&np->rcv_saddr)) |
466 | ipv6_addr_copy(&sin->sin6_addr, &np->saddr); | 466 | sin->sin6_addr = np->saddr; |
467 | else | 467 | else |
468 | ipv6_addr_copy(&sin->sin6_addr, &np->rcv_saddr); | 468 | sin->sin6_addr = np->rcv_saddr; |
469 | 469 | ||
470 | sin->sin6_port = inet->inet_sport; | 470 | sin->sin6_port = inet->inet_sport; |
471 | } | 471 | } |
@@ -660,8 +660,8 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
660 | 660 | ||
661 | memset(&fl6, 0, sizeof(fl6)); | 661 | memset(&fl6, 0, sizeof(fl6)); |
662 | fl6.flowi6_proto = sk->sk_protocol; | 662 | fl6.flowi6_proto = sk->sk_protocol; |
663 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 663 | fl6.daddr = np->daddr; |
664 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 664 | fl6.saddr = np->saddr; |
665 | fl6.flowlabel = np->flow_label; | 665 | fl6.flowlabel = np->flow_label; |
666 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 666 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
667 | fl6.flowi6_mark = sk->sk_mark; | 667 | fl6.flowi6_mark = sk->sk_mark; |
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 | ||
253 | static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir) | 253 | static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir) |
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 674255f5e6b7..fc1cdcd7041a 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
@@ -75,7 +75,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
75 | if (pac == NULL) | 75 | if (pac == NULL) |
76 | return -ENOMEM; | 76 | return -ENOMEM; |
77 | pac->acl_next = NULL; | 77 | pac->acl_next = NULL; |
78 | ipv6_addr_copy(&pac->acl_addr, addr); | 78 | pac->acl_addr = *addr; |
79 | 79 | ||
80 | rcu_read_lock(); | 80 | rcu_read_lock(); |
81 | if (ifindex == 0) { | 81 | if (ifindex == 0) { |
@@ -296,7 +296,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr) | |||
296 | goto out; | 296 | goto out; |
297 | } | 297 | } |
298 | 298 | ||
299 | ipv6_addr_copy(&aca->aca_addr, addr); | 299 | aca->aca_addr = *addr; |
300 | aca->aca_idev = idev; | 300 | aca->aca_idev = idev; |
301 | aca->aca_rt = rt; | 301 | aca->aca_rt = rt; |
302 | aca->aca_users = 1; | 302 | aca->aca_users = 1; |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 83037af4fa7b..ae08aee1773c 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -71,7 +71,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
71 | flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); | 71 | flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); |
72 | if (flowlabel == NULL) | 72 | if (flowlabel == NULL) |
73 | return -EINVAL; | 73 | return -EINVAL; |
74 | ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst); | 74 | usin->sin6_addr = flowlabel->dst; |
75 | } | 75 | } |
76 | } | 76 | } |
77 | 77 | ||
@@ -143,7 +143,7 @@ ipv4_connected: | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | ipv6_addr_copy(&np->daddr, daddr); | 146 | np->daddr = *daddr; |
147 | np->flow_label = fl6.flowlabel; | 147 | np->flow_label = fl6.flowlabel; |
148 | 148 | ||
149 | inet->inet_dport = usin->sin6_port; | 149 | inet->inet_dport = usin->sin6_port; |
@@ -154,8 +154,8 @@ ipv4_connected: | |||
154 | */ | 154 | */ |
155 | 155 | ||
156 | fl6.flowi6_proto = sk->sk_protocol; | 156 | fl6.flowi6_proto = sk->sk_protocol; |
157 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 157 | fl6.daddr = np->daddr; |
158 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 158 | fl6.saddr = np->saddr; |
159 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 159 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
160 | fl6.flowi6_mark = sk->sk_mark; | 160 | fl6.flowi6_mark = sk->sk_mark; |
161 | fl6.fl6_dport = inet->inet_dport; | 161 | fl6.fl6_dport = inet->inet_dport; |
@@ -179,10 +179,10 @@ ipv4_connected: | |||
179 | /* source address lookup done in ip6_dst_lookup */ | 179 | /* source address lookup done in ip6_dst_lookup */ |
180 | 180 | ||
181 | if (ipv6_addr_any(&np->saddr)) | 181 | if (ipv6_addr_any(&np->saddr)) |
182 | ipv6_addr_copy(&np->saddr, &fl6.saddr); | 182 | np->saddr = fl6.saddr; |
183 | 183 | ||
184 | if (ipv6_addr_any(&np->rcv_saddr)) { | 184 | if (ipv6_addr_any(&np->rcv_saddr)) { |
185 | ipv6_addr_copy(&np->rcv_saddr, &fl6.saddr); | 185 | np->rcv_saddr = fl6.saddr; |
186 | inet->inet_rcv_saddr = LOOPBACK4_IPV6; | 186 | inet->inet_rcv_saddr = LOOPBACK4_IPV6; |
187 | if (sk->sk_prot->rehash) | 187 | if (sk->sk_prot->rehash) |
188 | sk->sk_prot->rehash(sk); | 188 | sk->sk_prot->rehash(sk); |
@@ -257,7 +257,7 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info) | |||
257 | skb_put(skb, sizeof(struct ipv6hdr)); | 257 | skb_put(skb, sizeof(struct ipv6hdr)); |
258 | skb_reset_network_header(skb); | 258 | skb_reset_network_header(skb); |
259 | iph = ipv6_hdr(skb); | 259 | iph = ipv6_hdr(skb); |
260 | ipv6_addr_copy(&iph->daddr, &fl6->daddr); | 260 | iph->daddr = fl6->daddr; |
261 | 261 | ||
262 | serr = SKB_EXT_ERR(skb); | 262 | serr = SKB_EXT_ERR(skb); |
263 | serr->ee.ee_errno = err; | 263 | serr->ee.ee_errno = err; |
@@ -294,7 +294,7 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu) | |||
294 | skb_put(skb, sizeof(struct ipv6hdr)); | 294 | skb_put(skb, sizeof(struct ipv6hdr)); |
295 | skb_reset_network_header(skb); | 295 | skb_reset_network_header(skb); |
296 | iph = ipv6_hdr(skb); | 296 | iph = ipv6_hdr(skb); |
297 | ipv6_addr_copy(&iph->daddr, &fl6->daddr); | 297 | iph->daddr = fl6->daddr; |
298 | 298 | ||
299 | mtu_info = IP6CBMTU(skb); | 299 | mtu_info = IP6CBMTU(skb); |
300 | 300 | ||
@@ -303,7 +303,7 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu) | |||
303 | mtu_info->ip6m_addr.sin6_port = 0; | 303 | mtu_info->ip6m_addr.sin6_port = 0; |
304 | mtu_info->ip6m_addr.sin6_flowinfo = 0; | 304 | mtu_info->ip6m_addr.sin6_flowinfo = 0; |
305 | mtu_info->ip6m_addr.sin6_scope_id = fl6->flowi6_oif; | 305 | mtu_info->ip6m_addr.sin6_scope_id = fl6->flowi6_oif; |
306 | ipv6_addr_copy(&mtu_info->ip6m_addr.sin6_addr, &ipv6_hdr(skb)->daddr); | 306 | mtu_info->ip6m_addr.sin6_addr = ipv6_hdr(skb)->daddr; |
307 | 307 | ||
308 | __skb_pull(skb, skb_tail_pointer(skb) - skb->data); | 308 | __skb_pull(skb, skb_tail_pointer(skb) - skb->data); |
309 | skb_reset_transport_header(skb); | 309 | skb_reset_transport_header(skb); |
@@ -354,8 +354,8 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
354 | sin->sin6_port = serr->port; | 354 | sin->sin6_port = serr->port; |
355 | sin->sin6_scope_id = 0; | 355 | sin->sin6_scope_id = 0; |
356 | if (skb->protocol == htons(ETH_P_IPV6)) { | 356 | if (skb->protocol == htons(ETH_P_IPV6)) { |
357 | ipv6_addr_copy(&sin->sin6_addr, | 357 | sin->sin6_addr = |
358 | (struct in6_addr *)(nh + serr->addr_offset)); | 358 | *(struct in6_addr *)(nh + serr->addr_offset); |
359 | if (np->sndflow) | 359 | if (np->sndflow) |
360 | sin->sin6_flowinfo = | 360 | sin->sin6_flowinfo = |
361 | (*(__be32 *)(nh + serr->addr_offset - 24) & | 361 | (*(__be32 *)(nh + serr->addr_offset - 24) & |
@@ -376,7 +376,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
376 | sin->sin6_flowinfo = 0; | 376 | sin->sin6_flowinfo = 0; |
377 | sin->sin6_scope_id = 0; | 377 | sin->sin6_scope_id = 0; |
378 | if (skb->protocol == htons(ETH_P_IPV6)) { | 378 | if (skb->protocol == htons(ETH_P_IPV6)) { |
379 | ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); | 379 | sin->sin6_addr = ipv6_hdr(skb)->saddr; |
380 | if (np->rxopt.all) | 380 | if (np->rxopt.all) |
381 | datagram_recv_ctl(sk, msg, skb); | 381 | datagram_recv_ctl(sk, msg, skb); |
382 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 382 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
@@ -451,7 +451,7 @@ int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len) | |||
451 | sin->sin6_flowinfo = 0; | 451 | sin->sin6_flowinfo = 0; |
452 | sin->sin6_port = 0; | 452 | sin->sin6_port = 0; |
453 | sin->sin6_scope_id = mtu_info.ip6m_addr.sin6_scope_id; | 453 | sin->sin6_scope_id = mtu_info.ip6m_addr.sin6_scope_id; |
454 | ipv6_addr_copy(&sin->sin6_addr, &mtu_info.ip6m_addr.sin6_addr); | 454 | sin->sin6_addr = mtu_info.ip6m_addr.sin6_addr; |
455 | } | 455 | } |
456 | 456 | ||
457 | put_cmsg(msg, SOL_IPV6, IPV6_PATHMTU, sizeof(mtu_info), &mtu_info); | 457 | put_cmsg(msg, SOL_IPV6, IPV6_PATHMTU, sizeof(mtu_info), &mtu_info); |
@@ -475,7 +475,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
475 | struct in6_pktinfo src_info; | 475 | struct in6_pktinfo src_info; |
476 | 476 | ||
477 | src_info.ipi6_ifindex = opt->iif; | 477 | src_info.ipi6_ifindex = opt->iif; |
478 | ipv6_addr_copy(&src_info.ipi6_addr, &ipv6_hdr(skb)->daddr); | 478 | src_info.ipi6_addr = ipv6_hdr(skb)->daddr; |
479 | put_cmsg(msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); | 479 | put_cmsg(msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); |
480 | } | 480 | } |
481 | 481 | ||
@@ -550,7 +550,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
550 | struct in6_pktinfo src_info; | 550 | struct in6_pktinfo src_info; |
551 | 551 | ||
552 | src_info.ipi6_ifindex = opt->iif; | 552 | src_info.ipi6_ifindex = opt->iif; |
553 | ipv6_addr_copy(&src_info.ipi6_addr, &ipv6_hdr(skb)->daddr); | 553 | src_info.ipi6_addr = ipv6_hdr(skb)->daddr; |
554 | put_cmsg(msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); | 554 | put_cmsg(msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); |
555 | } | 555 | } |
556 | if (np->rxopt.bits.rxohlim) { | 556 | if (np->rxopt.bits.rxohlim) { |
@@ -584,7 +584,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
584 | */ | 584 | */ |
585 | 585 | ||
586 | sin6.sin6_family = AF_INET6; | 586 | sin6.sin6_family = AF_INET6; |
587 | ipv6_addr_copy(&sin6.sin6_addr, &ipv6_hdr(skb)->daddr); | 587 | sin6.sin6_addr = ipv6_hdr(skb)->daddr; |
588 | sin6.sin6_port = ports[1]; | 588 | sin6.sin6_port = ports[1]; |
589 | sin6.sin6_flowinfo = 0; | 589 | sin6.sin6_flowinfo = 0; |
590 | sin6.sin6_scope_id = 0; | 590 | sin6.sin6_scope_id = 0; |
@@ -659,7 +659,7 @@ int datagram_send_ctl(struct net *net, struct sock *sk, | |||
659 | strict ? dev : NULL, 0)) | 659 | strict ? dev : NULL, 0)) |
660 | err = -EINVAL; | 660 | err = -EINVAL; |
661 | else | 661 | else |
662 | ipv6_addr_copy(&fl6->saddr, &src_info->ipi6_addr); | 662 | fl6->saddr = src_info->ipi6_addr; |
663 | } | 663 | } |
664 | 664 | ||
665 | rcu_read_unlock(); | 665 | rcu_read_unlock(); |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index bf22a225f422..3d641b6e9b09 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -243,9 +243,9 @@ static int ipv6_dest_hao(struct sk_buff *skb, int optoff) | |||
243 | if (skb->ip_summed == CHECKSUM_COMPLETE) | 243 | if (skb->ip_summed == CHECKSUM_COMPLETE) |
244 | skb->ip_summed = CHECKSUM_NONE; | 244 | skb->ip_summed = CHECKSUM_NONE; |
245 | 245 | ||
246 | ipv6_addr_copy(&tmp_addr, &ipv6h->saddr); | 246 | tmp_addr = ipv6h->saddr; |
247 | ipv6_addr_copy(&ipv6h->saddr, &hao->addr); | 247 | ipv6h->saddr = hao->addr; |
248 | ipv6_addr_copy(&hao->addr, &tmp_addr); | 248 | hao->addr = tmp_addr; |
249 | 249 | ||
250 | if (skb->tstamp.tv64 == 0) | 250 | if (skb->tstamp.tv64 == 0) |
251 | __net_timestamp(skb); | 251 | __net_timestamp(skb); |
@@ -461,9 +461,9 @@ looped_back: | |||
461 | return -1; | 461 | return -1; |
462 | } | 462 | } |
463 | 463 | ||
464 | ipv6_addr_copy(&daddr, addr); | 464 | daddr = *addr; |
465 | ipv6_addr_copy(addr, &ipv6_hdr(skb)->daddr); | 465 | *addr = ipv6_hdr(skb)->daddr; |
466 | ipv6_addr_copy(&ipv6_hdr(skb)->daddr, &daddr); | 466 | ipv6_hdr(skb)->daddr = daddr; |
467 | 467 | ||
468 | skb_dst_drop(skb); | 468 | skb_dst_drop(skb); |
469 | ip6_route_input(skb); | 469 | ip6_route_input(skb); |
@@ -690,7 +690,7 @@ static void ipv6_push_rthdr(struct sk_buff *skb, u8 *proto, | |||
690 | memcpy(phdr->addr, ihdr->addr + 1, | 690 | memcpy(phdr->addr, ihdr->addr + 1, |
691 | (hops - 1) * sizeof(struct in6_addr)); | 691 | (hops - 1) * sizeof(struct in6_addr)); |
692 | 692 | ||
693 | ipv6_addr_copy(phdr->addr + (hops - 1), *addr_p); | 693 | phdr->addr[hops - 1] = **addr_p; |
694 | *addr_p = ihdr->addr; | 694 | *addr_p = ihdr->addr; |
695 | 695 | ||
696 | phdr->rt_hdr.nexthdr = *proto; | 696 | phdr->rt_hdr.nexthdr = *proto; |
@@ -888,8 +888,8 @@ struct in6_addr *fl6_update_dst(struct flowi6 *fl6, | |||
888 | if (!opt || !opt->srcrt) | 888 | if (!opt || !opt->srcrt) |
889 | return NULL; | 889 | return NULL; |
890 | 890 | ||
891 | ipv6_addr_copy(orig, &fl6->daddr); | 891 | *orig = fl6->daddr; |
892 | ipv6_addr_copy(&fl6->daddr, ((struct rt0_hdr *)opt->srcrt)->addr); | 892 | fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; |
893 | return orig; | 893 | return orig; |
894 | } | 894 | } |
895 | 895 | ||
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 295571576f83..b6c573152067 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -96,7 +96,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | |||
96 | if (!ipv6_prefix_equal(&saddr, &r->src.addr, | 96 | if (!ipv6_prefix_equal(&saddr, &r->src.addr, |
97 | r->src.plen)) | 97 | r->src.plen)) |
98 | goto again; | 98 | goto again; |
99 | ipv6_addr_copy(&flp6->saddr, &saddr); | 99 | flp6->saddr = saddr; |
100 | } | 100 | } |
101 | goto out; | 101 | goto out; |
102 | } | 102 | } |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 90868fb42757..9e2bdccf9143 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -290,9 +290,9 @@ static void mip6_addr_swap(struct sk_buff *skb) | |||
290 | if (likely(off >= 0)) { | 290 | if (likely(off >= 0)) { |
291 | hao = (struct ipv6_destopt_hao *) | 291 | hao = (struct ipv6_destopt_hao *) |
292 | (skb_network_header(skb) + off); | 292 | (skb_network_header(skb) + off); |
293 | ipv6_addr_copy(&tmp, &iph->saddr); | 293 | tmp = iph->saddr; |
294 | ipv6_addr_copy(&iph->saddr, &hao->addr); | 294 | iph->saddr = hao->addr; |
295 | ipv6_addr_copy(&hao->addr, &tmp); | 295 | hao->addr = tmp; |
296 | } | 296 | } |
297 | } | 297 | } |
298 | } | 298 | } |
@@ -444,9 +444,9 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) | |||
444 | 444 | ||
445 | memset(&fl6, 0, sizeof(fl6)); | 445 | memset(&fl6, 0, sizeof(fl6)); |
446 | fl6.flowi6_proto = IPPROTO_ICMPV6; | 446 | fl6.flowi6_proto = IPPROTO_ICMPV6; |
447 | ipv6_addr_copy(&fl6.daddr, &hdr->saddr); | 447 | fl6.daddr = hdr->saddr; |
448 | if (saddr) | 448 | if (saddr) |
449 | ipv6_addr_copy(&fl6.saddr, saddr); | 449 | fl6.saddr = *saddr; |
450 | fl6.flowi6_oif = iif; | 450 | fl6.flowi6_oif = iif; |
451 | fl6.fl6_icmp_type = type; | 451 | fl6.fl6_icmp_type = type; |
452 | fl6.fl6_icmp_code = code; | 452 | fl6.fl6_icmp_code = code; |
@@ -538,9 +538,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
538 | 538 | ||
539 | memset(&fl6, 0, sizeof(fl6)); | 539 | memset(&fl6, 0, sizeof(fl6)); |
540 | fl6.flowi6_proto = IPPROTO_ICMPV6; | 540 | fl6.flowi6_proto = IPPROTO_ICMPV6; |
541 | ipv6_addr_copy(&fl6.daddr, &ipv6_hdr(skb)->saddr); | 541 | fl6.daddr = ipv6_hdr(skb)->saddr; |
542 | if (saddr) | 542 | if (saddr) |
543 | ipv6_addr_copy(&fl6.saddr, saddr); | 543 | fl6.saddr = *saddr; |
544 | fl6.flowi6_oif = skb->dev->ifindex; | 544 | fl6.flowi6_oif = skb->dev->ifindex; |
545 | fl6.fl6_icmp_type = ICMPV6_ECHO_REPLY; | 545 | fl6.fl6_icmp_type = ICMPV6_ECHO_REPLY; |
546 | security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); | 546 | security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); |
@@ -786,8 +786,8 @@ void icmpv6_flow_init(struct sock *sk, struct flowi6 *fl6, | |||
786 | int oif) | 786 | int oif) |
787 | { | 787 | { |
788 | memset(fl6, 0, sizeof(*fl6)); | 788 | memset(fl6, 0, sizeof(*fl6)); |
789 | ipv6_addr_copy(&fl6->saddr, saddr); | 789 | fl6->saddr = *saddr; |
790 | ipv6_addr_copy(&fl6->daddr, daddr); | 790 | fl6->daddr = *daddr; |
791 | fl6->flowi6_proto = IPPROTO_ICMPV6; | 791 | fl6->flowi6_proto = IPPROTO_ICMPV6; |
792 | fl6->fl6_icmp_type = type; | 792 | fl6->fl6_icmp_type = type; |
793 | fl6->fl6_icmp_code = 0; | 793 | fl6->fl6_icmp_code = 0; |
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index fee46d5a2f12..4d7bfb321c75 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -65,9 +65,9 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, | |||
65 | 65 | ||
66 | memset(&fl6, 0, sizeof(fl6)); | 66 | memset(&fl6, 0, sizeof(fl6)); |
67 | fl6.flowi6_proto = IPPROTO_TCP; | 67 | fl6.flowi6_proto = IPPROTO_TCP; |
68 | ipv6_addr_copy(&fl6.daddr, &treq->rmt_addr); | 68 | fl6.daddr = treq->rmt_addr; |
69 | final_p = fl6_update_dst(&fl6, np->opt, &final); | 69 | final_p = fl6_update_dst(&fl6, np->opt, &final); |
70 | ipv6_addr_copy(&fl6.saddr, &treq->loc_addr); | 70 | fl6.saddr = treq->loc_addr; |
71 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 71 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
72 | fl6.flowi6_mark = sk->sk_mark; | 72 | fl6.flowi6_mark = sk->sk_mark; |
73 | fl6.fl6_dport = inet_rsk(req)->rmt_port; | 73 | fl6.fl6_dport = inet_rsk(req)->rmt_port; |
@@ -157,7 +157,7 @@ void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr) | |||
157 | struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) uaddr; | 157 | struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) uaddr; |
158 | 158 | ||
159 | sin6->sin6_family = AF_INET6; | 159 | sin6->sin6_family = AF_INET6; |
160 | ipv6_addr_copy(&sin6->sin6_addr, &np->daddr); | 160 | sin6->sin6_addr = np->daddr; |
161 | sin6->sin6_port = inet_sk(sk)->inet_dport; | 161 | sin6->sin6_port = inet_sk(sk)->inet_dport; |
162 | /* We do not store received flowlabel for TCP */ | 162 | /* We do not store received flowlabel for TCP */ |
163 | sin6->sin6_flowinfo = 0; | 163 | sin6->sin6_flowinfo = 0; |
@@ -215,8 +215,8 @@ int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) | |||
215 | 215 | ||
216 | memset(&fl6, 0, sizeof(fl6)); | 216 | memset(&fl6, 0, sizeof(fl6)); |
217 | fl6.flowi6_proto = sk->sk_protocol; | 217 | fl6.flowi6_proto = sk->sk_protocol; |
218 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 218 | fl6.daddr = np->daddr; |
219 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 219 | fl6.saddr = np->saddr; |
220 | fl6.flowlabel = np->flow_label; | 220 | fl6.flowlabel = np->flow_label; |
221 | IP6_ECN_flow_xmit(sk, fl6.flowlabel); | 221 | IP6_ECN_flow_xmit(sk, fl6.flowlabel); |
222 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 222 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
@@ -246,7 +246,7 @@ int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) | |||
246 | skb_dst_set_noref(skb, dst); | 246 | skb_dst_set_noref(skb, dst); |
247 | 247 | ||
248 | /* Restore final destination back after routing done */ | 248 | /* Restore final destination back after routing done */ |
249 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 249 | fl6.daddr = np->daddr; |
250 | 250 | ||
251 | res = ip6_xmit(sk, skb, &fl6, np->opt, np->tclass); | 251 | res = ip6_xmit(sk, skb, &fl6, np->opt, np->tclass); |
252 | rcu_read_unlock(); | 252 | rcu_read_unlock(); |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 4566dbd916d3..b7867a1215b1 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -386,7 +386,7 @@ fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq, | |||
386 | err = -EINVAL; | 386 | err = -EINVAL; |
387 | goto done; | 387 | goto done; |
388 | } | 388 | } |
389 | ipv6_addr_copy(&fl->dst, &freq->flr_dst); | 389 | fl->dst = freq->flr_dst; |
390 | atomic_set(&fl->users, 1); | 390 | atomic_set(&fl->users, 1); |
391 | switch (fl->share) { | 391 | switch (fl->share) { |
392 | case IPV6_FL_S_EXCL: | 392 | case IPV6_FL_S_EXCL: |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 68ef97f353b6..a24e15557843 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -238,8 +238,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, | |||
238 | hdr->nexthdr = proto; | 238 | hdr->nexthdr = proto; |
239 | hdr->hop_limit = hlimit; | 239 | hdr->hop_limit = hlimit; |
240 | 240 | ||
241 | ipv6_addr_copy(&hdr->saddr, &fl6->saddr); | 241 | hdr->saddr = fl6->saddr; |
242 | ipv6_addr_copy(&hdr->daddr, first_hop); | 242 | hdr->daddr = *first_hop; |
243 | 243 | ||
244 | skb->priority = sk->sk_priority; | 244 | skb->priority = sk->sk_priority; |
245 | skb->mark = sk->sk_mark; | 245 | skb->mark = sk->sk_mark; |
@@ -290,8 +290,8 @@ int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, struct net_device *dev, | |||
290 | hdr->nexthdr = proto; | 290 | hdr->nexthdr = proto; |
291 | hdr->hop_limit = np->hop_limit; | 291 | hdr->hop_limit = np->hop_limit; |
292 | 292 | ||
293 | ipv6_addr_copy(&hdr->saddr, saddr); | 293 | hdr->saddr = *saddr; |
294 | ipv6_addr_copy(&hdr->daddr, daddr); | 294 | hdr->daddr = *daddr; |
295 | 295 | ||
296 | return 0; | 296 | return 0; |
297 | } | 297 | } |
@@ -1063,7 +1063,7 @@ struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, | |||
1063 | if (err) | 1063 | if (err) |
1064 | return ERR_PTR(err); | 1064 | return ERR_PTR(err); |
1065 | if (final_dst) | 1065 | if (final_dst) |
1066 | ipv6_addr_copy(&fl6->daddr, final_dst); | 1066 | fl6->daddr = *final_dst; |
1067 | if (can_sleep) | 1067 | if (can_sleep) |
1068 | fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP; | 1068 | fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP; |
1069 | 1069 | ||
@@ -1099,7 +1099,7 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, | |||
1099 | if (err) | 1099 | if (err) |
1100 | return ERR_PTR(err); | 1100 | return ERR_PTR(err); |
1101 | if (final_dst) | 1101 | if (final_dst) |
1102 | ipv6_addr_copy(&fl6->daddr, final_dst); | 1102 | fl6->daddr = *final_dst; |
1103 | if (can_sleep) | 1103 | if (can_sleep) |
1104 | fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP; | 1104 | fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP; |
1105 | 1105 | ||
@@ -1592,7 +1592,7 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1592 | if (np->pmtudisc < IPV6_PMTUDISC_DO) | 1592 | if (np->pmtudisc < IPV6_PMTUDISC_DO) |
1593 | skb->local_df = 1; | 1593 | skb->local_df = 1; |
1594 | 1594 | ||
1595 | ipv6_addr_copy(final_dst, &fl6->daddr); | 1595 | *final_dst = fl6->daddr; |
1596 | __skb_pull(skb, skb_network_header_len(skb)); | 1596 | __skb_pull(skb, skb_network_header_len(skb)); |
1597 | if (opt && opt->opt_flen) | 1597 | if (opt && opt->opt_flen) |
1598 | ipv6_push_frag_opts(skb, opt, &proto); | 1598 | ipv6_push_frag_opts(skb, opt, &proto); |
@@ -1608,8 +1608,8 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1608 | 1608 | ||
1609 | hdr->hop_limit = np->cork.hop_limit; | 1609 | hdr->hop_limit = np->cork.hop_limit; |
1610 | hdr->nexthdr = proto; | 1610 | hdr->nexthdr = proto; |
1611 | ipv6_addr_copy(&hdr->saddr, &fl6->saddr); | 1611 | hdr->saddr = fl6->saddr; |
1612 | ipv6_addr_copy(&hdr->daddr, final_dst); | 1612 | hdr->daddr = *final_dst; |
1613 | 1613 | ||
1614 | skb->priority = sk->sk_priority; | 1614 | skb->priority = sk->sk_priority; |
1615 | skb->mark = sk->sk_mark; | 1615 | skb->mark = sk->sk_mark; |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 83f0e31c5fbd..f5f98f558acb 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -979,8 +979,8 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
979 | ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield); | 979 | ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield); |
980 | ipv6h->hop_limit = t->parms.hop_limit; | 980 | ipv6h->hop_limit = t->parms.hop_limit; |
981 | ipv6h->nexthdr = proto; | 981 | ipv6h->nexthdr = proto; |
982 | ipv6_addr_copy(&ipv6h->saddr, &fl6->saddr); | 982 | ipv6h->saddr = fl6->saddr; |
983 | ipv6_addr_copy(&ipv6h->daddr, &fl6->daddr); | 983 | ipv6h->daddr = fl6->daddr; |
984 | nf_reset(skb); | 984 | nf_reset(skb); |
985 | pkt_len = skb->len; | 985 | pkt_len = skb->len; |
986 | err = ip6_local_out(skb); | 986 | err = ip6_local_out(skb); |
@@ -1155,8 +1155,8 @@ static void ip6_tnl_link_config(struct ip6_tnl *t) | |||
1155 | memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr)); | 1155 | memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr)); |
1156 | 1156 | ||
1157 | /* Set up flowi template */ | 1157 | /* Set up flowi template */ |
1158 | ipv6_addr_copy(&fl6->saddr, &p->laddr); | 1158 | fl6->saddr = p->laddr; |
1159 | ipv6_addr_copy(&fl6->daddr, &p->raddr); | 1159 | fl6->daddr = p->raddr; |
1160 | fl6->flowi6_oif = p->link; | 1160 | fl6->flowi6_oif = p->link; |
1161 | fl6->flowlabel = 0; | 1161 | fl6->flowlabel = 0; |
1162 | 1162 | ||
@@ -1212,8 +1212,8 @@ static void ip6_tnl_link_config(struct ip6_tnl *t) | |||
1212 | static int | 1212 | static int |
1213 | ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p) | 1213 | ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p) |
1214 | { | 1214 | { |
1215 | ipv6_addr_copy(&t->parms.laddr, &p->laddr); | 1215 | t->parms.laddr = p->laddr; |
1216 | ipv6_addr_copy(&t->parms.raddr, &p->raddr); | 1216 | t->parms.raddr = p->raddr; |
1217 | t->parms.flags = p->flags; | 1217 | t->parms.flags = p->flags; |
1218 | t->parms.hop_limit = p->hop_limit; | 1218 | t->parms.hop_limit = p->hop_limit; |
1219 | t->parms.encap_limit = p->encap_limit; | 1219 | t->parms.encap_limit = p->encap_limit; |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 449a9185b8f2..c7e95c8c579f 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -1105,8 +1105,8 @@ static int ip6mr_cache_report(struct mr6_table *mrt, struct sk_buff *pkt, | |||
1105 | msg->im6_msgtype = MRT6MSG_WHOLEPKT; | 1105 | msg->im6_msgtype = MRT6MSG_WHOLEPKT; |
1106 | msg->im6_mif = mrt->mroute_reg_vif_num; | 1106 | msg->im6_mif = mrt->mroute_reg_vif_num; |
1107 | msg->im6_pad = 0; | 1107 | msg->im6_pad = 0; |
1108 | ipv6_addr_copy(&msg->im6_src, &ipv6_hdr(pkt)->saddr); | 1108 | msg->im6_src = ipv6_hdr(pkt)->saddr; |
1109 | ipv6_addr_copy(&msg->im6_dst, &ipv6_hdr(pkt)->daddr); | 1109 | msg->im6_dst = ipv6_hdr(pkt)->daddr; |
1110 | 1110 | ||
1111 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1111 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
1112 | } else | 1112 | } else |
@@ -1131,8 +1131,8 @@ static int ip6mr_cache_report(struct mr6_table *mrt, struct sk_buff *pkt, | |||
1131 | msg->im6_msgtype = assert; | 1131 | msg->im6_msgtype = assert; |
1132 | msg->im6_mif = mifi; | 1132 | msg->im6_mif = mifi; |
1133 | msg->im6_pad = 0; | 1133 | msg->im6_pad = 0; |
1134 | ipv6_addr_copy(&msg->im6_src, &ipv6_hdr(pkt)->saddr); | 1134 | msg->im6_src = ipv6_hdr(pkt)->saddr; |
1135 | ipv6_addr_copy(&msg->im6_dst, &ipv6_hdr(pkt)->daddr); | 1135 | msg->im6_dst = ipv6_hdr(pkt)->daddr; |
1136 | 1136 | ||
1137 | skb_dst_set(skb, dst_clone(skb_dst(pkt))); | 1137 | skb_dst_set(skb, dst_clone(skb_dst(pkt))); |
1138 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1138 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -2181,8 +2181,8 @@ int ip6mr_get_route(struct net *net, | |||
2181 | iph->payload_len = 0; | 2181 | iph->payload_len = 0; |
2182 | iph->nexthdr = IPPROTO_NONE; | 2182 | iph->nexthdr = IPPROTO_NONE; |
2183 | iph->hop_limit = 0; | 2183 | iph->hop_limit = 0; |
2184 | ipv6_addr_copy(&iph->saddr, &rt->rt6i_src.addr); | 2184 | iph->saddr = rt->rt6i_src.addr; |
2185 | ipv6_addr_copy(&iph->daddr, &rt->rt6i_dst.addr); | 2185 | iph->daddr = rt->rt6i_dst.addr; |
2186 | 2186 | ||
2187 | err = ip6mr_cache_unresolved(mrt, vif, skb2); | 2187 | err = ip6mr_cache_unresolved(mrt, vif, skb2); |
2188 | read_unlock(&mrt_lock); | 2188 | read_unlock(&mrt_lock); |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index c99e3ee9781f..29993b7079a5 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -435,7 +435,7 @@ sticky_done: | |||
435 | goto e_inval; | 435 | goto e_inval; |
436 | 436 | ||
437 | np->sticky_pktinfo.ipi6_ifindex = pkt.ipi6_ifindex; | 437 | np->sticky_pktinfo.ipi6_ifindex = pkt.ipi6_ifindex; |
438 | ipv6_addr_copy(&np->sticky_pktinfo.ipi6_addr, &pkt.ipi6_addr); | 438 | np->sticky_pktinfo.ipi6_addr = pkt.ipi6_addr; |
439 | retv = 0; | 439 | retv = 0; |
440 | break; | 440 | break; |
441 | } | 441 | } |
@@ -980,8 +980,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
980 | struct in6_pktinfo src_info; | 980 | struct in6_pktinfo src_info; |
981 | src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif : | 981 | src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif : |
982 | np->sticky_pktinfo.ipi6_ifindex; | 982 | np->sticky_pktinfo.ipi6_ifindex; |
983 | np->mcast_oif? ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr) : | 983 | src_info.ipi6_addr = np->mcast_oif ? np->daddr : np->sticky_pktinfo.ipi6_addr; |
984 | ipv6_addr_copy(&src_info.ipi6_addr, &(np->sticky_pktinfo.ipi6_addr)); | ||
985 | put_cmsg(&msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); | 984 | put_cmsg(&msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); |
986 | } | 985 | } |
987 | if (np->rxopt.bits.rxhlim) { | 986 | if (np->rxopt.bits.rxhlim) { |
@@ -992,8 +991,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
992 | struct in6_pktinfo src_info; | 991 | struct in6_pktinfo src_info; |
993 | src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif : | 992 | src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif : |
994 | np->sticky_pktinfo.ipi6_ifindex; | 993 | np->sticky_pktinfo.ipi6_ifindex; |
995 | np->mcast_oif? ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr) : | 994 | src_info.ipi6_addr = np->mcast_oif ? np->daddr : np->sticky_pktinfo.ipi6_addr; |
996 | ipv6_addr_copy(&src_info.ipi6_addr, &(np->sticky_pktinfo.ipi6_addr)); | ||
997 | put_cmsg(&msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); | 995 | put_cmsg(&msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); |
998 | } | 996 | } |
999 | if (np->rxopt.bits.rxohlim) { | 997 | if (np->rxopt.bits.rxohlim) { |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 7b94bebb73b1..6cc4d1fb8c13 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -155,7 +155,7 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
155 | return -ENOMEM; | 155 | return -ENOMEM; |
156 | 156 | ||
157 | mc_lst->next = NULL; | 157 | mc_lst->next = NULL; |
158 | ipv6_addr_copy(&mc_lst->addr, addr); | 158 | mc_lst->addr = *addr; |
159 | 159 | ||
160 | rcu_read_lock(); | 160 | rcu_read_lock(); |
161 | if (ifindex == 0) { | 161 | if (ifindex == 0) { |
@@ -858,7 +858,7 @@ int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr) | |||
858 | 858 | ||
859 | setup_timer(&mc->mca_timer, igmp6_timer_handler, (unsigned long)mc); | 859 | setup_timer(&mc->mca_timer, igmp6_timer_handler, (unsigned long)mc); |
860 | 860 | ||
861 | ipv6_addr_copy(&mc->mca_addr, addr); | 861 | mc->mca_addr = *addr; |
862 | mc->idev = idev; /* (reference taken) */ | 862 | mc->idev = idev; /* (reference taken) */ |
863 | mc->mca_users = 1; | 863 | mc->mca_users = 1; |
864 | /* mca_stamp should be updated upon changes */ | 864 | /* mca_stamp should be updated upon changes */ |
@@ -1776,7 +1776,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type) | |||
1776 | hdr = (struct mld_msg *) skb_put(skb, sizeof(struct mld_msg)); | 1776 | hdr = (struct mld_msg *) skb_put(skb, sizeof(struct mld_msg)); |
1777 | memset(hdr, 0, sizeof(struct mld_msg)); | 1777 | memset(hdr, 0, sizeof(struct mld_msg)); |
1778 | hdr->mld_type = type; | 1778 | hdr->mld_type = type; |
1779 | ipv6_addr_copy(&hdr->mld_mca, addr); | 1779 | hdr->mld_mca = *addr; |
1780 | 1780 | ||
1781 | hdr->mld_cksum = csum_ipv6_magic(saddr, snd_addr, len, | 1781 | hdr->mld_cksum = csum_ipv6_magic(saddr, snd_addr, len, |
1782 | IPPROTO_ICMPV6, | 1782 | IPPROTO_ICMPV6, |
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index 43242e6e6103..7e1e0fbfef21 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
@@ -195,8 +195,8 @@ static inline int mip6_report_rl_allow(struct timeval *stamp, | |||
195 | mip6_report_rl.stamp.tv_sec = stamp->tv_sec; | 195 | mip6_report_rl.stamp.tv_sec = stamp->tv_sec; |
196 | mip6_report_rl.stamp.tv_usec = stamp->tv_usec; | 196 | mip6_report_rl.stamp.tv_usec = stamp->tv_usec; |
197 | mip6_report_rl.iif = iif; | 197 | mip6_report_rl.iif = iif; |
198 | ipv6_addr_copy(&mip6_report_rl.src, src); | 198 | mip6_report_rl.src = *src; |
199 | ipv6_addr_copy(&mip6_report_rl.dst, dst); | 199 | mip6_report_rl.dst = *dst; |
200 | allow = 1; | 200 | allow = 1; |
201 | } | 201 | } |
202 | spin_unlock_bh(&mip6_report_rl.lock); | 202 | spin_unlock_bh(&mip6_report_rl.lock); |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d699ddcad4ce..a4769881c5b5 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -481,7 +481,7 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev, | |||
481 | 481 | ||
482 | opt = skb_transport_header(skb) + sizeof(struct icmp6hdr); | 482 | opt = skb_transport_header(skb) + sizeof(struct icmp6hdr); |
483 | if (target) { | 483 | if (target) { |
484 | ipv6_addr_copy((struct in6_addr *)opt, target); | 484 | *(struct in6_addr *)opt = *target; |
485 | opt += sizeof(*target); | 485 | opt += sizeof(*target); |
486 | } | 486 | } |
487 | 487 | ||
@@ -1622,9 +1622,9 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1622 | */ | 1622 | */ |
1623 | 1623 | ||
1624 | addrp = (struct in6_addr *)(icmph + 1); | 1624 | addrp = (struct in6_addr *)(icmph + 1); |
1625 | ipv6_addr_copy(addrp, target); | 1625 | *addrp = *target; |
1626 | addrp++; | 1626 | addrp++; |
1627 | ipv6_addr_copy(addrp, &ipv6_hdr(skb)->daddr); | 1627 | *addrp = ipv6_hdr(skb)->daddr; |
1628 | 1628 | ||
1629 | opt = (u8*) (addrp + 1); | 1629 | opt = (u8*) (addrp + 1); |
1630 | 1630 | ||
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index a5a4c5dd5396..b5a2aa58a03a 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -93,8 +93,8 @@ static void send_reset(struct net *net, struct sk_buff *oldskb) | |||
93 | 93 | ||
94 | memset(&fl6, 0, sizeof(fl6)); | 94 | memset(&fl6, 0, sizeof(fl6)); |
95 | fl6.flowi6_proto = IPPROTO_TCP; | 95 | fl6.flowi6_proto = IPPROTO_TCP; |
96 | ipv6_addr_copy(&fl6.saddr, &oip6h->daddr); | 96 | fl6.saddr = oip6h->daddr; |
97 | ipv6_addr_copy(&fl6.daddr, &oip6h->saddr); | 97 | fl6.daddr = oip6h->saddr; |
98 | fl6.fl6_sport = otcph.dest; | 98 | fl6.fl6_sport = otcph.dest; |
99 | fl6.fl6_dport = otcph.source; | 99 | fl6.fl6_dport = otcph.source; |
100 | security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); | 100 | security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); |
@@ -129,8 +129,8 @@ static void send_reset(struct net *net, struct sk_buff *oldskb) | |||
129 | *(__be32 *)ip6h = htonl(0x60000000 | (tclass << 20)); | 129 | *(__be32 *)ip6h = htonl(0x60000000 | (tclass << 20)); |
130 | ip6h->hop_limit = ip6_dst_hoplimit(dst); | 130 | ip6h->hop_limit = ip6_dst_hoplimit(dst); |
131 | ip6h->nexthdr = IPPROTO_TCP; | 131 | ip6h->nexthdr = IPPROTO_TCP; |
132 | ipv6_addr_copy(&ip6h->saddr, &oip6h->daddr); | 132 | ip6h->saddr = oip6h->daddr; |
133 | ipv6_addr_copy(&ip6h->daddr, &oip6h->saddr); | 133 | ip6h->daddr = oip6h->saddr; |
134 | 134 | ||
135 | tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); | 135 | tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); |
136 | /* Truncate to length (no data) */ | 136 | /* Truncate to length (no data) */ |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index a1aa869a9ce7..a4894f4f1944 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -299,9 +299,9 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
299 | } | 299 | } |
300 | 300 | ||
301 | inet->inet_rcv_saddr = inet->inet_saddr = v4addr; | 301 | inet->inet_rcv_saddr = inet->inet_saddr = v4addr; |
302 | ipv6_addr_copy(&np->rcv_saddr, &addr->sin6_addr); | 302 | np->rcv_saddr = addr->sin6_addr; |
303 | if (!(addr_type & IPV6_ADDR_MULTICAST)) | 303 | if (!(addr_type & IPV6_ADDR_MULTICAST)) |
304 | ipv6_addr_copy(&np->saddr, &addr->sin6_addr); | 304 | np->saddr = addr->sin6_addr; |
305 | err = 0; | 305 | err = 0; |
306 | out_unlock: | 306 | out_unlock: |
307 | rcu_read_unlock(); | 307 | rcu_read_unlock(); |
@@ -495,7 +495,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, | |||
495 | if (sin6) { | 495 | if (sin6) { |
496 | sin6->sin6_family = AF_INET6; | 496 | sin6->sin6_family = AF_INET6; |
497 | sin6->sin6_port = 0; | 497 | sin6->sin6_port = 0; |
498 | ipv6_addr_copy(&sin6->sin6_addr, &ipv6_hdr(skb)->saddr); | 498 | sin6->sin6_addr = ipv6_hdr(skb)->saddr; |
499 | sin6->sin6_flowinfo = 0; | 499 | sin6->sin6_flowinfo = 0; |
500 | sin6->sin6_scope_id = 0; | 500 | sin6->sin6_scope_id = 0; |
501 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 501 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
@@ -846,11 +846,11 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
846 | goto out; | 846 | goto out; |
847 | 847 | ||
848 | if (!ipv6_addr_any(daddr)) | 848 | if (!ipv6_addr_any(daddr)) |
849 | ipv6_addr_copy(&fl6.daddr, daddr); | 849 | fl6.daddr = *daddr; |
850 | else | 850 | else |
851 | fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ | 851 | fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ |
852 | if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) | 852 | if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) |
853 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 853 | fl6.saddr = np->saddr; |
854 | 854 | ||
855 | final_p = fl6_update_dst(&fl6, opt, &final); | 855 | final_p = fl6_update_dst(&fl6, opt, &final); |
856 | 856 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index dfb164e9051a..b69fae76a6f1 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -153,8 +153,8 @@ void ip6_frag_init(struct inet_frag_queue *q, void *a) | |||
153 | 153 | ||
154 | fq->id = arg->id; | 154 | fq->id = arg->id; |
155 | fq->user = arg->user; | 155 | fq->user = arg->user; |
156 | ipv6_addr_copy(&fq->saddr, arg->src); | 156 | fq->saddr = *arg->src; |
157 | ipv6_addr_copy(&fq->daddr, arg->dst); | 157 | fq->daddr = *arg->dst; |
158 | } | 158 | } |
159 | EXPORT_SYMBOL(ip6_frag_init); | 159 | EXPORT_SYMBOL(ip6_frag_init); |
160 | 160 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 05c89be04c9f..2897403fdaff 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -729,14 +729,14 @@ static struct rt6_info *rt6_alloc_cow(const struct rt6_info *ort, | |||
729 | if (rt->rt6i_dst.plen != 128 && | 729 | if (rt->rt6i_dst.plen != 128 && |
730 | ipv6_addr_equal(&ort->rt6i_dst.addr, daddr)) | 730 | ipv6_addr_equal(&ort->rt6i_dst.addr, daddr)) |
731 | rt->rt6i_flags |= RTF_ANYCAST; | 731 | rt->rt6i_flags |= RTF_ANYCAST; |
732 | ipv6_addr_copy(&rt->rt6i_gateway, daddr); | 732 | rt->rt6i_gateway = *daddr; |
733 | } | 733 | } |
734 | 734 | ||
735 | rt->rt6i_flags |= RTF_CACHE; | 735 | rt->rt6i_flags |= RTF_CACHE; |
736 | 736 | ||
737 | #ifdef CONFIG_IPV6_SUBTREES | 737 | #ifdef CONFIG_IPV6_SUBTREES |
738 | if (rt->rt6i_src.plen && saddr) { | 738 | if (rt->rt6i_src.plen && saddr) { |
739 | ipv6_addr_copy(&rt->rt6i_src.addr, saddr); | 739 | rt->rt6i_src.addr = *saddr; |
740 | rt->rt6i_src.plen = 128; | 740 | rt->rt6i_src.plen = 128; |
741 | } | 741 | } |
742 | #endif | 742 | #endif |
@@ -932,7 +932,7 @@ struct dst_entry *ip6_blackhole_route(struct net *net, struct dst_entry *dst_ori | |||
932 | in6_dev_hold(rt->rt6i_idev); | 932 | in6_dev_hold(rt->rt6i_idev); |
933 | rt->rt6i_expires = 0; | 933 | rt->rt6i_expires = 0; |
934 | 934 | ||
935 | ipv6_addr_copy(&rt->rt6i_gateway, &ort->rt6i_gateway); | 935 | rt->rt6i_gateway = ort->rt6i_gateway; |
936 | rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES; | 936 | rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES; |
937 | rt->rt6i_metric = 0; | 937 | rt->rt6i_metric = 0; |
938 | 938 | ||
@@ -1087,7 +1087,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | |||
1087 | rt->dst.output = ip6_output; | 1087 | rt->dst.output = ip6_output; |
1088 | dst_set_neighbour(&rt->dst, neigh); | 1088 | dst_set_neighbour(&rt->dst, neigh); |
1089 | atomic_set(&rt->dst.__refcnt, 1); | 1089 | atomic_set(&rt->dst.__refcnt, 1); |
1090 | ipv6_addr_copy(&rt->rt6i_dst.addr, addr); | 1090 | rt->rt6i_dst.addr = *addr; |
1091 | rt->rt6i_dst.plen = 128; | 1091 | rt->rt6i_dst.plen = 128; |
1092 | rt->rt6i_idev = idev; | 1092 | rt->rt6i_idev = idev; |
1093 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255); | 1093 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255); |
@@ -1324,7 +1324,7 @@ int ip6_route_add(struct fib6_config *cfg) | |||
1324 | int gwa_type; | 1324 | int gwa_type; |
1325 | 1325 | ||
1326 | gw_addr = &cfg->fc_gateway; | 1326 | gw_addr = &cfg->fc_gateway; |
1327 | ipv6_addr_copy(&rt->rt6i_gateway, gw_addr); | 1327 | rt->rt6i_gateway = *gw_addr; |
1328 | gwa_type = ipv6_addr_type(gw_addr); | 1328 | gwa_type = ipv6_addr_type(gw_addr); |
1329 | 1329 | ||
1330 | if (gwa_type != (IPV6_ADDR_LINKLOCAL|IPV6_ADDR_UNICAST)) { | 1330 | if (gwa_type != (IPV6_ADDR_LINKLOCAL|IPV6_ADDR_UNICAST)) { |
@@ -1378,7 +1378,7 @@ int ip6_route_add(struct fib6_config *cfg) | |||
1378 | err = -EINVAL; | 1378 | err = -EINVAL; |
1379 | goto out; | 1379 | goto out; |
1380 | } | 1380 | } |
1381 | ipv6_addr_copy(&rt->rt6i_prefsrc.addr, &cfg->fc_prefsrc); | 1381 | rt->rt6i_prefsrc.addr = cfg->fc_prefsrc; |
1382 | rt->rt6i_prefsrc.plen = 128; | 1382 | rt->rt6i_prefsrc.plen = 128; |
1383 | } else | 1383 | } else |
1384 | rt->rt6i_prefsrc.plen = 0; | 1384 | rt->rt6i_prefsrc.plen = 0; |
@@ -1575,7 +1575,7 @@ static struct rt6_info *ip6_route_redirect(const struct in6_addr *dest, | |||
1575 | }, | 1575 | }, |
1576 | }; | 1576 | }; |
1577 | 1577 | ||
1578 | ipv6_addr_copy(&rdfl.gateway, gateway); | 1578 | rdfl.gateway = *gateway; |
1579 | 1579 | ||
1580 | if (rt6_need_strict(dest)) | 1580 | if (rt6_need_strict(dest)) |
1581 | flags |= RT6_LOOKUP_F_IFACE; | 1581 | flags |= RT6_LOOKUP_F_IFACE; |
@@ -1631,7 +1631,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src, | |||
1631 | if (on_link) | 1631 | if (on_link) |
1632 | nrt->rt6i_flags &= ~RTF_GATEWAY; | 1632 | nrt->rt6i_flags &= ~RTF_GATEWAY; |
1633 | 1633 | ||
1634 | ipv6_addr_copy(&nrt->rt6i_gateway, (struct in6_addr*)neigh->primary_key); | 1634 | nrt->rt6i_gateway = *(struct in6_addr *)neigh->primary_key; |
1635 | dst_set_neighbour(&nrt->dst, neigh_clone(neigh)); | 1635 | dst_set_neighbour(&nrt->dst, neigh_clone(neigh)); |
1636 | 1636 | ||
1637 | if (ip6_ins_rt(nrt)) | 1637 | if (ip6_ins_rt(nrt)) |
@@ -1777,7 +1777,7 @@ static struct rt6_info *ip6_rt_copy(const struct rt6_info *ort, | |||
1777 | rt->dst.output = ort->dst.output; | 1777 | rt->dst.output = ort->dst.output; |
1778 | rt->dst.flags |= DST_HOST; | 1778 | rt->dst.flags |= DST_HOST; |
1779 | 1779 | ||
1780 | ipv6_addr_copy(&rt->rt6i_dst.addr, dest); | 1780 | rt->rt6i_dst.addr = *dest; |
1781 | rt->rt6i_dst.plen = 128; | 1781 | rt->rt6i_dst.plen = 128; |
1782 | dst_copy_metrics(&rt->dst, &ort->dst); | 1782 | dst_copy_metrics(&rt->dst, &ort->dst); |
1783 | rt->dst.error = ort->dst.error; | 1783 | rt->dst.error = ort->dst.error; |
@@ -1787,7 +1787,7 @@ static struct rt6_info *ip6_rt_copy(const struct rt6_info *ort, | |||
1787 | rt->dst.lastuse = jiffies; | 1787 | rt->dst.lastuse = jiffies; |
1788 | rt->rt6i_expires = 0; | 1788 | rt->rt6i_expires = 0; |
1789 | 1789 | ||
1790 | ipv6_addr_copy(&rt->rt6i_gateway, &ort->rt6i_gateway); | 1790 | rt->rt6i_gateway = ort->rt6i_gateway; |
1791 | rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES; | 1791 | rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES; |
1792 | rt->rt6i_metric = 0; | 1792 | rt->rt6i_metric = 0; |
1793 | 1793 | ||
@@ -1850,8 +1850,8 @@ static struct rt6_info *rt6_add_route_info(struct net *net, | |||
1850 | .fc_nlinfo.nl_net = net, | 1850 | .fc_nlinfo.nl_net = net, |
1851 | }; | 1851 | }; |
1852 | 1852 | ||
1853 | ipv6_addr_copy(&cfg.fc_dst, prefix); | 1853 | cfg.fc_dst = *prefix; |
1854 | ipv6_addr_copy(&cfg.fc_gateway, gwaddr); | 1854 | cfg.fc_gateway = *gwaddr; |
1855 | 1855 | ||
1856 | /* We should treat it as a default route if prefix length is 0. */ | 1856 | /* We should treat it as a default route if prefix length is 0. */ |
1857 | if (!prefixlen) | 1857 | if (!prefixlen) |
@@ -1900,7 +1900,7 @@ struct rt6_info *rt6_add_dflt_router(const struct in6_addr *gwaddr, | |||
1900 | .fc_nlinfo.nl_net = dev_net(dev), | 1900 | .fc_nlinfo.nl_net = dev_net(dev), |
1901 | }; | 1901 | }; |
1902 | 1902 | ||
1903 | ipv6_addr_copy(&cfg.fc_gateway, gwaddr); | 1903 | cfg.fc_gateway = *gwaddr; |
1904 | 1904 | ||
1905 | ip6_route_add(&cfg); | 1905 | ip6_route_add(&cfg); |
1906 | 1906 | ||
@@ -1946,9 +1946,9 @@ static void rtmsg_to_fib6_config(struct net *net, | |||
1946 | 1946 | ||
1947 | cfg->fc_nlinfo.nl_net = net; | 1947 | cfg->fc_nlinfo.nl_net = net; |
1948 | 1948 | ||
1949 | ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); | 1949 | cfg->fc_dst = rtmsg->rtmsg_dst; |
1950 | ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); | 1950 | cfg->fc_src = rtmsg->rtmsg_src; |
1951 | ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); | 1951 | cfg->fc_gateway = rtmsg->rtmsg_gateway; |
1952 | } | 1952 | } |
1953 | 1953 | ||
1954 | int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg) | 1954 | int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg) |
@@ -2082,7 +2082,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | |||
2082 | } | 2082 | } |
2083 | dst_set_neighbour(&rt->dst, neigh); | 2083 | dst_set_neighbour(&rt->dst, neigh); |
2084 | 2084 | ||
2085 | ipv6_addr_copy(&rt->rt6i_dst.addr, addr); | 2085 | rt->rt6i_dst.addr = *addr; |
2086 | rt->rt6i_dst.plen = 128; | 2086 | rt->rt6i_dst.plen = 128; |
2087 | rt->rt6i_table = fib6_get_table(net, RT6_TABLE_LOCAL); | 2087 | rt->rt6i_table = fib6_get_table(net, RT6_TABLE_LOCAL); |
2088 | 2088 | ||
@@ -2100,7 +2100,7 @@ int ip6_route_get_saddr(struct net *net, | |||
2100 | struct inet6_dev *idev = ip6_dst_idev((struct dst_entry*)rt); | 2100 | struct inet6_dev *idev = ip6_dst_idev((struct dst_entry*)rt); |
2101 | int err = 0; | 2101 | int err = 0; |
2102 | if (rt->rt6i_prefsrc.plen) | 2102 | if (rt->rt6i_prefsrc.plen) |
2103 | ipv6_addr_copy(saddr, &rt->rt6i_prefsrc.addr); | 2103 | *saddr = rt->rt6i_prefsrc.addr; |
2104 | else | 2104 | else |
2105 | err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL, | 2105 | err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL, |
2106 | daddr, prefs, saddr); | 2106 | daddr, prefs, saddr); |
@@ -2439,7 +2439,7 @@ static int rt6_fill_node(struct net *net, | |||
2439 | 2439 | ||
2440 | if (rt->rt6i_prefsrc.plen) { | 2440 | if (rt->rt6i_prefsrc.plen) { |
2441 | struct in6_addr saddr_buf; | 2441 | struct in6_addr saddr_buf; |
2442 | ipv6_addr_copy(&saddr_buf, &rt->rt6i_prefsrc.addr); | 2442 | saddr_buf = rt->rt6i_prefsrc.addr; |
2443 | NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf); | 2443 | NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf); |
2444 | } | 2444 | } |
2445 | 2445 | ||
@@ -2513,14 +2513,14 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2513 | if (nla_len(tb[RTA_SRC]) < sizeof(struct in6_addr)) | 2513 | if (nla_len(tb[RTA_SRC]) < sizeof(struct in6_addr)) |
2514 | goto errout; | 2514 | goto errout; |
2515 | 2515 | ||
2516 | ipv6_addr_copy(&fl6.saddr, nla_data(tb[RTA_SRC])); | 2516 | fl6.saddr = *(struct in6_addr *)nla_data(tb[RTA_SRC]); |
2517 | } | 2517 | } |
2518 | 2518 | ||
2519 | if (tb[RTA_DST]) { | 2519 | if (tb[RTA_DST]) { |
2520 | if (nla_len(tb[RTA_DST]) < sizeof(struct in6_addr)) | 2520 | if (nla_len(tb[RTA_DST]) < sizeof(struct in6_addr)) |
2521 | goto errout; | 2521 | goto errout; |
2522 | 2522 | ||
2523 | ipv6_addr_copy(&fl6.daddr, nla_data(tb[RTA_DST])); | 2523 | fl6.daddr = *(struct in6_addr *)nla_data(tb[RTA_DST]); |
2524 | } | 2524 | } |
2525 | 2525 | ||
2526 | if (tb[RTA_IIF]) | 2526 | if (tb[RTA_IIF]) |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index cec09382282d..50968f226e75 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -914,7 +914,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) | |||
914 | goto done; | 914 | goto done; |
915 | #ifdef CONFIG_IPV6_SIT_6RD | 915 | #ifdef CONFIG_IPV6_SIT_6RD |
916 | } else { | 916 | } else { |
917 | ipv6_addr_copy(&ip6rd.prefix, &t->ip6rd.prefix); | 917 | ip6rd.prefix = t->ip6rd.prefix; |
918 | ip6rd.relay_prefix = t->ip6rd.relay_prefix; | 918 | ip6rd.relay_prefix = t->ip6rd.relay_prefix; |
919 | ip6rd.prefixlen = t->ip6rd.prefixlen; | 919 | ip6rd.prefixlen = t->ip6rd.prefixlen; |
920 | ip6rd.relay_prefixlen = t->ip6rd.relay_prefixlen; | 920 | ip6rd.relay_prefixlen = t->ip6rd.relay_prefixlen; |
@@ -1082,7 +1082,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1082 | if (relay_prefix != ip6rd.relay_prefix) | 1082 | if (relay_prefix != ip6rd.relay_prefix) |
1083 | goto done; | 1083 | goto done; |
1084 | 1084 | ||
1085 | ipv6_addr_copy(&t->ip6rd.prefix, &prefix); | 1085 | t->ip6rd.prefix = prefix; |
1086 | t->ip6rd.relay_prefix = relay_prefix; | 1086 | t->ip6rd.relay_prefix = relay_prefix; |
1087 | t->ip6rd.prefixlen = ip6rd.prefixlen; | 1087 | t->ip6rd.prefixlen = ip6rd.prefixlen; |
1088 | t->ip6rd.relay_prefixlen = ip6rd.relay_prefixlen; | 1088 | t->ip6rd.relay_prefixlen = ip6rd.relay_prefixlen; |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 5a0d6648bbbc..8e951d8d3b81 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -200,8 +200,8 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
200 | req->mss = mss; | 200 | req->mss = mss; |
201 | ireq->rmt_port = th->source; | 201 | ireq->rmt_port = th->source; |
202 | ireq->loc_port = th->dest; | 202 | ireq->loc_port = th->dest; |
203 | ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); | 203 | ireq6->rmt_addr = ipv6_hdr(skb)->saddr; |
204 | ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); | 204 | ireq6->loc_addr = ipv6_hdr(skb)->daddr; |
205 | if (ipv6_opt_accepted(sk, skb) || | 205 | if (ipv6_opt_accepted(sk, skb) || |
206 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || | 206 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || |
207 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { | 207 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { |
@@ -237,9 +237,9 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
237 | struct flowi6 fl6; | 237 | struct flowi6 fl6; |
238 | memset(&fl6, 0, sizeof(fl6)); | 238 | memset(&fl6, 0, sizeof(fl6)); |
239 | fl6.flowi6_proto = IPPROTO_TCP; | 239 | fl6.flowi6_proto = IPPROTO_TCP; |
240 | ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr); | 240 | fl6.daddr = ireq6->rmt_addr; |
241 | final_p = fl6_update_dst(&fl6, np->opt, &final); | 241 | final_p = fl6_update_dst(&fl6, np->opt, &final); |
242 | ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr); | 242 | fl6.saddr = ireq6->loc_addr; |
243 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 243 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
244 | fl6.flowi6_mark = sk->sk_mark; | 244 | fl6.flowi6_mark = sk->sk_mark; |
245 | fl6.fl6_dport = inet_rsk(req)->rmt_port; | 245 | fl6.fl6_dport = inet_rsk(req)->rmt_port; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 36131d122a6f..fd98dd010fcb 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -153,7 +153,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
153 | flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); | 153 | flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); |
154 | if (flowlabel == NULL) | 154 | if (flowlabel == NULL) |
155 | return -EINVAL; | 155 | return -EINVAL; |
156 | ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst); | 156 | usin->sin6_addr = flowlabel->dst; |
157 | fl6_sock_release(flowlabel); | 157 | fl6_sock_release(flowlabel); |
158 | } | 158 | } |
159 | } | 159 | } |
@@ -195,7 +195,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
195 | tp->write_seq = 0; | 195 | tp->write_seq = 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | ipv6_addr_copy(&np->daddr, &usin->sin6_addr); | 198 | np->daddr = usin->sin6_addr; |
199 | np->flow_label = fl6.flowlabel; | 199 | np->flow_label = fl6.flowlabel; |
200 | 200 | ||
201 | /* | 201 | /* |
@@ -244,9 +244,8 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
244 | saddr = &np->rcv_saddr; | 244 | saddr = &np->rcv_saddr; |
245 | 245 | ||
246 | fl6.flowi6_proto = IPPROTO_TCP; | 246 | fl6.flowi6_proto = IPPROTO_TCP; |
247 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 247 | fl6.daddr = np->daddr; |
248 | ipv6_addr_copy(&fl6.saddr, | 248 | fl6.saddr = saddr ? *saddr : np->saddr; |
249 | (saddr ? saddr : &np->saddr)); | ||
250 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 249 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
251 | fl6.flowi6_mark = sk->sk_mark; | 250 | fl6.flowi6_mark = sk->sk_mark; |
252 | fl6.fl6_dport = usin->sin6_port; | 251 | fl6.fl6_dport = usin->sin6_port; |
@@ -264,11 +263,11 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
264 | 263 | ||
265 | if (saddr == NULL) { | 264 | if (saddr == NULL) { |
266 | saddr = &fl6.saddr; | 265 | saddr = &fl6.saddr; |
267 | ipv6_addr_copy(&np->rcv_saddr, saddr); | 266 | np->rcv_saddr = *saddr; |
268 | } | 267 | } |
269 | 268 | ||
270 | /* set the source address */ | 269 | /* set the source address */ |
271 | ipv6_addr_copy(&np->saddr, saddr); | 270 | np->saddr = *saddr; |
272 | inet->inet_rcv_saddr = LOOPBACK4_IPV6; | 271 | inet->inet_rcv_saddr = LOOPBACK4_IPV6; |
273 | 272 | ||
274 | sk->sk_gso_type = SKB_GSO_TCPV6; | 273 | sk->sk_gso_type = SKB_GSO_TCPV6; |
@@ -398,8 +397,8 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
398 | */ | 397 | */ |
399 | memset(&fl6, 0, sizeof(fl6)); | 398 | memset(&fl6, 0, sizeof(fl6)); |
400 | fl6.flowi6_proto = IPPROTO_TCP; | 399 | fl6.flowi6_proto = IPPROTO_TCP; |
401 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 400 | fl6.daddr = np->daddr; |
402 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 401 | fl6.saddr = np->saddr; |
403 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 402 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
404 | fl6.flowi6_mark = sk->sk_mark; | 403 | fl6.flowi6_mark = sk->sk_mark; |
405 | fl6.fl6_dport = inet->inet_dport; | 404 | fl6.fl6_dport = inet->inet_dport; |
@@ -489,8 +488,8 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req, | |||
489 | 488 | ||
490 | memset(&fl6, 0, sizeof(fl6)); | 489 | memset(&fl6, 0, sizeof(fl6)); |
491 | fl6.flowi6_proto = IPPROTO_TCP; | 490 | fl6.flowi6_proto = IPPROTO_TCP; |
492 | ipv6_addr_copy(&fl6.daddr, &treq->rmt_addr); | 491 | fl6.daddr = treq->rmt_addr; |
493 | ipv6_addr_copy(&fl6.saddr, &treq->loc_addr); | 492 | fl6.saddr = treq->loc_addr; |
494 | fl6.flowlabel = 0; | 493 | fl6.flowlabel = 0; |
495 | fl6.flowi6_oif = treq->iif; | 494 | fl6.flowi6_oif = treq->iif; |
496 | fl6.flowi6_mark = sk->sk_mark; | 495 | fl6.flowi6_mark = sk->sk_mark; |
@@ -512,7 +511,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req, | |||
512 | if (skb) { | 511 | if (skb) { |
513 | __tcp_v6_send_check(skb, &treq->loc_addr, &treq->rmt_addr); | 512 | __tcp_v6_send_check(skb, &treq->loc_addr, &treq->rmt_addr); |
514 | 513 | ||
515 | ipv6_addr_copy(&fl6.daddr, &treq->rmt_addr); | 514 | fl6.daddr = treq->rmt_addr; |
516 | err = ip6_xmit(sk, skb, &fl6, opt, np->tclass); | 515 | err = ip6_xmit(sk, skb, &fl6, opt, np->tclass); |
517 | err = net_xmit_eval(err); | 516 | err = net_xmit_eval(err); |
518 | } | 517 | } |
@@ -617,8 +616,7 @@ static int tcp_v6_md5_do_add(struct sock *sk, const struct in6_addr *peer, | |||
617 | tp->md5sig_info->alloced6++; | 616 | tp->md5sig_info->alloced6++; |
618 | } | 617 | } |
619 | 618 | ||
620 | ipv6_addr_copy(&tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr, | 619 | tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr = *peer; |
621 | peer); | ||
622 | tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.key = newkey; | 620 | tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.key = newkey; |
623 | tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.keylen = newkeylen; | 621 | tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.keylen = newkeylen; |
624 | 622 | ||
@@ -750,8 +748,8 @@ static int tcp_v6_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp, | |||
750 | 748 | ||
751 | bp = &hp->md5_blk.ip6; | 749 | bp = &hp->md5_blk.ip6; |
752 | /* 1. TCP pseudo-header (RFC2460) */ | 750 | /* 1. TCP pseudo-header (RFC2460) */ |
753 | ipv6_addr_copy(&bp->saddr, saddr); | 751 | bp->saddr = *saddr; |
754 | ipv6_addr_copy(&bp->daddr, daddr); | 752 | bp->daddr = *daddr; |
755 | bp->protocol = cpu_to_be32(IPPROTO_TCP); | 753 | bp->protocol = cpu_to_be32(IPPROTO_TCP); |
756 | bp->len = cpu_to_be32(nbytes); | 754 | bp->len = cpu_to_be32(nbytes); |
757 | 755 | ||
@@ -1039,8 +1037,8 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, | |||
1039 | #endif | 1037 | #endif |
1040 | 1038 | ||
1041 | memset(&fl6, 0, sizeof(fl6)); | 1039 | memset(&fl6, 0, sizeof(fl6)); |
1042 | ipv6_addr_copy(&fl6.daddr, &ipv6_hdr(skb)->saddr); | 1040 | fl6.daddr = ipv6_hdr(skb)->saddr; |
1043 | ipv6_addr_copy(&fl6.saddr, &ipv6_hdr(skb)->daddr); | 1041 | fl6.saddr = ipv6_hdr(skb)->daddr; |
1044 | 1042 | ||
1045 | buff->ip_summed = CHECKSUM_PARTIAL; | 1043 | buff->ip_summed = CHECKSUM_PARTIAL; |
1046 | buff->csum = 0; | 1044 | buff->csum = 0; |
@@ -1250,8 +1248,8 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1250 | tcp_openreq_init(req, &tmp_opt, skb); | 1248 | tcp_openreq_init(req, &tmp_opt, skb); |
1251 | 1249 | ||
1252 | treq = inet6_rsk(req); | 1250 | treq = inet6_rsk(req); |
1253 | ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr); | 1251 | treq->rmt_addr = ipv6_hdr(skb)->saddr; |
1254 | ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr); | 1252 | treq->loc_addr = ipv6_hdr(skb)->daddr; |
1255 | if (!want_cookie || tmp_opt.tstamp_ok) | 1253 | if (!want_cookie || tmp_opt.tstamp_ok) |
1256 | TCP_ECN_create_request(req, tcp_hdr(skb)); | 1254 | TCP_ECN_create_request(req, tcp_hdr(skb)); |
1257 | 1255 | ||
@@ -1380,7 +1378,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1380 | 1378 | ||
1381 | ipv6_addr_set_v4mapped(newinet->inet_saddr, &newnp->saddr); | 1379 | ipv6_addr_set_v4mapped(newinet->inet_saddr, &newnp->saddr); |
1382 | 1380 | ||
1383 | ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr); | 1381 | newnp->rcv_saddr = newnp->saddr; |
1384 | 1382 | ||
1385 | inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; | 1383 | inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; |
1386 | newsk->sk_backlog_rcv = tcp_v4_do_rcv; | 1384 | newsk->sk_backlog_rcv = tcp_v4_do_rcv; |
@@ -1444,9 +1442,9 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1444 | 1442 | ||
1445 | memcpy(newnp, np, sizeof(struct ipv6_pinfo)); | 1443 | memcpy(newnp, np, sizeof(struct ipv6_pinfo)); |
1446 | 1444 | ||
1447 | ipv6_addr_copy(&newnp->daddr, &treq->rmt_addr); | 1445 | newnp->daddr = treq->rmt_addr; |
1448 | ipv6_addr_copy(&newnp->saddr, &treq->loc_addr); | 1446 | newnp->saddr = treq->loc_addr; |
1449 | ipv6_addr_copy(&newnp->rcv_saddr, &treq->loc_addr); | 1447 | newnp->rcv_saddr = treq->loc_addr; |
1450 | newsk->sk_bound_dev_if = treq->iif; | 1448 | newsk->sk_bound_dev_if = treq->iif; |
1451 | 1449 | ||
1452 | /* Now IPv6 options... | 1450 | /* Now IPv6 options... |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index ccfb0451b1c3..84ec9db86ee0 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -417,8 +417,7 @@ try_again: | |||
417 | ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, | 417 | ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, |
418 | &sin6->sin6_addr); | 418 | &sin6->sin6_addr); |
419 | else { | 419 | else { |
420 | ipv6_addr_copy(&sin6->sin6_addr, | 420 | sin6->sin6_addr = ipv6_hdr(skb)->saddr; |
421 | &ipv6_hdr(skb)->saddr); | ||
422 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 421 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
423 | sin6->sin6_scope_id = IP6CB(skb)->iif; | 422 | sin6->sin6_scope_id = IP6CB(skb)->iif; |
424 | } | 423 | } |
@@ -1115,11 +1114,11 @@ do_udp_sendmsg: | |||
1115 | 1114 | ||
1116 | fl6.flowi6_proto = sk->sk_protocol; | 1115 | fl6.flowi6_proto = sk->sk_protocol; |
1117 | if (!ipv6_addr_any(daddr)) | 1116 | if (!ipv6_addr_any(daddr)) |
1118 | ipv6_addr_copy(&fl6.daddr, daddr); | 1117 | fl6.daddr = *daddr; |
1119 | else | 1118 | else |
1120 | fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ | 1119 | fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ |
1121 | if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) | 1120 | if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) |
1122 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 1121 | fl6.saddr = np->saddr; |
1123 | fl6.fl6_sport = inet->inet_sport; | 1122 | fl6.fl6_sport = inet->inet_sport; |
1124 | 1123 | ||
1125 | final_p = fl6_update_dst(&fl6, opt, &final); | 1124 | final_p = fl6_update_dst(&fl6, opt, &final); |
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index 3437d7d4eed6..a81ce9450750 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_mode_beet.c | |||
@@ -72,8 +72,8 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
72 | top_iph->nexthdr = IPPROTO_BEETPH; | 72 | top_iph->nexthdr = IPPROTO_BEETPH; |
73 | } | 73 | } |
74 | 74 | ||
75 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); | 75 | top_iph->saddr = *(struct in6_addr *)&x->props.saddr; |
76 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); | 76 | top_iph->daddr = *(struct in6_addr *)&x->id.daddr; |
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
79 | 79 | ||
@@ -99,8 +99,8 @@ static int xfrm6_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
99 | 99 | ||
100 | ip6h = ipv6_hdr(skb); | 100 | ip6h = ipv6_hdr(skb); |
101 | ip6h->payload_len = htons(skb->len - size); | 101 | ip6h->payload_len = htons(skb->len - size); |
102 | ipv6_addr_copy(&ip6h->daddr, (struct in6_addr *) &x->sel.daddr.a6); | 102 | ip6h->daddr = *(struct in6_addr *)&x->sel.daddr.a6; |
103 | ipv6_addr_copy(&ip6h->saddr, (struct in6_addr *) &x->sel.saddr.a6); | 103 | ip6h->saddr = *(struct in6_addr *)&x->sel.saddr.a6; |
104 | err = 0; | 104 | err = 0; |
105 | out: | 105 | out: |
106 | return err; | 106 | return err; |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 4d6edff0498f..261e6e6f487e 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -55,8 +55,8 @@ static int xfrm6_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
55 | dsfield &= ~INET_ECN_MASK; | 55 | dsfield &= ~INET_ECN_MASK; |
56 | ipv6_change_dsfield(top_iph, 0, dsfield); | 56 | ipv6_change_dsfield(top_iph, 0, dsfield); |
57 | top_iph->hop_limit = ip6_dst_hoplimit(dst->child); | 57 | top_iph->hop_limit = ip6_dst_hoplimit(dst->child); |
58 | ipv6_addr_copy(&top_iph->saddr, (const struct in6_addr *)&x->props.saddr); | 58 | top_iph->saddr = *(struct in6_addr *)&x->props.saddr; |
59 | ipv6_addr_copy(&top_iph->daddr, (const struct in6_addr *)&x->id.daddr); | 59 | top_iph->daddr = *(struct in6_addr *)&x->id.daddr; |
60 | return 0; | 60 | return 0; |
61 | } | 61 | } |
62 | 62 | ||
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index faae41737fca..4eeff89c1aaa 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c | |||
@@ -49,7 +49,7 @@ static void xfrm6_local_rxpmtu(struct sk_buff *skb, u32 mtu) | |||
49 | struct sock *sk = skb->sk; | 49 | struct sock *sk = skb->sk; |
50 | 50 | ||
51 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 51 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
52 | ipv6_addr_copy(&fl6.daddr, &ipv6_hdr(skb)->daddr); | 52 | fl6.daddr = ipv6_hdr(skb)->daddr; |
53 | 53 | ||
54 | ipv6_local_rxpmtu(sk, &fl6, mtu); | 54 | ipv6_local_rxpmtu(sk, &fl6, mtu); |
55 | } | 55 | } |
@@ -60,7 +60,7 @@ static void xfrm6_local_error(struct sk_buff *skb, u32 mtu) | |||
60 | struct sock *sk = skb->sk; | 60 | struct sock *sk = skb->sk; |
61 | 61 | ||
62 | fl6.fl6_dport = inet_sk(sk)->inet_dport; | 62 | fl6.fl6_dport = inet_sk(sk)->inet_dport; |
63 | ipv6_addr_copy(&fl6.daddr, &ipv6_hdr(skb)->daddr); | 63 | fl6.daddr = ipv6_hdr(skb)->daddr; |
64 | 64 | ||
65 | ipv6_local_error(sk, EMSGSIZE, &fl6, mtu); | 65 | ipv6_local_error(sk, EMSGSIZE, &fl6, mtu); |
66 | } | 66 | } |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index d879f7efbd10..8ea65e032733 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -132,8 +132,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
132 | memset(fl6, 0, sizeof(struct flowi6)); | 132 | memset(fl6, 0, sizeof(struct flowi6)); |
133 | fl6->flowi6_mark = skb->mark; | 133 | fl6->flowi6_mark = skb->mark; |
134 | 134 | ||
135 | ipv6_addr_copy(&fl6->daddr, reverse ? &hdr->saddr : &hdr->daddr); | 135 | fl6->daddr = reverse ? hdr->saddr : hdr->daddr; |
136 | ipv6_addr_copy(&fl6->saddr, reverse ? &hdr->daddr : &hdr->saddr); | 136 | fl6->saddr = reverse ? hdr->daddr : hdr->saddr; |
137 | 137 | ||
138 | while (nh + offset + 1 < skb->data || | 138 | while (nh + offset + 1 < skb->data || |
139 | pskb_may_pull(skb, nh + offset + 1 - skb->data)) { | 139 | pskb_may_pull(skb, nh + offset + 1 - skb->data)) { |
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c index f2d72b8a3faa..3f2f7c4ab721 100644 --- a/net/ipv6/xfrm6_state.c +++ b/net/ipv6/xfrm6_state.c | |||
@@ -27,8 +27,8 @@ __xfrm6_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl) | |||
27 | 27 | ||
28 | /* Initialize temporary selector matching only | 28 | /* Initialize temporary selector matching only |
29 | * to current session. */ | 29 | * to current session. */ |
30 | ipv6_addr_copy((struct in6_addr *)&sel->daddr, &fl6->daddr); | 30 | *(struct in6_addr *)&sel->daddr = fl6->daddr; |
31 | ipv6_addr_copy((struct in6_addr *)&sel->saddr, &fl6->saddr); | 31 | *(struct in6_addr *)&sel->saddr = fl6->saddr; |
32 | sel->dport = xfrm_flowi_dport(fl, &fl6->uli); | 32 | sel->dport = xfrm_flowi_dport(fl, &fl6->uli); |
33 | sel->dport_mask = htons(0xffff); | 33 | sel->dport_mask = htons(0xffff); |
34 | sel->sport = xfrm_flowi_sport(fl, &fl6->uli); | 34 | sel->sport = xfrm_flowi_sport(fl, &fl6->uli); |