aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_multicast.c10
-rw-r--r--net/core/pktgen.c15
-rw-r--r--net/dccp/ipv6.c42
-rw-r--r--net/dccp/minisocks.c4
-rw-r--r--net/ipv4/inet_diag.c18
-rw-r--r--net/ipv4/tcp_minisocks.c4
-rw-r--r--net/ipv6/addrconf.c8
-rw-r--r--net/ipv6/af_inet6.c14
-rw-r--r--net/ipv6/ah6.c12
-rw-r--r--net/ipv6/anycast.c4
-rw-r--r--net/ipv6/datagram.c34
-rw-r--r--net/ipv6/exthdrs.c18
-rw-r--r--net/ipv6/fib6_rules.c2
-rw-r--r--net/ipv6/icmp.c18
-rw-r--r--net/ipv6/inet6_connection_sock.c12
-rw-r--r--net/ipv6/ip6_flowlabel.c2
-rw-r--r--net/ipv6/ip6_output.c18
-rw-r--r--net/ipv6/ip6_tunnel.c12
-rw-r--r--net/ipv6/ip6mr.c12
-rw-r--r--net/ipv6/ipv6_sockglue.c8
-rw-r--r--net/ipv6/mcast.c6
-rw-r--r--net/ipv6/mip6.c4
-rw-r--r--net/ipv6/ndisc.c6
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c8
-rw-r--r--net/ipv6/raw.c10
-rw-r--r--net/ipv6/reassembly.c4
-rw-r--r--net/ipv6/route.c42
-rw-r--r--net/ipv6/sit.c4
-rw-r--r--net/ipv6/syncookies.c8
-rw-r--r--net/ipv6/tcp_ipv6.c46
-rw-r--r--net/ipv6/udp.c7
-rw-r--r--net/ipv6/xfrm6_mode_beet.c8
-rw-r--r--net/ipv6/xfrm6_mode_tunnel.c4
-rw-r--r--net/ipv6/xfrm6_output.c4
-rw-r--r--net/ipv6/xfrm6_policy.c4
-rw-r--r--net/ipv6/xfrm6_state.c4
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_ip.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_net.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_sync.c6
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c10
-rw-r--r--net/netfilter/nf_conntrack_h323_main.c4
-rw-r--r--net/netfilter/xt_TCPMSS.c2
-rw-r--r--net/netfilter/xt_addrtype.c2
-rw-r--r--net/netlabel/netlabel_kapi.c4
-rw-r--r--net/netlabel/netlabel_mgmt.c4
-rw-r--r--net/netlabel/netlabel_unlabeled.c4
-rw-r--r--net/sctp/ipv6.c40
-rw-r--r--net/sctp/socket.c2
-rw-r--r--net/sunrpc/svcauth_unix.c6
-rw-r--r--net/sunrpc/svcsock.c4
-rw-r--r--net/xfrm/xfrm_state.c12
53 files changed, 262 insertions, 282 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index a5f4e5769809..7743e0d109ea 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -127,7 +127,7 @@ static struct net_bridge_mdb_entry *br_mdb_ip6_get(
127{ 127{
128 struct br_ip br_dst; 128 struct br_ip br_dst;
129 129
130 ipv6_addr_copy(&br_dst.u.ip6, dst); 130 br_dst.u.ip6 = *dst;
131 br_dst.proto = htons(ETH_P_IPV6); 131 br_dst.proto = htons(ETH_P_IPV6);
132 132
133 return br_mdb_ip_get(mdb, &br_dst); 133 return br_mdb_ip_get(mdb, &br_dst);
@@ -154,7 +154,7 @@ struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
154 break; 154 break;
155#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 155#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
156 case htons(ETH_P_IPV6): 156 case htons(ETH_P_IPV6):
157 ipv6_addr_copy(&ip.u.ip6, &ipv6_hdr(skb)->daddr); 157 ip.u.ip6 = ipv6_hdr(skb)->daddr;
158 break; 158 break;
159#endif 159#endif
160 default: 160 default:
@@ -474,7 +474,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
474 mldq->mld_cksum = 0; 474 mldq->mld_cksum = 0;
475 mldq->mld_maxdelay = htons((u16)jiffies_to_msecs(interval)); 475 mldq->mld_maxdelay = htons((u16)jiffies_to_msecs(interval));
476 mldq->mld_reserved = 0; 476 mldq->mld_reserved = 0;
477 ipv6_addr_copy(&mldq->mld_mca, group); 477 mldq->mld_mca = *group;
478 478
479 /* checksum */ 479 /* checksum */
480 mldq->mld_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, 480 mldq->mld_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr,
@@ -783,7 +783,7 @@ static int br_ip6_multicast_add_group(struct net_bridge *br,
783 if (!ipv6_is_transient_multicast(group)) 783 if (!ipv6_is_transient_multicast(group))
784 return 0; 784 return 0;
785 785
786 ipv6_addr_copy(&br_group.u.ip6, group); 786 br_group.u.ip6 = *group;
787 br_group.proto = htons(ETH_P_IPV6); 787 br_group.proto = htons(ETH_P_IPV6);
788 788
789 return br_multicast_add_group(br, port, &br_group); 789 return br_multicast_add_group(br, port, &br_group);
@@ -1344,7 +1344,7 @@ static void br_ip6_multicast_leave_group(struct net_bridge *br,
1344 if (!ipv6_is_transient_multicast(group)) 1344 if (!ipv6_is_transient_multicast(group))
1345 return; 1345 return;
1346 1346
1347 ipv6_addr_copy(&br_group.u.ip6, group); 1347 br_group.u.ip6 = *group;
1348 br_group.proto = htons(ETH_P_IPV6); 1348 br_group.proto = htons(ETH_P_IPV6);
1349 1349
1350 br_multicast_leave_group(br, port, &br_group); 1350 br_multicast_leave_group(br, port, &br_group);
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 0001c243b35c..aa53a35a631b 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1304,7 +1304,7 @@ static ssize_t pktgen_if_write(struct file *file,
1304 scan_ip6(buf, pkt_dev->in6_daddr.s6_addr); 1304 scan_ip6(buf, pkt_dev->in6_daddr.s6_addr);
1305 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_daddr); 1305 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_daddr);
1306 1306
1307 ipv6_addr_copy(&pkt_dev->cur_in6_daddr, &pkt_dev->in6_daddr); 1307 pkt_dev->cur_in6_daddr = pkt_dev->in6_daddr;
1308 1308
1309 if (debug) 1309 if (debug)
1310 printk(KERN_DEBUG "pktgen: dst6 set to: %s\n", buf); 1310 printk(KERN_DEBUG "pktgen: dst6 set to: %s\n", buf);
@@ -1327,8 +1327,7 @@ static ssize_t pktgen_if_write(struct file *file,
1327 scan_ip6(buf, pkt_dev->min_in6_daddr.s6_addr); 1327 scan_ip6(buf, pkt_dev->min_in6_daddr.s6_addr);
1328 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->min_in6_daddr); 1328 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->min_in6_daddr);
1329 1329
1330 ipv6_addr_copy(&pkt_dev->cur_in6_daddr, 1330 pkt_dev->cur_in6_daddr = pkt_dev->min_in6_daddr;
1331 &pkt_dev->min_in6_daddr);
1332 if (debug) 1331 if (debug)
1333 printk(KERN_DEBUG "pktgen: dst6_min set to: %s\n", buf); 1332 printk(KERN_DEBUG "pktgen: dst6_min set to: %s\n", buf);
1334 1333
@@ -1371,7 +1370,7 @@ static ssize_t pktgen_if_write(struct file *file,
1371 scan_ip6(buf, pkt_dev->in6_saddr.s6_addr); 1370 scan_ip6(buf, pkt_dev->in6_saddr.s6_addr);
1372 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_saddr); 1371 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_saddr);
1373 1372
1374 ipv6_addr_copy(&pkt_dev->cur_in6_saddr, &pkt_dev->in6_saddr); 1373 pkt_dev->cur_in6_saddr = pkt_dev->in6_saddr;
1375 1374
1376 if (debug) 1375 if (debug)
1377 printk(KERN_DEBUG "pktgen: src6 set to: %s\n", buf); 1376 printk(KERN_DEBUG "pktgen: src6 set to: %s\n", buf);
@@ -2079,9 +2078,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
2079 ifp = ifp->if_next) { 2078 ifp = ifp->if_next) {
2080 if (ifp->scope == IFA_LINK && 2079 if (ifp->scope == IFA_LINK &&
2081 !(ifp->flags & IFA_F_TENTATIVE)) { 2080 !(ifp->flags & IFA_F_TENTATIVE)) {
2082 ipv6_addr_copy(&pkt_dev-> 2081 pkt_dev->cur_in6_saddr = ifp->addr;
2083 cur_in6_saddr,
2084 &ifp->addr);
2085 err = 0; 2082 err = 0;
2086 break; 2083 break;
2087 } 2084 }
@@ -2958,8 +2955,8 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
2958 iph->payload_len = htons(sizeof(struct udphdr) + datalen); 2955 iph->payload_len = htons(sizeof(struct udphdr) + datalen);
2959 iph->nexthdr = IPPROTO_UDP; 2956 iph->nexthdr = IPPROTO_UDP;
2960 2957
2961 ipv6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr); 2958 iph->daddr = pkt_dev->cur_in6_daddr;
2962 ipv6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr); 2959 iph->saddr = pkt_dev->cur_in6_saddr;
2963 2960
2964 skb->mac_header = (skb->network_header - ETH_HLEN - 2961 skb->mac_header = (skb->network_header - ETH_HLEN -
2965 pkt_dev->pkt_overhead); 2962 pkt_dev->pkt_overhead);
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 17ee85ce148d..ce903f747e64 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -150,8 +150,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
150 */ 150 */
151 memset(&fl6, 0, sizeof(fl6)); 151 memset(&fl6, 0, sizeof(fl6));
152 fl6.flowi6_proto = IPPROTO_DCCP; 152 fl6.flowi6_proto = IPPROTO_DCCP;
153 ipv6_addr_copy(&fl6.daddr, &np->daddr); 153 fl6.daddr = np->daddr;
154 ipv6_addr_copy(&fl6.saddr, &np->saddr); 154 fl6.saddr = np->saddr;
155 fl6.flowi6_oif = sk->sk_bound_dev_if; 155 fl6.flowi6_oif = sk->sk_bound_dev_if;
156 fl6.fl6_dport = inet->inet_dport; 156 fl6.fl6_dport = inet->inet_dport;
157 fl6.fl6_sport = inet->inet_sport; 157 fl6.fl6_sport = inet->inet_sport;
@@ -244,8 +244,8 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
244 244
245 memset(&fl6, 0, sizeof(fl6)); 245 memset(&fl6, 0, sizeof(fl6));
246 fl6.flowi6_proto = IPPROTO_DCCP; 246 fl6.flowi6_proto = IPPROTO_DCCP;
247 ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr); 247 fl6.daddr = ireq6->rmt_addr;
248 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr); 248 fl6.saddr = ireq6->loc_addr;
249 fl6.flowlabel = 0; 249 fl6.flowlabel = 0;
250 fl6.flowi6_oif = ireq6->iif; 250 fl6.flowi6_oif = ireq6->iif;
251 fl6.fl6_dport = inet_rsk(req)->rmt_port; 251 fl6.fl6_dport = inet_rsk(req)->rmt_port;
@@ -270,7 +270,7 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
270 dh->dccph_checksum = dccp_v6_csum_finish(skb, 270 dh->dccph_checksum = dccp_v6_csum_finish(skb,
271 &ireq6->loc_addr, 271 &ireq6->loc_addr,
272 &ireq6->rmt_addr); 272 &ireq6->rmt_addr);
273 ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr); 273 fl6.daddr = ireq6->rmt_addr;
274 err = ip6_xmit(sk, skb, &fl6, opt, np->tclass); 274 err = ip6_xmit(sk, skb, &fl6, opt, np->tclass);
275 err = net_xmit_eval(err); 275 err = net_xmit_eval(err);
276 } 276 }
@@ -313,8 +313,8 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
313 &rxip6h->daddr); 313 &rxip6h->daddr);
314 314
315 memset(&fl6, 0, sizeof(fl6)); 315 memset(&fl6, 0, sizeof(fl6));
316 ipv6_addr_copy(&fl6.daddr, &rxip6h->saddr); 316 fl6.daddr = rxip6h->saddr;
317 ipv6_addr_copy(&fl6.saddr, &rxip6h->daddr); 317 fl6.saddr = rxip6h->daddr;
318 318
319 fl6.flowi6_proto = IPPROTO_DCCP; 319 fl6.flowi6_proto = IPPROTO_DCCP;
320 fl6.flowi6_oif = inet6_iif(rxskb); 320 fl6.flowi6_oif = inet6_iif(rxskb);
@@ -419,8 +419,8 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
419 goto drop_and_free; 419 goto drop_and_free;
420 420
421 ireq6 = inet6_rsk(req); 421 ireq6 = inet6_rsk(req);
422 ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); 422 ireq6->rmt_addr = ipv6_hdr(skb)->saddr;
423 ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); 423 ireq6->loc_addr = ipv6_hdr(skb)->daddr;
424 424
425 if (ipv6_opt_accepted(sk, skb) || 425 if (ipv6_opt_accepted(sk, skb) ||
426 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || 426 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
@@ -491,7 +491,7 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
491 491
492 ipv6_addr_set_v4mapped(newinet->inet_saddr, &newnp->saddr); 492 ipv6_addr_set_v4mapped(newinet->inet_saddr, &newnp->saddr);
493 493
494 ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr); 494 newnp->rcv_saddr = newnp->saddr;
495 495
496 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped; 496 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped;
497 newsk->sk_backlog_rcv = dccp_v4_do_rcv; 497 newsk->sk_backlog_rcv = dccp_v4_do_rcv;
@@ -526,9 +526,9 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
526 526
527 memset(&fl6, 0, sizeof(fl6)); 527 memset(&fl6, 0, sizeof(fl6));
528 fl6.flowi6_proto = IPPROTO_DCCP; 528 fl6.flowi6_proto = IPPROTO_DCCP;
529 ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr); 529 fl6.daddr = ireq6->rmt_addr;
530 final_p = fl6_update_dst(&fl6, opt, &final); 530 final_p = fl6_update_dst(&fl6, opt, &final);
531 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr); 531 fl6.saddr = ireq6->loc_addr;
532 fl6.flowi6_oif = sk->sk_bound_dev_if; 532 fl6.flowi6_oif = sk->sk_bound_dev_if;
533 fl6.fl6_dport = inet_rsk(req)->rmt_port; 533 fl6.fl6_dport = inet_rsk(req)->rmt_port;
534 fl6.fl6_sport = inet_rsk(req)->loc_port; 534 fl6.fl6_sport = inet_rsk(req)->loc_port;
@@ -559,9 +559,9 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
559 559
560 memcpy(newnp, np, sizeof(struct ipv6_pinfo)); 560 memcpy(newnp, np, sizeof(struct ipv6_pinfo));
561 561
562 ipv6_addr_copy(&newnp->daddr, &ireq6->rmt_addr); 562 newnp->daddr = ireq6->rmt_addr;
563 ipv6_addr_copy(&newnp->saddr, &ireq6->loc_addr); 563 newnp->saddr = ireq6->loc_addr;
564 ipv6_addr_copy(&newnp->rcv_saddr, &ireq6->loc_addr); 564 newnp->rcv_saddr = ireq6->loc_addr;
565 newsk->sk_bound_dev_if = ireq6->iif; 565 newsk->sk_bound_dev_if = ireq6->iif;
566 566
567 /* Now IPv6 options... 567 /* Now IPv6 options...
@@ -877,7 +877,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
877 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); 877 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel);
878 if (flowlabel == NULL) 878 if (flowlabel == NULL)
879 return -EINVAL; 879 return -EINVAL;
880 ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst); 880 usin->sin6_addr = flowlabel->dst;
881 fl6_sock_release(flowlabel); 881 fl6_sock_release(flowlabel);
882 } 882 }
883 } 883 }
@@ -910,7 +910,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
910 return -EINVAL; 910 return -EINVAL;
911 } 911 }
912 912
913 ipv6_addr_copy(&np->daddr, &usin->sin6_addr); 913 np->daddr = usin->sin6_addr;
914 np->flow_label = fl6.flowlabel; 914 np->flow_label = fl6.flowlabel;
915 915
916 /* 916 /*
@@ -949,8 +949,8 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
949 saddr = &np->rcv_saddr; 949 saddr = &np->rcv_saddr;
950 950
951 fl6.flowi6_proto = IPPROTO_DCCP; 951 fl6.flowi6_proto = IPPROTO_DCCP;
952 ipv6_addr_copy(&fl6.daddr, &np->daddr); 952 fl6.daddr = np->daddr;
953 ipv6_addr_copy(&fl6.saddr, saddr ? saddr : &np->saddr); 953 fl6.saddr = saddr ? *saddr : np->saddr;
954 fl6.flowi6_oif = sk->sk_bound_dev_if; 954 fl6.flowi6_oif = sk->sk_bound_dev_if;
955 fl6.fl6_dport = usin->sin6_port; 955 fl6.fl6_dport = usin->sin6_port;
956 fl6.fl6_sport = inet->inet_sport; 956 fl6.fl6_sport = inet->inet_sport;
@@ -966,11 +966,11 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
966 966
967 if (saddr == NULL) { 967 if (saddr == NULL) {
968 saddr = &fl6.saddr; 968 saddr = &fl6.saddr;
969 ipv6_addr_copy(&np->rcv_saddr, saddr); 969 np->rcv_saddr = *saddr;
970 } 970 }
971 971
972 /* set the source address */ 972 /* set the source address */
973 ipv6_addr_copy(&np->saddr, saddr); 973 np->saddr = *saddr;
974 inet->inet_rcv_saddr = LOOPBACK4_IPV6; 974 inet->inet_rcv_saddr = LOOPBACK4_IPV6;
975 975
976 __ip6_dst_store(sk, dst, NULL, NULL); 976 __ip6_dst_store(sk, dst, NULL, NULL);
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 563b7c74e49d..b50d5fd3d696 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -60,8 +60,8 @@ void dccp_time_wait(struct sock *sk, int state, int timeo)
60 60
61 tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot); 61 tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot);
62 tw6 = inet6_twsk((struct sock *)tw); 62 tw6 = inet6_twsk((struct sock *)tw);
63 ipv6_addr_copy(&tw6->tw_v6_daddr, &np->daddr); 63 tw6->tw_v6_daddr = np->daddr;
64 ipv6_addr_copy(&tw6->tw_v6_rcv_saddr, &np->rcv_saddr); 64 tw6->tw_v6_rcv_saddr = np->rcv_saddr;
65 tw->tw_ipv6only = np->ipv6only; 65 tw->tw_ipv6only = np->ipv6only;
66 } 66 }
67#endif 67#endif
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 68e8ac514383..bbebdecd7234 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -129,10 +129,8 @@ static int inet_csk_diag_fill(struct sock *sk,
129 if (r->idiag_family == AF_INET6) { 129 if (r->idiag_family == AF_INET6) {
130 const struct ipv6_pinfo *np = inet6_sk(sk); 130 const struct ipv6_pinfo *np = inet6_sk(sk);
131 131
132 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src, 132 *(struct in6_addr *)r->id.idiag_src = np->rcv_saddr;
133 &np->rcv_saddr); 133 *(struct in6_addr *)r->id.idiag_dst = np->daddr;
134 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
135 &np->daddr);
136 if (ext & (1 << (INET_DIAG_TCLASS - 1))) 134 if (ext & (1 << (INET_DIAG_TCLASS - 1)))
137 RTA_PUT_U8(skb, INET_DIAG_TCLASS, np->tclass); 135 RTA_PUT_U8(skb, INET_DIAG_TCLASS, np->tclass);
138 } 136 }
@@ -224,10 +222,8 @@ static int inet_twsk_diag_fill(struct inet_timewait_sock *tw,
224 const struct inet6_timewait_sock *tw6 = 222 const struct inet6_timewait_sock *tw6 =
225 inet6_twsk((struct sock *)tw); 223 inet6_twsk((struct sock *)tw);
226 224
227 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src, 225 *(struct in6_addr *)r->id.idiag_src = tw6->tw_v6_rcv_saddr;
228 &tw6->tw_v6_rcv_saddr); 226 *(struct in6_addr *)r->id.idiag_dst = tw6->tw_v6_daddr;
229 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
230 &tw6->tw_v6_daddr);
231 } 227 }
232#endif 228#endif
233 nlh->nlmsg_len = skb_tail_pointer(skb) - previous_tail; 229 nlh->nlmsg_len = skb_tail_pointer(skb) - previous_tail;
@@ -603,10 +599,8 @@ static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk,
603 r->idiag_inode = 0; 599 r->idiag_inode = 0;
604#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 600#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
605 if (r->idiag_family == AF_INET6) { 601 if (r->idiag_family == AF_INET6) {
606 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src, 602 *(struct in6_addr *)r->id.idiag_src = inet6_rsk(req)->loc_addr;
607 &inet6_rsk(req)->loc_addr); 603 *(struct in6_addr *)r->id.idiag_dst = inet6_rsk(req)->rmt_addr;
608 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
609 &inet6_rsk(req)->rmt_addr);
610 } 604 }
611#endif 605#endif
612 nlh->nlmsg_len = skb_tail_pointer(skb) - b; 606 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 0a7e3398c461..945efffdd929 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -343,8 +343,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
343 343
344 tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot); 344 tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot);
345 tw6 = inet6_twsk((struct sock *)tw); 345 tw6 = inet6_twsk((struct sock *)tw);
346 ipv6_addr_copy(&tw6->tw_v6_daddr, &np->daddr); 346 tw6->tw_v6_daddr = np->daddr;
347 ipv6_addr_copy(&tw6->tw_v6_rcv_saddr, &np->rcv_saddr); 347 tw6->tw_v6_rcv_saddr = np->rcv_saddr;
348 tw->tw_tclass = np->tclass; 348 tw->tw_tclass = np->tclass;
349 tw->tw_ipv6only = np->ipv6only; 349 tw->tw_ipv6only = np->ipv6only;
350 } 350 }
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
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)
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)
1212static int 1212static int
1213ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p) 1213ip6_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;
306out_unlock: 306out_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}
159EXPORT_SYMBOL(ip6_frag_init); 159EXPORT_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
1954int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg) 1954int 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;
105out: 105out:
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);
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 1e733e9073d0..bfc0bef170cb 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -712,7 +712,7 @@ static unsigned int pfkey_sockaddr_fill(const xfrm_address_t *xaddr, __be16 port
712 sin6->sin6_family = AF_INET6; 712 sin6->sin6_family = AF_INET6;
713 sin6->sin6_port = port; 713 sin6->sin6_port = port;
714 sin6->sin6_flowinfo = 0; 714 sin6->sin6_flowinfo = 0;
715 ipv6_addr_copy(&sin6->sin6_addr, (const struct in6_addr *)xaddr->a6); 715 sin6->sin6_addr = *(struct in6_addr *)xaddr->a6;
716 sin6->sin6_scope_id = 0; 716 sin6->sin6_scope_id = 0;
717 return 128; 717 return 128;
718 } 718 }
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c
index f2d576e6b769..4015fcaf87bc 100644
--- a/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/net/netfilter/ipset/ip_set_hash_ip.c
@@ -241,7 +241,7 @@ hash_ip6_data_isnull(const struct hash_ip6_elem *elem)
241static inline void 241static inline void
242hash_ip6_data_copy(struct hash_ip6_elem *dst, const struct hash_ip6_elem *src) 242hash_ip6_data_copy(struct hash_ip6_elem *dst, const struct hash_ip6_elem *src)
243{ 243{
244 ipv6_addr_copy(&dst->ip.in6, &src->ip.in6); 244 dst->ip.in6 = src->ip.in6;
245} 245}
246 246
247static inline void 247static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_net.c b/net/netfilter/ipset/ip_set_hash_net.c
index 60d016541c58..28988196775e 100644
--- a/net/netfilter/ipset/ip_set_hash_net.c
+++ b/net/netfilter/ipset/ip_set_hash_net.c
@@ -267,7 +267,7 @@ static inline void
267hash_net6_data_copy(struct hash_net6_elem *dst, 267hash_net6_data_copy(struct hash_net6_elem *dst,
268 const struct hash_net6_elem *src) 268 const struct hash_net6_elem *src)
269{ 269{
270 ipv6_addr_copy(&dst->ip.in6, &src->ip.in6); 270 dst->ip.in6 = src->ip.in6;
271 dst->cidr = src->cidr; 271 dst->cidr = src->cidr;
272} 272}
273 273
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 093cc327020f..611c3359b94d 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -983,7 +983,7 @@ static int ip_vs_out_icmp_v6(struct sk_buff *skb, int *related,
983 if (!cp) 983 if (!cp)
984 return NF_ACCEPT; 984 return NF_ACCEPT;
985 985
986 ipv6_addr_copy(&snet.in6, &iph->saddr); 986 snet.in6 = iph->saddr;
987 return handle_response_icmp(AF_INET6, skb, &snet, cih->nexthdr, cp, 987 return handle_response_icmp(AF_INET6, skb, &snet, cih->nexthdr, cp,
988 pp, offset, sizeof(struct ipv6hdr)); 988 pp, offset, sizeof(struct ipv6hdr));
989} 989}
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index 3cdd479f9b5d..bcf5563e4837 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -603,9 +603,9 @@ sloop:
603#ifdef CONFIG_IP_VS_IPV6 603#ifdef CONFIG_IP_VS_IPV6
604 if (cp->af == AF_INET6) { 604 if (cp->af == AF_INET6) {
605 p += sizeof(struct ip_vs_sync_v6); 605 p += sizeof(struct ip_vs_sync_v6);
606 ipv6_addr_copy(&s->v6.caddr, &cp->caddr.in6); 606 s->v6.caddr = cp->caddr.in6;
607 ipv6_addr_copy(&s->v6.vaddr, &cp->vaddr.in6); 607 s->v6.vaddr = cp->vaddr.in6;
608 ipv6_addr_copy(&s->v6.daddr, &cp->daddr.in6); 608 s->v6.daddr = cp->daddr.in6;
609 } else 609 } else
610#endif 610#endif
611 { 611 {
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index aa2d7206ee8a..38a576d05b4b 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -235,7 +235,7 @@ __ip_vs_route_output_v6(struct net *net, struct in6_addr *daddr,
235 goto out_err; 235 goto out_err;
236 } 236 }
237 } 237 }
238 ipv6_addr_copy(ret_saddr, &fl6.saddr); 238 *ret_saddr = fl6.saddr;
239 return dst; 239 return dst;
240 240
241out_err: 241out_err:
@@ -279,7 +279,7 @@ __ip_vs_get_out_rt_v6(struct sk_buff *skb, struct ip_vs_dest *dest,
279 atomic_read(&rt->dst.__refcnt)); 279 atomic_read(&rt->dst.__refcnt));
280 } 280 }
281 if (ret_saddr) 281 if (ret_saddr)
282 ipv6_addr_copy(ret_saddr, &dest->dst_saddr.in6); 282 *ret_saddr = dest->dst_saddr.in6;
283 spin_unlock(&dest->dst_lock); 283 spin_unlock(&dest->dst_lock);
284 } else { 284 } else {
285 dst = __ip_vs_route_output_v6(net, daddr, ret_saddr, do_xfrm); 285 dst = __ip_vs_route_output_v6(net, daddr, ret_saddr, do_xfrm);
@@ -705,7 +705,7 @@ ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
705 /* mangle the packet */ 705 /* mangle the packet */
706 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp)) 706 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp))
707 goto tx_error; 707 goto tx_error;
708 ipv6_addr_copy(&ipv6_hdr(skb)->daddr, &cp->daddr.in6); 708 ipv6_hdr(skb)->daddr = cp->daddr.in6;
709 709
710 if (!local || !skb->dev) { 710 if (!local || !skb->dev) {
711 /* drop the old route when skb is not shared */ 711 /* drop the old route when skb is not shared */
@@ -967,8 +967,8 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
967 be16_add_cpu(&iph->payload_len, sizeof(*old_iph)); 967 be16_add_cpu(&iph->payload_len, sizeof(*old_iph));
968 iph->priority = old_iph->priority; 968 iph->priority = old_iph->priority;
969 memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl)); 969 memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl));
970 ipv6_addr_copy(&iph->daddr, &cp->daddr.in6); 970 iph->daddr = cp->daddr.in6;
971 ipv6_addr_copy(&iph->saddr, &saddr); 971 iph->saddr = saddr;
972 iph->hop_limit = old_iph->hop_limit; 972 iph->hop_limit = old_iph->hop_limit;
973 973
974 /* Another hack: avoid icmp_send in ip_fragment */ 974 /* Another hack: avoid icmp_send in ip_fragment */
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index f03c2d4539f6..f9368f33e7af 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -750,10 +750,10 @@ static int callforward_do_filter(const union nf_inet_addr *src,
750 struct rt6_info *rt1, *rt2; 750 struct rt6_info *rt1, *rt2;
751 751
752 memset(&fl1, 0, sizeof(fl1)); 752 memset(&fl1, 0, sizeof(fl1));
753 ipv6_addr_copy(&fl1.daddr, &src->in6); 753 fl1.daddr = src->in6;
754 754
755 memset(&fl2, 0, sizeof(fl2)); 755 memset(&fl2, 0, sizeof(fl2));
756 ipv6_addr_copy(&fl2.daddr, &dst->in6); 756 fl2.daddr = dst->in6;
757 if (!afinfo->route(&init_net, (struct dst_entry **)&rt1, 757 if (!afinfo->route(&init_net, (struct dst_entry **)&rt1,
758 flowi6_to_flowi(&fl1), false)) { 758 flowi6_to_flowi(&fl1), false)) {
759 if (!afinfo->route(&init_net, (struct dst_entry **)&rt2, 759 if (!afinfo->route(&init_net, (struct dst_entry **)&rt2,
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index 9e63b43faeed..3ecade3966d5 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -161,7 +161,7 @@ static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb,
161 struct flowi6 *fl6 = &fl.u.ip6; 161 struct flowi6 *fl6 = &fl.u.ip6;
162 162
163 memset(fl6, 0, sizeof(*fl6)); 163 memset(fl6, 0, sizeof(*fl6));
164 ipv6_addr_copy(&fl6->daddr, &ipv6_hdr(skb)->saddr); 164 fl6->daddr = ipv6_hdr(skb)->saddr;
165 } 165 }
166 rcu_read_lock(); 166 rcu_read_lock();
167 ai = nf_get_afinfo(family); 167 ai = nf_get_afinfo(family);
diff --git a/net/netfilter/xt_addrtype.c b/net/netfilter/xt_addrtype.c
index b77d383cec78..c047de2046ad 100644
--- a/net/netfilter/xt_addrtype.c
+++ b/net/netfilter/xt_addrtype.c
@@ -42,7 +42,7 @@ static u32 match_lookup_rt6(struct net *net, const struct net_device *dev,
42 int route_err; 42 int route_err;
43 43
44 memset(&flow, 0, sizeof(flow)); 44 memset(&flow, 0, sizeof(flow));
45 ipv6_addr_copy(&flow.daddr, addr); 45 flow.daddr = *addr;
46 if (dev) 46 if (dev)
47 flow.flowi6_oif = dev->ifindex; 47 flow.flowi6_oif = dev->ifindex;
48 48
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c
index 9c24de10a657..8ed67dccf11d 100644
--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -155,12 +155,12 @@ int netlbl_cfg_unlbl_map_add(const char *domain,
155 if (map6 == NULL) 155 if (map6 == NULL)
156 goto cfg_unlbl_map_add_failure; 156 goto cfg_unlbl_map_add_failure;
157 map6->type = NETLBL_NLTYPE_UNLABELED; 157 map6->type = NETLBL_NLTYPE_UNLABELED;
158 ipv6_addr_copy(&map6->list.addr, addr6); 158 map6->list.addr = *addr6;
159 map6->list.addr.s6_addr32[0] &= mask6->s6_addr32[0]; 159 map6->list.addr.s6_addr32[0] &= mask6->s6_addr32[0];
160 map6->list.addr.s6_addr32[1] &= mask6->s6_addr32[1]; 160 map6->list.addr.s6_addr32[1] &= mask6->s6_addr32[1];
161 map6->list.addr.s6_addr32[2] &= mask6->s6_addr32[2]; 161 map6->list.addr.s6_addr32[2] &= mask6->s6_addr32[2];
162 map6->list.addr.s6_addr32[3] &= mask6->s6_addr32[3]; 162 map6->list.addr.s6_addr32[3] &= mask6->s6_addr32[3];
163 ipv6_addr_copy(&map6->list.mask, mask6); 163 map6->list.mask = *mask6;
164 map6->list.valid = 1; 164 map6->list.valid = 1;
165 ret_val = netlbl_af4list_add(&map4->list, 165 ret_val = netlbl_af4list_add(&map4->list,
166 &addrmap->list4); 166 &addrmap->list4);
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
index bfa555869775..9879300beefd 100644
--- a/net/netlabel/netlabel_mgmt.c
+++ b/net/netlabel/netlabel_mgmt.c
@@ -216,12 +216,12 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
216 ret_val = -ENOMEM; 216 ret_val = -ENOMEM;
217 goto add_failure; 217 goto add_failure;
218 } 218 }
219 ipv6_addr_copy(&map->list.addr, addr); 219 map->list.addr = *addr;
220 map->list.addr.s6_addr32[0] &= mask->s6_addr32[0]; 220 map->list.addr.s6_addr32[0] &= mask->s6_addr32[0];
221 map->list.addr.s6_addr32[1] &= mask->s6_addr32[1]; 221 map->list.addr.s6_addr32[1] &= mask->s6_addr32[1];
222 map->list.addr.s6_addr32[2] &= mask->s6_addr32[2]; 222 map->list.addr.s6_addr32[2] &= mask->s6_addr32[2];
223 map->list.addr.s6_addr32[3] &= mask->s6_addr32[3]; 223 map->list.addr.s6_addr32[3] &= mask->s6_addr32[3];
224 ipv6_addr_copy(&map->list.mask, mask); 224 map->list.mask = *mask;
225 map->list.valid = 1; 225 map->list.valid = 1;
226 map->type = entry->type; 226 map->type = entry->type;
227 227
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index e251c2c88521..049ccd2447d7 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -300,12 +300,12 @@ static int netlbl_unlhsh_add_addr6(struct netlbl_unlhsh_iface *iface,
300 if (entry == NULL) 300 if (entry == NULL)
301 return -ENOMEM; 301 return -ENOMEM;
302 302
303 ipv6_addr_copy(&entry->list.addr, addr); 303 entry->list.addr = *addr;
304 entry->list.addr.s6_addr32[0] &= mask->s6_addr32[0]; 304 entry->list.addr.s6_addr32[0] &= mask->s6_addr32[0];
305 entry->list.addr.s6_addr32[1] &= mask->s6_addr32[1]; 305 entry->list.addr.s6_addr32[1] &= mask->s6_addr32[1];
306 entry->list.addr.s6_addr32[2] &= mask->s6_addr32[2]; 306 entry->list.addr.s6_addr32[2] &= mask->s6_addr32[2];
307 entry->list.addr.s6_addr32[3] &= mask->s6_addr32[3]; 307 entry->list.addr.s6_addr32[3] &= mask->s6_addr32[3];
308 ipv6_addr_copy(&entry->list.mask, mask); 308 entry->list.mask = *mask;
309 entry->list.valid = 1; 309 entry->list.valid = 1;
310 entry->secid = secid; 310 entry->secid = secid;
311 311
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 810427833bcd..91f479121c55 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -107,7 +107,7 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
107 if (addr) { 107 if (addr) {
108 addr->a.v6.sin6_family = AF_INET6; 108 addr->a.v6.sin6_family = AF_INET6;
109 addr->a.v6.sin6_port = 0; 109 addr->a.v6.sin6_port = 0;
110 ipv6_addr_copy(&addr->a.v6.sin6_addr, &ifa->addr); 110 addr->a.v6.sin6_addr = ifa->addr;
111 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex; 111 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex;
112 addr->valid = 1; 112 addr->valid = 1;
113 spin_lock_bh(&sctp_local_addr_lock); 113 spin_lock_bh(&sctp_local_addr_lock);
@@ -219,8 +219,8 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport)
219 /* Fill in the dest address from the route entry passed with the skb 219 /* Fill in the dest address from the route entry passed with the skb
220 * and the source address from the transport. 220 * and the source address from the transport.
221 */ 221 */
222 ipv6_addr_copy(&fl6.daddr, &transport->ipaddr.v6.sin6_addr); 222 fl6.daddr = transport->ipaddr.v6.sin6_addr;
223 ipv6_addr_copy(&fl6.saddr, &transport->saddr.v6.sin6_addr); 223 fl6.saddr = transport->saddr.v6.sin6_addr;
224 224
225 fl6.flowlabel = np->flow_label; 225 fl6.flowlabel = np->flow_label;
226 IP6_ECN_flow_xmit(sk, fl6.flowlabel); 226 IP6_ECN_flow_xmit(sk, fl6.flowlabel);
@@ -231,7 +231,7 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport)
231 231
232 if (np->opt && np->opt->srcrt) { 232 if (np->opt && np->opt->srcrt) {
233 struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; 233 struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
234 ipv6_addr_copy(&fl6.daddr, rt0->addr); 234 fl6.daddr = *rt0->addr;
235 } 235 }
236 236
237 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\n", 237 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\n",
@@ -265,7 +265,7 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
265 sctp_scope_t scope; 265 sctp_scope_t scope;
266 266
267 memset(fl6, 0, sizeof(struct flowi6)); 267 memset(fl6, 0, sizeof(struct flowi6));
268 ipv6_addr_copy(&fl6->daddr, &daddr->v6.sin6_addr); 268 fl6->daddr = daddr->v6.sin6_addr;
269 fl6->fl6_dport = daddr->v6.sin6_port; 269 fl6->fl6_dport = daddr->v6.sin6_port;
270 fl6->flowi6_proto = IPPROTO_SCTP; 270 fl6->flowi6_proto = IPPROTO_SCTP;
271 if (ipv6_addr_type(&daddr->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL) 271 if (ipv6_addr_type(&daddr->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL)
@@ -277,7 +277,7 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
277 fl6->fl6_sport = htons(asoc->base.bind_addr.port); 277 fl6->fl6_sport = htons(asoc->base.bind_addr.port);
278 278
279 if (saddr) { 279 if (saddr) {
280 ipv6_addr_copy(&fl6->saddr, &saddr->v6.sin6_addr); 280 fl6->saddr = saddr->v6.sin6_addr;
281 fl6->fl6_sport = saddr->v6.sin6_port; 281 fl6->fl6_sport = saddr->v6.sin6_port;
282 SCTP_DEBUG_PRINTK("SRC=%pI6 - ", &fl6->saddr); 282 SCTP_DEBUG_PRINTK("SRC=%pI6 - ", &fl6->saddr);
283 } 283 }
@@ -334,7 +334,7 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
334 } 334 }
335 rcu_read_unlock(); 335 rcu_read_unlock();
336 if (baddr) { 336 if (baddr) {
337 ipv6_addr_copy(&fl6->saddr, &baddr->v6.sin6_addr); 337 fl6->saddr = baddr->v6.sin6_addr;
338 fl6->fl6_sport = baddr->v6.sin6_port; 338 fl6->fl6_sport = baddr->v6.sin6_port;
339 dst = ip6_dst_lookup_flow(sk, fl6, NULL, false); 339 dst = ip6_dst_lookup_flow(sk, fl6, NULL, false);
340 } 340 }
@@ -375,7 +375,7 @@ static void sctp_v6_get_saddr(struct sctp_sock *sk,
375 375
376 if (t->dst) { 376 if (t->dst) {
377 saddr->v6.sin6_family = AF_INET6; 377 saddr->v6.sin6_family = AF_INET6;
378 ipv6_addr_copy(&saddr->v6.sin6_addr, &fl6->saddr); 378 saddr->v6.sin6_addr = fl6->saddr;
379 } 379 }
380} 380}
381 381
@@ -400,7 +400,7 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
400 if (addr) { 400 if (addr) {
401 addr->a.v6.sin6_family = AF_INET6; 401 addr->a.v6.sin6_family = AF_INET6;
402 addr->a.v6.sin6_port = 0; 402 addr->a.v6.sin6_port = 0;
403 ipv6_addr_copy(&addr->a.v6.sin6_addr, &ifp->addr); 403 addr->a.v6.sin6_addr = ifp->addr;
404 addr->a.v6.sin6_scope_id = dev->ifindex; 404 addr->a.v6.sin6_scope_id = dev->ifindex;
405 addr->valid = 1; 405 addr->valid = 1;
406 INIT_LIST_HEAD(&addr->list); 406 INIT_LIST_HEAD(&addr->list);
@@ -416,7 +416,6 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
416static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb, 416static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb,
417 int is_saddr) 417 int is_saddr)
418{ 418{
419 void *from;
420 __be16 *port; 419 __be16 *port;
421 struct sctphdr *sh; 420 struct sctphdr *sh;
422 421
@@ -428,12 +427,11 @@ static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb,
428 sh = sctp_hdr(skb); 427 sh = sctp_hdr(skb);
429 if (is_saddr) { 428 if (is_saddr) {
430 *port = sh->source; 429 *port = sh->source;
431 from = &ipv6_hdr(skb)->saddr; 430 addr->v6.sin6_addr = ipv6_hdr(skb)->saddr;
432 } else { 431 } else {
433 *port = sh->dest; 432 *port = sh->dest;
434 from = &ipv6_hdr(skb)->daddr; 433 addr->v6.sin6_addr = ipv6_hdr(skb)->daddr;
435 } 434 }
436 ipv6_addr_copy(&addr->v6.sin6_addr, from);
437} 435}
438 436
439/* Initialize an sctp_addr from a socket. */ 437/* Initialize an sctp_addr from a socket. */
@@ -441,7 +439,7 @@ static void sctp_v6_from_sk(union sctp_addr *addr, struct sock *sk)
441{ 439{
442 addr->v6.sin6_family = AF_INET6; 440 addr->v6.sin6_family = AF_INET6;
443 addr->v6.sin6_port = 0; 441 addr->v6.sin6_port = 0;
444 ipv6_addr_copy(&addr->v6.sin6_addr, &inet6_sk(sk)->rcv_saddr); 442 addr->v6.sin6_addr = inet6_sk(sk)->rcv_saddr;
445} 443}
446 444
447/* Initialize sk->sk_rcv_saddr from sctp_addr. */ 445/* Initialize sk->sk_rcv_saddr from sctp_addr. */
@@ -454,7 +452,7 @@ static void sctp_v6_to_sk_saddr(union sctp_addr *addr, struct sock *sk)
454 inet6_sk(sk)->rcv_saddr.s6_addr32[3] = 452 inet6_sk(sk)->rcv_saddr.s6_addr32[3] =
455 addr->v4.sin_addr.s_addr; 453 addr->v4.sin_addr.s_addr;
456 } else { 454 } else {
457 ipv6_addr_copy(&inet6_sk(sk)->rcv_saddr, &addr->v6.sin6_addr); 455 inet6_sk(sk)->rcv_saddr = addr->v6.sin6_addr;
458 } 456 }
459} 457}
460 458
@@ -467,7 +465,7 @@ static void sctp_v6_to_sk_daddr(union sctp_addr *addr, struct sock *sk)
467 inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff); 465 inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff);
468 inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr; 466 inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr;
469 } else { 467 } else {
470 ipv6_addr_copy(&inet6_sk(sk)->daddr, &addr->v6.sin6_addr); 468 inet6_sk(sk)->daddr = addr->v6.sin6_addr;
471 } 469 }
472} 470}
473 471
@@ -479,7 +477,7 @@ static void sctp_v6_from_addr_param(union sctp_addr *addr,
479 addr->v6.sin6_family = AF_INET6; 477 addr->v6.sin6_family = AF_INET6;
480 addr->v6.sin6_port = port; 478 addr->v6.sin6_port = port;
481 addr->v6.sin6_flowinfo = 0; /* BUG */ 479 addr->v6.sin6_flowinfo = 0; /* BUG */
482 ipv6_addr_copy(&addr->v6.sin6_addr, &param->v6.addr); 480 addr->v6.sin6_addr = param->v6.addr;
483 addr->v6.sin6_scope_id = iif; 481 addr->v6.sin6_scope_id = iif;
484} 482}
485 483
@@ -493,7 +491,7 @@ static int sctp_v6_to_addr_param(const union sctp_addr *addr,
493 491
494 param->v6.param_hdr.type = SCTP_PARAM_IPV6_ADDRESS; 492 param->v6.param_hdr.type = SCTP_PARAM_IPV6_ADDRESS;
495 param->v6.param_hdr.length = htons(length); 493 param->v6.param_hdr.length = htons(length);
496 ipv6_addr_copy(&param->v6.addr, &addr->v6.sin6_addr); 494 param->v6.addr = addr->v6.sin6_addr;
497 495
498 return length; 496 return length;
499} 497}
@@ -504,7 +502,7 @@ static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr,
504{ 502{
505 addr->sa.sa_family = AF_INET6; 503 addr->sa.sa_family = AF_INET6;
506 addr->v6.sin6_port = port; 504 addr->v6.sin6_port = port;
507 ipv6_addr_copy(&addr->v6.sin6_addr, saddr); 505 addr->v6.sin6_addr = *saddr;
508} 506}
509 507
510/* Compare addresses exactly. 508/* Compare addresses exactly.
@@ -759,7 +757,7 @@ static void sctp_inet6_event_msgname(struct sctp_ulpevent *event,
759 } 757 }
760 758
761 sin6from = &asoc->peer.primary_addr.v6; 759 sin6from = &asoc->peer.primary_addr.v6;
762 ipv6_addr_copy(&sin6->sin6_addr, &sin6from->sin6_addr); 760 sin6->sin6_addr = sin6from->sin6_addr;
763 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) 761 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
764 sin6->sin6_scope_id = sin6from->sin6_scope_id; 762 sin6->sin6_scope_id = sin6from->sin6_scope_id;
765 } 763 }
@@ -787,7 +785,7 @@ static void sctp_inet6_skb_msgname(struct sk_buff *skb, char *msgname,
787 } 785 }
788 786
789 /* Otherwise, just copy the v6 address. */ 787 /* Otherwise, just copy the v6 address. */
790 ipv6_addr_copy(&sin6->sin6_addr, &ipv6_hdr(skb)->saddr); 788 sin6->sin6_addr = ipv6_hdr(skb)->saddr;
791 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) { 789 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) {
792 struct sctp_ulpevent *ev = sctp_skb2event(skb); 790 struct sctp_ulpevent *ev = sctp_skb2event(skb);
793 sin6->sin6_scope_id = ev->iif; 791 sin6->sin6_scope_id = ev->iif;
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 13bf5fcdbff1..d56c07a3d435 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -804,7 +804,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
804 struct sockaddr_in6 *sin6; 804 struct sockaddr_in6 *sin6;
805 805
806 sin6 = (struct sockaddr_in6 *)addrs; 806 sin6 = (struct sockaddr_in6 *)addrs;
807 ipv6_addr_copy(&asoc->asconf_addr_del_pending->v6.sin6_addr, &sin6->sin6_addr); 807 asoc->asconf_addr_del_pending->v6.sin6_addr = sin6->sin6_addr;
808 } 808 }
809 SCTP_DEBUG_PRINTK_IPADDR("send_asconf_del_ip: keep the last address asoc: %p ", 809 SCTP_DEBUG_PRINTK_IPADDR("send_asconf_del_ip: keep the last address asoc: %p ",
810 " at %p\n", asoc, asoc->asconf_addr_del_pending, 810 " at %p\n", asoc, asoc->asconf_addr_del_pending,
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index ce136323da8b..fe258fc37f50 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -134,7 +134,7 @@ static void ip_map_init(struct cache_head *cnew, struct cache_head *citem)
134 struct ip_map *item = container_of(citem, struct ip_map, h); 134 struct ip_map *item = container_of(citem, struct ip_map, h);
135 135
136 strcpy(new->m_class, item->m_class); 136 strcpy(new->m_class, item->m_class);
137 ipv6_addr_copy(&new->m_addr, &item->m_addr); 137 new->m_addr = item->m_addr;
138} 138}
139static void update(struct cache_head *cnew, struct cache_head *citem) 139static void update(struct cache_head *cnew, struct cache_head *citem)
140{ 140{
@@ -274,7 +274,7 @@ static int ip_map_show(struct seq_file *m,
274 } 274 }
275 im = container_of(h, struct ip_map, h); 275 im = container_of(h, struct ip_map, h);
276 /* class addr domain */ 276 /* class addr domain */
277 ipv6_addr_copy(&addr, &im->m_addr); 277 addr = im->m_addr;
278 278
279 if (test_bit(CACHE_VALID, &h->flags) && 279 if (test_bit(CACHE_VALID, &h->flags) &&
280 !test_bit(CACHE_NEGATIVE, &h->flags)) 280 !test_bit(CACHE_NEGATIVE, &h->flags))
@@ -297,7 +297,7 @@ static struct ip_map *__ip_map_lookup(struct cache_detail *cd, char *class,
297 struct cache_head *ch; 297 struct cache_head *ch;
298 298
299 strcpy(ip.m_class, class); 299 strcpy(ip.m_class, class);
300 ipv6_addr_copy(&ip.m_addr, addr); 300 ip.m_addr = *addr;
301 ch = sunrpc_cache_lookup(cd, &ip.h, 301 ch = sunrpc_cache_lookup(cd, &ip.h,
302 hash_str(class, IP_HASHBITS) ^ 302 hash_str(class, IP_HASHBITS) ^
303 hash_ip6(*addr)); 303 hash_ip6(*addr));
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 71bed1c1c77a..4653286fcc9e 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -157,7 +157,7 @@ static void svc_set_cmsg_data(struct svc_rqst *rqstp, struct cmsghdr *cmh)
157 cmh->cmsg_level = SOL_IPV6; 157 cmh->cmsg_level = SOL_IPV6;
158 cmh->cmsg_type = IPV6_PKTINFO; 158 cmh->cmsg_type = IPV6_PKTINFO;
159 pki->ipi6_ifindex = daddr->sin6_scope_id; 159 pki->ipi6_ifindex = daddr->sin6_scope_id;
160 ipv6_addr_copy(&pki->ipi6_addr, &daddr->sin6_addr); 160 pki->ipi6_addr = daddr->sin6_addr;
161 cmh->cmsg_len = CMSG_LEN(sizeof(*pki)); 161 cmh->cmsg_len = CMSG_LEN(sizeof(*pki));
162 } 162 }
163 break; 163 break;
@@ -523,7 +523,7 @@ static int svc_udp_get_dest_address6(struct svc_rqst *rqstp,
523 return 0; 523 return 0;
524 524
525 daddr->sin6_family = AF_INET6; 525 daddr->sin6_family = AF_INET6;
526 ipv6_addr_copy(&daddr->sin6_addr, &pki->ipi6_addr); 526 daddr->sin6_addr = pki->ipi6_addr;
527 daddr->sin6_scope_id = pki->ipi6_ifindex; 527 daddr->sin6_scope_id = pki->ipi6_ifindex;
528 return 1; 528 return 1;
529} 529}
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 9414b9c5b1e4..5b228f97d4b3 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1035,16 +1035,12 @@ static struct xfrm_state *__find_acq_core(struct net *net, struct xfrm_mark *m,
1035 break; 1035 break;
1036 1036
1037 case AF_INET6: 1037 case AF_INET6:
1038 ipv6_addr_copy((struct in6_addr *)x->sel.daddr.a6, 1038 *(struct in6_addr *)x->sel.daddr.a6 = *(struct in6_addr *)daddr;
1039 (const struct in6_addr *)daddr); 1039 *(struct in6_addr *)x->sel.saddr.a6 = *(struct in6_addr *)saddr;
1040 ipv6_addr_copy((struct in6_addr *)x->sel.saddr.a6,
1041 (const struct in6_addr *)saddr);
1042 x->sel.prefixlen_d = 128; 1040 x->sel.prefixlen_d = 128;
1043 x->sel.prefixlen_s = 128; 1041 x->sel.prefixlen_s = 128;
1044 ipv6_addr_copy((struct in6_addr *)x->props.saddr.a6, 1042 *(struct in6_addr *)x->props.saddr.a6 = *(struct in6_addr *)saddr;
1045 (const struct in6_addr *)saddr); 1043 *(struct in6_addr *)x->id.daddr.a6 = *(struct in6_addr *)daddr;
1046 ipv6_addr_copy((struct in6_addr *)x->id.daddr.a6,
1047 (const struct in6_addr *)daddr);
1048 break; 1044 break;
1049 } 1045 }
1050 1046