Commit 4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6

Authored by Alexey Dobriyan
Committed by David S. Miller
1 parent 40ba84993d

net: remove ipv6_addr_copy()

C assignment can handle struct in6_addr copying.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 66 changed files with 288 additions and 315 deletions Side-by-side Diff

drivers/infiniband/core/addr.c
... ... @@ -243,8 +243,8 @@
243 243 int ret;
244 244  
245 245 memset(&fl6, 0, sizeof fl6);
246   - ipv6_addr_copy(&fl6.daddr, &dst_in->sin6_addr);
247   - ipv6_addr_copy(&fl6.saddr, &src_in->sin6_addr);
  246 + fl6.daddr = dst_in->sin6_addr;
  247 + fl6.saddr = src_in->sin6_addr;
248 248 fl6.flowi6_oif = addr->bound_dev_if;
249 249  
250 250 dst = ip6_route_output(&init_net, NULL, &fl6);
... ... @@ -258,7 +258,7 @@
258 258 goto put;
259 259  
260 260 src_in->sin6_family = AF_INET6;
261   - ipv6_addr_copy(&src_in->sin6_addr, &fl6.saddr);
  261 + src_in->sin6_addr = fl6.saddr;
262 262 }
263 263  
264 264 if (dst->dev->flags & IFF_LOOPBACK) {
drivers/infiniband/core/cma.c
... ... @@ -2005,11 +2005,11 @@
2005 2005 if (cma_zero_addr(src)) {
2006 2006 dst = (struct sockaddr *) &id_priv->id.route.addr.dst_addr;
2007 2007 if ((src->sa_family = dst->sa_family) == AF_INET) {
2008   - ((struct sockaddr_in *) src)->sin_addr.s_addr =
2009   - ((struct sockaddr_in *) dst)->sin_addr.s_addr;
  2008 + ((struct sockaddr_in *)src)->sin_addr =
  2009 + ((struct sockaddr_in *)dst)->sin_addr;
2010 2010 } else {
2011   - ipv6_addr_copy(&((struct sockaddr_in6 *) src)->sin6_addr,
2012   - &((struct sockaddr_in6 *) dst)->sin6_addr);
  2011 + ((struct sockaddr_in6 *)src)->sin6_addr =
  2012 + ((struct sockaddr_in6 *)dst)->sin6_addr;
2013 2013 }
2014 2014 }
2015 2015  
drivers/net/bonding/bond_ipv6.c
... ... @@ -50,7 +50,7 @@
50 50 struct inet6_ifaddr *ifa
51 51 = list_first_entry(&idev->addr_list,
52 52 struct inet6_ifaddr, if_list);
53   - ipv6_addr_copy(addr, &ifa->addr);
  53 + *addr = ifa->addr;
54 54 } else
55 55 ipv6_addr_set(addr, 0, 0, 0, 0);
56 56  
... ... @@ -168,8 +168,7 @@
168 168 switch (event) {
169 169 case NETDEV_UP:
170 170 if (ipv6_addr_any(&bond->master_ipv6))
171   - ipv6_addr_copy(&bond->master_ipv6,
172   - &ifa->addr);
  171 + bond->master_ipv6 = ifa->addr;
173 172 return NOTIFY_OK;
174 173 case NETDEV_DOWN:
175 174 if (ipv6_addr_equal(&bond->master_ipv6,
... ... @@ -191,8 +190,7 @@
191 190 switch (event) {
192 191 case NETDEV_UP:
193 192 if (ipv6_addr_any(&vlan->vlan_ipv6))
194   - ipv6_addr_copy(&vlan->vlan_ipv6,
195   - &ifa->addr);
  193 + vlan->vlan_ipv6 = ifa->addr;
196 194 return NOTIFY_OK;
197 195 case NETDEV_DOWN:
198 196 if (ipv6_addr_equal(&vlan->vlan_ipv6,
drivers/net/ethernet/broadcom/cnic.c
... ... @@ -3475,7 +3475,7 @@
3475 3475 struct flowi6 fl6;
3476 3476  
3477 3477 memset(&fl6, 0, sizeof(fl6));
3478   - ipv6_addr_copy(&fl6.daddr, &dst_addr->sin6_addr);
  3478 + fl6.daddr = dst_addr->sin6_addr;
3479 3479 if (ipv6_addr_type(&fl6.daddr) & IPV6_ADDR_LINKLOCAL)
3480 3480 fl6.flowi6_oif = dst_addr->sin6_scope_id;
3481 3481  
... ... @@ -281,7 +281,7 @@
281 281 } else {
282 282 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &addr;
283 283 struct sockaddr_in6 *ret6 = (struct sockaddr_in6 *) retaddr;
284   - ipv6_addr_copy(&ret6->sin6_addr, &in6->sin6_addr);
  284 + ret6->sin6_addr = in6->sin6_addr;
285 285 }
286 286  
287 287 return 0;
include/linux/sunrpc/clnt.h
... ... @@ -237,7 +237,7 @@
237 237 struct sockaddr_in6 *dsin6 = (struct sockaddr_in6 *) dst;
238 238  
239 239 dsin6->sin6_family = ssin6->sin6_family;
240   - ipv6_addr_copy(&dsin6->sin6_addr, &ssin6->sin6_addr);
  240 + dsin6->sin6_addr = ssin6->sin6_addr;
241 241 return true;
242 242 }
243 243 #else /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */
include/net/inetpeer.h
... ... @@ -86,7 +86,7 @@
86 86 {
87 87 struct inetpeer_addr daddr;
88 88  
89   - ipv6_addr_copy((struct in6_addr *)daddr.addr.a6, v6daddr);
  89 + *(struct in6_addr *)daddr.addr.a6 = *v6daddr;
90 90 daddr.family = AF_INET6;
91 91 return inet_getpeer(&daddr, create);
92 92 }
... ... @@ -21,7 +21,7 @@
21 21 #include <linux/netfilter.h> /* for union nf_inet_addr */
22 22 #include <linux/ip.h>
23 23 #include <linux/ipv6.h> /* for struct ipv6hdr */
24   -#include <net/ipv6.h> /* for ipv6_addr_copy */
  24 +#include <net/ipv6.h>
25 25 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
26 26 #include <net/netfilter/nf_conntrack.h>
27 27 #endif
... ... @@ -119,8 +119,8 @@
119 119 const struct ipv6hdr *iph = nh;
120 120 iphdr->len = sizeof(struct ipv6hdr);
121 121 iphdr->protocol = iph->nexthdr;
122   - ipv6_addr_copy(&iphdr->saddr.in6, &iph->saddr);
123   - ipv6_addr_copy(&iphdr->daddr.in6, &iph->daddr);
  122 + iphdr->saddr.in6 = iph->saddr;
  123 + iphdr->daddr.in6 = iph->daddr;
124 124 } else
125 125 #endif
126 126 {
... ... @@ -137,7 +137,7 @@
137 137 {
138 138 #ifdef CONFIG_IP_VS_IPV6
139 139 if (af == AF_INET6)
140   - ipv6_addr_copy(&dst->in6, &src->in6);
  140 + dst->in6 = src->in6;
141 141 else
142 142 #endif
143 143 dst->ip = src->ip;
... ... @@ -309,11 +309,6 @@
309 309 ((a1->s6_addr32[3] ^ a2->s6_addr32[3]) & m->s6_addr32[3]));
310 310 }
311 311  
312   -static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2)
313   -{
314   - memcpy(a1, a2, sizeof(struct in6_addr));
315   -}
316   -
317 312 static inline void ipv6_addr_prefix(struct in6_addr *pfx,
318 313 const struct in6_addr *addr,
319 314 int plen)
... ... @@ -1217,8 +1217,8 @@
1217 1217 memcpy(&daddr->a4, &fl->u.ip4.daddr, sizeof(daddr->a4));
1218 1218 break;
1219 1219 case AF_INET6:
1220   - ipv6_addr_copy((struct in6_addr *)&saddr->a6, &fl->u.ip6.saddr);
1221   - ipv6_addr_copy((struct in6_addr *)&daddr->a6, &fl->u.ip6.daddr);
  1220 + *(struct in6_addr *)saddr->a6 = fl->u.ip6.saddr;
  1221 + *(struct in6_addr *)daddr->a6 = fl->u.ip6.daddr;
1222 1222 break;
1223 1223 }
1224 1224 }
net/bridge/br_multicast.c
... ... @@ -127,7 +127,7 @@
127 127 {
128 128 struct br_ip br_dst;
129 129  
130   - ipv6_addr_copy(&br_dst.u.ip6, dst);
  130 + br_dst.u.ip6 = *dst;
131 131 br_dst.proto = htons(ETH_P_IPV6);
132 132  
133 133 return br_mdb_ip_get(mdb, &br_dst);
... ... @@ -154,7 +154,7 @@
154 154 break;
155 155 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
156 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 158 break;
159 159 #endif
160 160 default:
... ... @@ -474,7 +474,7 @@
474 474 mldq->mld_cksum = 0;
475 475 mldq->mld_maxdelay = htons((u16)jiffies_to_msecs(interval));
476 476 mldq->mld_reserved = 0;
477   - ipv6_addr_copy(&mldq->mld_mca, group);
  477 + mldq->mld_mca = *group;
478 478  
479 479 /* checksum */
480 480 mldq->mld_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr,
... ... @@ -783,7 +783,7 @@
783 783 if (!ipv6_is_transient_multicast(group))
784 784 return 0;
785 785  
786   - ipv6_addr_copy(&br_group.u.ip6, group);
  786 + br_group.u.ip6 = *group;
787 787 br_group.proto = htons(ETH_P_IPV6);
788 788  
789 789 return br_multicast_add_group(br, port, &br_group);
... ... @@ -1344,7 +1344,7 @@
1344 1344 if (!ipv6_is_transient_multicast(group))
1345 1345 return;
1346 1346  
1347   - ipv6_addr_copy(&br_group.u.ip6, group);
  1347 + br_group.u.ip6 = *group;
1348 1348 br_group.proto = htons(ETH_P_IPV6);
1349 1349  
1350 1350 br_multicast_leave_group(br, port, &br_group);
... ... @@ -1304,7 +1304,7 @@
1304 1304 scan_ip6(buf, pkt_dev->in6_daddr.s6_addr);
1305 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 1309 if (debug)
1310 1310 printk(KERN_DEBUG "pktgen: dst6 set to: %s\n", buf);
... ... @@ -1327,8 +1327,7 @@
1327 1327 scan_ip6(buf, pkt_dev->min_in6_daddr.s6_addr);
1328 1328 snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->min_in6_daddr);
1329 1329  
1330   - ipv6_addr_copy(&pkt_dev->cur_in6_daddr,
1331   - &pkt_dev->min_in6_daddr);
  1330 + pkt_dev->cur_in6_daddr = pkt_dev->min_in6_daddr;
1332 1331 if (debug)
1333 1332 printk(KERN_DEBUG "pktgen: dst6_min set to: %s\n", buf);
1334 1333  
... ... @@ -1371,7 +1370,7 @@
1371 1370 scan_ip6(buf, pkt_dev->in6_saddr.s6_addr);
1372 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 1375 if (debug)
1377 1376 printk(KERN_DEBUG "pktgen: src6 set to: %s\n", buf);
... ... @@ -2079,9 +2078,7 @@
2079 2078 ifp = ifp->if_next) {
2080 2079 if (ifp->scope == IFA_LINK &&
2081 2080 !(ifp->flags & IFA_F_TENTATIVE)) {
2082   - ipv6_addr_copy(&pkt_dev->
2083   - cur_in6_saddr,
2084   - &ifp->addr);
  2081 + pkt_dev->cur_in6_saddr = ifp->addr;
2085 2082 err = 0;
2086 2083 break;
2087 2084 }
... ... @@ -2958,8 +2955,8 @@
2958 2955 iph->payload_len = htons(sizeof(struct udphdr) + datalen);
2959 2956 iph->nexthdr = IPPROTO_UDP;
2960 2957  
2961   - ipv6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr);
2962   - ipv6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr);
  2958 + iph->daddr = pkt_dev->cur_in6_daddr;
  2959 + iph->saddr = pkt_dev->cur_in6_saddr;
2963 2960  
2964 2961 skb->mac_header = (skb->network_header - ETH_HLEN -
2965 2962 pkt_dev->pkt_overhead);
... ... @@ -150,8 +150,8 @@
150 150 */
151 151 memset(&fl6, 0, sizeof(fl6));
152 152 fl6.flowi6_proto = IPPROTO_DCCP;
153   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
154   - ipv6_addr_copy(&fl6.saddr, &np->saddr);
  153 + fl6.daddr = np->daddr;
  154 + fl6.saddr = np->saddr;
155 155 fl6.flowi6_oif = sk->sk_bound_dev_if;
156 156 fl6.fl6_dport = inet->inet_dport;
157 157 fl6.fl6_sport = inet->inet_sport;
... ... @@ -244,8 +244,8 @@
244 244  
245 245 memset(&fl6, 0, sizeof(fl6));
246 246 fl6.flowi6_proto = IPPROTO_DCCP;
247   - ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr);
248   - ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr);
  247 + fl6.daddr = ireq6->rmt_addr;
  248 + fl6.saddr = ireq6->loc_addr;
249 249 fl6.flowlabel = 0;
250 250 fl6.flowi6_oif = ireq6->iif;
251 251 fl6.fl6_dport = inet_rsk(req)->rmt_port;
... ... @@ -270,7 +270,7 @@
270 270 dh->dccph_checksum = dccp_v6_csum_finish(skb,
271 271 &ireq6->loc_addr,
272 272 &ireq6->rmt_addr);
273   - ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr);
  273 + fl6.daddr = ireq6->rmt_addr;
274 274 err = ip6_xmit(sk, skb, &fl6, opt, np->tclass);
275 275 err = net_xmit_eval(err);
276 276 }
... ... @@ -313,8 +313,8 @@
313 313 &rxip6h->daddr);
314 314  
315 315 memset(&fl6, 0, sizeof(fl6));
316   - ipv6_addr_copy(&fl6.daddr, &rxip6h->saddr);
317   - ipv6_addr_copy(&fl6.saddr, &rxip6h->daddr);
  316 + fl6.daddr = rxip6h->saddr;
  317 + fl6.saddr = rxip6h->daddr;
318 318  
319 319 fl6.flowi6_proto = IPPROTO_DCCP;
320 320 fl6.flowi6_oif = inet6_iif(rxskb);
... ... @@ -419,8 +419,8 @@
419 419 goto drop_and_free;
420 420  
421 421 ireq6 = inet6_rsk(req);
422   - ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr);
423   - ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr);
  422 + ireq6->rmt_addr = ipv6_hdr(skb)->saddr;
  423 + ireq6->loc_addr = ipv6_hdr(skb)->daddr;
424 424  
425 425 if (ipv6_opt_accepted(sk, skb) ||
426 426 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
... ... @@ -491,7 +491,7 @@
491 491  
492 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 496 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped;
497 497 newsk->sk_backlog_rcv = dccp_v4_do_rcv;
498 498  
... ... @@ -526,9 +526,9 @@
526 526  
527 527 memset(&fl6, 0, sizeof(fl6));
528 528 fl6.flowi6_proto = IPPROTO_DCCP;
529   - ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr);
  529 + fl6.daddr = ireq6->rmt_addr;
530 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 532 fl6.flowi6_oif = sk->sk_bound_dev_if;
533 533 fl6.fl6_dport = inet_rsk(req)->rmt_port;
534 534 fl6.fl6_sport = inet_rsk(req)->loc_port;
... ... @@ -559,9 +559,9 @@
559 559  
560 560 memcpy(newnp, np, sizeof(struct ipv6_pinfo));
561 561  
562   - ipv6_addr_copy(&newnp->daddr, &ireq6->rmt_addr);
563   - ipv6_addr_copy(&newnp->saddr, &ireq6->loc_addr);
564   - ipv6_addr_copy(&newnp->rcv_saddr, &ireq6->loc_addr);
  562 + newnp->daddr = ireq6->rmt_addr;
  563 + newnp->saddr = ireq6->loc_addr;
  564 + newnp->rcv_saddr = ireq6->loc_addr;
565 565 newsk->sk_bound_dev_if = ireq6->iif;
566 566  
567 567 /* Now IPv6 options...
... ... @@ -877,7 +877,7 @@
877 877 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel);
878 878 if (flowlabel == NULL)
879 879 return -EINVAL;
880   - ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst);
  880 + usin->sin6_addr = flowlabel->dst;
881 881 fl6_sock_release(flowlabel);
882 882 }
883 883 }
... ... @@ -910,7 +910,7 @@
910 910 return -EINVAL;
911 911 }
912 912  
913   - ipv6_addr_copy(&np->daddr, &usin->sin6_addr);
  913 + np->daddr = usin->sin6_addr;
914 914 np->flow_label = fl6.flowlabel;
915 915  
916 916 /*
... ... @@ -949,8 +949,8 @@
949 949 saddr = &np->rcv_saddr;
950 950  
951 951 fl6.flowi6_proto = IPPROTO_DCCP;
952   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
953   - ipv6_addr_copy(&fl6.saddr, saddr ? saddr : &np->saddr);
  952 + fl6.daddr = np->daddr;
  953 + fl6.saddr = saddr ? *saddr : np->saddr;
954 954 fl6.flowi6_oif = sk->sk_bound_dev_if;
955 955 fl6.fl6_dport = usin->sin6_port;
956 956 fl6.fl6_sport = inet->inet_sport;
957 957  
... ... @@ -966,11 +966,11 @@
966 966  
967 967 if (saddr == NULL) {
968 968 saddr = &fl6.saddr;
969   - ipv6_addr_copy(&np->rcv_saddr, saddr);
  969 + np->rcv_saddr = *saddr;
970 970 }
971 971  
972 972 /* set the source address */
973   - ipv6_addr_copy(&np->saddr, saddr);
  973 + np->saddr = *saddr;
974 974 inet->inet_rcv_saddr = LOOPBACK4_IPV6;
975 975  
976 976 __ip6_dst_store(sk, dst, NULL, NULL);
net/dccp/minisocks.c
... ... @@ -60,8 +60,8 @@
60 60  
61 61 tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot);
62 62 tw6 = inet6_twsk((struct sock *)tw);
63   - ipv6_addr_copy(&tw6->tw_v6_daddr, &np->daddr);
64   - ipv6_addr_copy(&tw6->tw_v6_rcv_saddr, &np->rcv_saddr);
  63 + tw6->tw_v6_daddr = np->daddr;
  64 + tw6->tw_v6_rcv_saddr = np->rcv_saddr;
65 65 tw->tw_ipv6only = np->ipv6only;
66 66 }
67 67 #endif
net/ipv4/inet_diag.c
... ... @@ -129,10 +129,8 @@
129 129 if (r->idiag_family == AF_INET6) {
130 130 const struct ipv6_pinfo *np = inet6_sk(sk);
131 131  
132   - ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
133   - &np->rcv_saddr);
134   - ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
135   - &np->daddr);
  132 + *(struct in6_addr *)r->id.idiag_src = np->rcv_saddr;
  133 + *(struct in6_addr *)r->id.idiag_dst = np->daddr;
136 134 if (ext & (1 << (INET_DIAG_TCLASS - 1)))
137 135 RTA_PUT_U8(skb, INET_DIAG_TCLASS, np->tclass);
138 136 }
... ... @@ -224,10 +222,8 @@
224 222 const struct inet6_timewait_sock *tw6 =
225 223 inet6_twsk((struct sock *)tw);
226 224  
227   - ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
228   - &tw6->tw_v6_rcv_saddr);
229   - ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
230   - &tw6->tw_v6_daddr);
  225 + *(struct in6_addr *)r->id.idiag_src = tw6->tw_v6_rcv_saddr;
  226 + *(struct in6_addr *)r->id.idiag_dst = tw6->tw_v6_daddr;
231 227 }
232 228 #endif
233 229 nlh->nlmsg_len = skb_tail_pointer(skb) - previous_tail;
... ... @@ -603,10 +599,8 @@
603 599 r->idiag_inode = 0;
604 600 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
605 601 if (r->idiag_family == AF_INET6) {
606   - ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
607   - &inet6_rsk(req)->loc_addr);
608   - ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
609   - &inet6_rsk(req)->rmt_addr);
  602 + *(struct in6_addr *)r->id.idiag_src = inet6_rsk(req)->loc_addr;
  603 + *(struct in6_addr *)r->id.idiag_dst = inet6_rsk(req)->rmt_addr;
610 604 }
611 605 #endif
612 606 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/ipv4/tcp_minisocks.c
... ... @@ -343,8 +343,8 @@
343 343  
344 344 tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot);
345 345 tw6 = inet6_twsk((struct sock *)tw);
346   - ipv6_addr_copy(&tw6->tw_v6_daddr, &np->daddr);
347   - ipv6_addr_copy(&tw6->tw_v6_rcv_saddr, &np->rcv_saddr);
  346 + tw6->tw_v6_daddr = np->daddr;
  347 + tw6->tw_v6_rcv_saddr = np->rcv_saddr;
348 348 tw->tw_tclass = np->tclass;
349 349 tw->tw_ipv6only = np->ipv6only;
350 350 }
... ... @@ -636,7 +636,7 @@
636 636 goto out;
637 637 }
638 638  
639   - ipv6_addr_copy(&ifa->addr, addr);
  639 + ifa->addr = *addr;
640 640  
641 641 spin_lock_init(&ifa->lock);
642 642 spin_lock_init(&ifa->state_lock);
... ... @@ -1228,7 +1228,7 @@
1228 1228 if (!hiscore->ifa)
1229 1229 return -EADDRNOTAVAIL;
1230 1230  
1231   - ipv6_addr_copy(saddr, &hiscore->ifa->addr);
  1231 + *saddr = hiscore->ifa->addr;
1232 1232 in6_ifa_put(hiscore->ifa);
1233 1233 return 0;
1234 1234 }
... ... @@ -1249,7 +1249,7 @@
1249 1249 list_for_each_entry(ifp, &idev->addr_list, if_list) {
1250 1250 if (ifp->scope == IFA_LINK &&
1251 1251 !(ifp->flags & banned_flags)) {
1252   - ipv6_addr_copy(addr, &ifp->addr);
  1252 + *addr = ifp->addr;
1253 1253 err = 0;
1254 1254 break;
1255 1255 }
... ... @@ -1700,7 +1700,7 @@
1700 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 1705 /* Prevent useless cloning on PtP SIT.
1706 1706 This thing is done here expecting that the whole
... ... @@ -361,10 +361,10 @@
361 361 inet->inet_rcv_saddr = v4addr;
362 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 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 369 /* Make sure we are allowed to bind here. */
370 370 if (sk->sk_prot->get_port(sk, snum)) {
371 371  
372 372  
... ... @@ -458,14 +458,14 @@
458 458 peer == 1)
459 459 return -ENOTCONN;
460 460 sin->sin6_port = inet->inet_dport;
461   - ipv6_addr_copy(&sin->sin6_addr, &np->daddr);
  461 + sin->sin6_addr = np->daddr;
462 462 if (np->sndflow)
463 463 sin->sin6_flowinfo = np->flow_label;
464 464 } else {
465 465 if (ipv6_addr_any(&np->rcv_saddr))
466   - ipv6_addr_copy(&sin->sin6_addr, &np->saddr);
  466 + sin->sin6_addr = np->saddr;
467 467 else
468   - ipv6_addr_copy(&sin->sin6_addr, &np->rcv_saddr);
  468 + sin->sin6_addr = np->rcv_saddr;
469 469  
470 470 sin->sin6_port = inet->inet_sport;
471 471 }
... ... @@ -660,8 +660,8 @@
660 660  
661 661 memset(&fl6, 0, sizeof(fl6));
662 662 fl6.flowi6_proto = sk->sk_protocol;
663   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
664   - ipv6_addr_copy(&fl6.saddr, &np->saddr);
  663 + fl6.daddr = np->daddr;
  664 + fl6.saddr = np->saddr;
665 665 fl6.flowlabel = np->flow_label;
666 666 fl6.flowi6_oif = sk->sk_bound_dev_if;
667 667 fl6.flowi6_mark = sk->sk_mark;
... ... @@ -193,9 +193,9 @@
193 193 printk(KERN_WARNING "destopt hao: invalid header length: %u\n", hao->length);
194 194 goto bad;
195 195 }
196   - ipv6_addr_copy(&final_addr, &hao->addr);
197   - ipv6_addr_copy(&hao->addr, &iph->saddr);
198   - ipv6_addr_copy(&iph->saddr, &final_addr);
  196 + final_addr = hao->addr;
  197 + hao->addr = iph->saddr;
  198 + iph->saddr = final_addr;
199 199 }
200 200 break;
201 201 }
202 202  
... ... @@ -241,13 +241,13 @@
241 241 segments = rthdr->hdrlen >> 1;
242 242  
243 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 246 addrs += segments - segments_left;
247 247 memmove(addrs + 1, addrs, (segments_left - 1) * sizeof(*addrs));
248 248  
249   - ipv6_addr_copy(addrs, &iph->daddr);
250   - ipv6_addr_copy(&iph->daddr, &final_addr);
  249 + addrs[0] = iph->daddr;
  250 + iph->daddr = final_addr;
251 251 }
252 252  
253 253 static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir)
... ... @@ -75,7 +75,7 @@
75 75 if (pac == NULL)
76 76 return -ENOMEM;
77 77 pac->acl_next = NULL;
78   - ipv6_addr_copy(&pac->acl_addr, addr);
  78 + pac->acl_addr = *addr;
79 79  
80 80 rcu_read_lock();
81 81 if (ifindex == 0) {
... ... @@ -296,7 +296,7 @@
296 296 goto out;
297 297 }
298 298  
299   - ipv6_addr_copy(&aca->aca_addr, addr);
  299 + aca->aca_addr = *addr;
300 300 aca->aca_idev = idev;
301 301 aca->aca_rt = rt;
302 302 aca->aca_users = 1;
... ... @@ -71,7 +71,7 @@
71 71 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel);
72 72 if (flowlabel == NULL)
73 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 @@
143 143 }
144 144 }
145 145  
146   - ipv6_addr_copy(&np->daddr, daddr);
  146 + np->daddr = *daddr;
147 147 np->flow_label = fl6.flowlabel;
148 148  
149 149 inet->inet_dport = usin->sin6_port;
... ... @@ -154,8 +154,8 @@
154 154 */
155 155  
156 156 fl6.flowi6_proto = sk->sk_protocol;
157   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
158   - ipv6_addr_copy(&fl6.saddr, &np->saddr);
  157 + fl6.daddr = np->daddr;
  158 + fl6.saddr = np->saddr;
159 159 fl6.flowi6_oif = sk->sk_bound_dev_if;
160 160 fl6.flowi6_mark = sk->sk_mark;
161 161 fl6.fl6_dport = inet->inet_dport;
162 162  
... ... @@ -179,10 +179,10 @@
179 179 /* source address lookup done in ip6_dst_lookup */
180 180  
181 181 if (ipv6_addr_any(&np->saddr))
182   - ipv6_addr_copy(&np->saddr, &fl6.saddr);
  182 + np->saddr = fl6.saddr;
183 183  
184 184 if (ipv6_addr_any(&np->rcv_saddr)) {
185   - ipv6_addr_copy(&np->rcv_saddr, &fl6.saddr);
  185 + np->rcv_saddr = fl6.saddr;
186 186 inet->inet_rcv_saddr = LOOPBACK4_IPV6;
187 187 if (sk->sk_prot->rehash)
188 188 sk->sk_prot->rehash(sk);
... ... @@ -257,7 +257,7 @@
257 257 skb_put(skb, sizeof(struct ipv6hdr));
258 258 skb_reset_network_header(skb);
259 259 iph = ipv6_hdr(skb);
260   - ipv6_addr_copy(&iph->daddr, &fl6->daddr);
  260 + iph->daddr = fl6->daddr;
261 261  
262 262 serr = SKB_EXT_ERR(skb);
263 263 serr->ee.ee_errno = err;
... ... @@ -294,7 +294,7 @@
294 294 skb_put(skb, sizeof(struct ipv6hdr));
295 295 skb_reset_network_header(skb);
296 296 iph = ipv6_hdr(skb);
297   - ipv6_addr_copy(&iph->daddr, &fl6->daddr);
  297 + iph->daddr = fl6->daddr;
298 298  
299 299 mtu_info = IP6CBMTU(skb);
300 300  
... ... @@ -303,7 +303,7 @@
303 303 mtu_info->ip6m_addr.sin6_port = 0;
304 304 mtu_info->ip6m_addr.sin6_flowinfo = 0;
305 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 308 __skb_pull(skb, skb_tail_pointer(skb) - skb->data);
309 309 skb_reset_transport_header(skb);
... ... @@ -354,8 +354,8 @@
354 354 sin->sin6_port = serr->port;
355 355 sin->sin6_scope_id = 0;
356 356 if (skb->protocol == htons(ETH_P_IPV6)) {
357   - ipv6_addr_copy(&sin->sin6_addr,
358   - (struct in6_addr *)(nh + serr->addr_offset));
  357 + sin->sin6_addr =
  358 + *(struct in6_addr *)(nh + serr->addr_offset);
359 359 if (np->sndflow)
360 360 sin->sin6_flowinfo =
361 361 (*(__be32 *)(nh + serr->addr_offset - 24) &
... ... @@ -376,7 +376,7 @@
376 376 sin->sin6_flowinfo = 0;
377 377 sin->sin6_scope_id = 0;
378 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 380 if (np->rxopt.all)
381 381 datagram_recv_ctl(sk, msg, skb);
382 382 if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
... ... @@ -451,7 +451,7 @@
451 451 sin->sin6_flowinfo = 0;
452 452 sin->sin6_port = 0;
453 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 457 put_cmsg(msg, SOL_IPV6, IPV6_PATHMTU, sizeof(mtu_info), &mtu_info);
... ... @@ -475,7 +475,7 @@
475 475 struct in6_pktinfo src_info;
476 476  
477 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 479 put_cmsg(msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info);
480 480 }
481 481  
... ... @@ -550,7 +550,7 @@
550 550 struct in6_pktinfo src_info;
551 551  
552 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 554 put_cmsg(msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info);
555 555 }
556 556 if (np->rxopt.bits.rxohlim) {
... ... @@ -584,7 +584,7 @@
584 584 */
585 585  
586 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 588 sin6.sin6_port = ports[1];
589 589 sin6.sin6_flowinfo = 0;
590 590 sin6.sin6_scope_id = 0;
... ... @@ -659,7 +659,7 @@
659 659 strict ? dev : NULL, 0))
660 660 err = -EINVAL;
661 661 else
662   - ipv6_addr_copy(&fl6->saddr, &src_info->ipi6_addr);
  662 + fl6->saddr = src_info->ipi6_addr;
663 663 }
664 664  
665 665 rcu_read_unlock();
... ... @@ -243,9 +243,9 @@
243 243 if (skb->ip_summed == CHECKSUM_COMPLETE)
244 244 skb->ip_summed = CHECKSUM_NONE;
245 245  
246   - ipv6_addr_copy(&tmp_addr, &ipv6h->saddr);
247   - ipv6_addr_copy(&ipv6h->saddr, &hao->addr);
248   - ipv6_addr_copy(&hao->addr, &tmp_addr);
  246 + tmp_addr = ipv6h->saddr;
  247 + ipv6h->saddr = hao->addr;
  248 + hao->addr = tmp_addr;
249 249  
250 250 if (skb->tstamp.tv64 == 0)
251 251 __net_timestamp(skb);
... ... @@ -461,9 +461,9 @@
461 461 return -1;
462 462 }
463 463  
464   - ipv6_addr_copy(&daddr, addr);
465   - ipv6_addr_copy(addr, &ipv6_hdr(skb)->daddr);
466   - ipv6_addr_copy(&ipv6_hdr(skb)->daddr, &daddr);
  464 + daddr = *addr;
  465 + *addr = ipv6_hdr(skb)->daddr;
  466 + ipv6_hdr(skb)->daddr = daddr;
467 467  
468 468 skb_dst_drop(skb);
469 469 ip6_route_input(skb);
... ... @@ -690,7 +690,7 @@
690 690 memcpy(phdr->addr, ihdr->addr + 1,
691 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 694 *addr_p = ihdr->addr;
695 695  
696 696 phdr->rt_hdr.nexthdr = *proto;
... ... @@ -888,8 +888,8 @@
888 888 if (!opt || !opt->srcrt)
889 889 return NULL;
890 890  
891   - ipv6_addr_copy(orig, &fl6->daddr);
892   - ipv6_addr_copy(&fl6->daddr, ((struct rt0_hdr *)opt->srcrt)->addr);
  891 + *orig = fl6->daddr;
  892 + fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr;
893 893 return orig;
894 894 }
895 895  
net/ipv6/fib6_rules.c
... ... @@ -96,7 +96,7 @@
96 96 if (!ipv6_prefix_equal(&saddr, &r->src.addr,
97 97 r->src.plen))
98 98 goto again;
99   - ipv6_addr_copy(&flp6->saddr, &saddr);
  99 + flp6->saddr = saddr;
100 100 }
101 101 goto out;
102 102 }
... ... @@ -290,9 +290,9 @@
290 290 if (likely(off >= 0)) {
291 291 hao = (struct ipv6_destopt_hao *)
292 292 (skb_network_header(skb) + off);
293   - ipv6_addr_copy(&tmp, &iph->saddr);
294   - ipv6_addr_copy(&iph->saddr, &hao->addr);
295   - ipv6_addr_copy(&hao->addr, &tmp);
  293 + tmp = iph->saddr;
  294 + iph->saddr = hao->addr;
  295 + hao->addr = tmp;
296 296 }
297 297 }
298 298 }
299 299  
... ... @@ -444,9 +444,9 @@
444 444  
445 445 memset(&fl6, 0, sizeof(fl6));
446 446 fl6.flowi6_proto = IPPROTO_ICMPV6;
447   - ipv6_addr_copy(&fl6.daddr, &hdr->saddr);
  447 + fl6.daddr = hdr->saddr;
448 448 if (saddr)
449   - ipv6_addr_copy(&fl6.saddr, saddr);
  449 + fl6.saddr = *saddr;
450 450 fl6.flowi6_oif = iif;
451 451 fl6.fl6_icmp_type = type;
452 452 fl6.fl6_icmp_code = code;
453 453  
... ... @@ -538,9 +538,9 @@
538 538  
539 539 memset(&fl6, 0, sizeof(fl6));
540 540 fl6.flowi6_proto = IPPROTO_ICMPV6;
541   - ipv6_addr_copy(&fl6.daddr, &ipv6_hdr(skb)->saddr);
  541 + fl6.daddr = ipv6_hdr(skb)->saddr;
542 542 if (saddr)
543   - ipv6_addr_copy(&fl6.saddr, saddr);
  543 + fl6.saddr = *saddr;
544 544 fl6.flowi6_oif = skb->dev->ifindex;
545 545 fl6.fl6_icmp_type = ICMPV6_ECHO_REPLY;
546 546 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6));
... ... @@ -786,8 +786,8 @@
786 786 int oif)
787 787 {
788 788 memset(fl6, 0, sizeof(*fl6));
789   - ipv6_addr_copy(&fl6->saddr, saddr);
790   - ipv6_addr_copy(&fl6->daddr, daddr);
  789 + fl6->saddr = *saddr;
  790 + fl6->daddr = *daddr;
791 791 fl6->flowi6_proto = IPPROTO_ICMPV6;
792 792 fl6->fl6_icmp_type = type;
793 793 fl6->fl6_icmp_code = 0;
net/ipv6/inet6_connection_sock.c
... ... @@ -65,9 +65,9 @@
65 65  
66 66 memset(&fl6, 0, sizeof(fl6));
67 67 fl6.flowi6_proto = IPPROTO_TCP;
68   - ipv6_addr_copy(&fl6.daddr, &treq->rmt_addr);
  68 + fl6.daddr = treq->rmt_addr;
69 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 71 fl6.flowi6_oif = sk->sk_bound_dev_if;
72 72 fl6.flowi6_mark = sk->sk_mark;
73 73 fl6.fl6_dport = inet_rsk(req)->rmt_port;
... ... @@ -157,7 +157,7 @@
157 157 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) uaddr;
158 158  
159 159 sin6->sin6_family = AF_INET6;
160   - ipv6_addr_copy(&sin6->sin6_addr, &np->daddr);
  160 + sin6->sin6_addr = np->daddr;
161 161 sin6->sin6_port = inet_sk(sk)->inet_dport;
162 162 /* We do not store received flowlabel for TCP */
163 163 sin6->sin6_flowinfo = 0;
... ... @@ -215,8 +215,8 @@
215 215  
216 216 memset(&fl6, 0, sizeof(fl6));
217 217 fl6.flowi6_proto = sk->sk_protocol;
218   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
219   - ipv6_addr_copy(&fl6.saddr, &np->saddr);
  218 + fl6.daddr = np->daddr;
  219 + fl6.saddr = np->saddr;
220 220 fl6.flowlabel = np->flow_label;
221 221 IP6_ECN_flow_xmit(sk, fl6.flowlabel);
222 222 fl6.flowi6_oif = sk->sk_bound_dev_if;
... ... @@ -246,7 +246,7 @@
246 246 skb_dst_set_noref(skb, dst);
247 247  
248 248 /* Restore final destination back after routing done */
249   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
  249 + fl6.daddr = np->daddr;
250 250  
251 251 res = ip6_xmit(sk, skb, &fl6, np->opt, np->tclass);
252 252 rcu_read_unlock();
net/ipv6/ip6_flowlabel.c
... ... @@ -386,7 +386,7 @@
386 386 err = -EINVAL;
387 387 goto done;
388 388 }
389   - ipv6_addr_copy(&fl->dst, &freq->flr_dst);
  389 + fl->dst = freq->flr_dst;
390 390 atomic_set(&fl->users, 1);
391 391 switch (fl->share) {
392 392 case IPV6_FL_S_EXCL:
net/ipv6/ip6_output.c
... ... @@ -238,8 +238,8 @@
238 238 hdr->nexthdr = proto;
239 239 hdr->hop_limit = hlimit;
240 240  
241   - ipv6_addr_copy(&hdr->saddr, &fl6->saddr);
242   - ipv6_addr_copy(&hdr->daddr, first_hop);
  241 + hdr->saddr = fl6->saddr;
  242 + hdr->daddr = *first_hop;
243 243  
244 244 skb->priority = sk->sk_priority;
245 245 skb->mark = sk->sk_mark;
... ... @@ -290,8 +290,8 @@
290 290 hdr->nexthdr = proto;
291 291 hdr->hop_limit = np->hop_limit;
292 292  
293   - ipv6_addr_copy(&hdr->saddr, saddr);
294   - ipv6_addr_copy(&hdr->daddr, daddr);
  293 + hdr->saddr = *saddr;
  294 + hdr->daddr = *daddr;
295 295  
296 296 return 0;
297 297 }
... ... @@ -1063,7 +1063,7 @@
1063 1063 if (err)
1064 1064 return ERR_PTR(err);
1065 1065 if (final_dst)
1066   - ipv6_addr_copy(&fl6->daddr, final_dst);
  1066 + fl6->daddr = *final_dst;
1067 1067 if (can_sleep)
1068 1068 fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP;
1069 1069  
... ... @@ -1099,7 +1099,7 @@
1099 1099 if (err)
1100 1100 return ERR_PTR(err);
1101 1101 if (final_dst)
1102   - ipv6_addr_copy(&fl6->daddr, final_dst);
  1102 + fl6->daddr = *final_dst;
1103 1103 if (can_sleep)
1104 1104 fl6->flowi6_flags |= FLOWI_FLAG_CAN_SLEEP;
1105 1105  
... ... @@ -1592,7 +1592,7 @@
1592 1592 if (np->pmtudisc < IPV6_PMTUDISC_DO)
1593 1593 skb->local_df = 1;
1594 1594  
1595   - ipv6_addr_copy(final_dst, &fl6->daddr);
  1595 + *final_dst = fl6->daddr;
1596 1596 __skb_pull(skb, skb_network_header_len(skb));
1597 1597 if (opt && opt->opt_flen)
1598 1598 ipv6_push_frag_opts(skb, opt, &proto);
... ... @@ -1608,8 +1608,8 @@
1608 1608  
1609 1609 hdr->hop_limit = np->cork.hop_limit;
1610 1610 hdr->nexthdr = proto;
1611   - ipv6_addr_copy(&hdr->saddr, &fl6->saddr);
1612   - ipv6_addr_copy(&hdr->daddr, final_dst);
  1611 + hdr->saddr = fl6->saddr;
  1612 + hdr->daddr = *final_dst;
1613 1613  
1614 1614 skb->priority = sk->sk_priority;
1615 1615 skb->mark = sk->sk_mark;
net/ipv6/ip6_tunnel.c
... ... @@ -979,8 +979,8 @@
979 979 ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield);
980 980 ipv6h->hop_limit = t->parms.hop_limit;
981 981 ipv6h->nexthdr = proto;
982   - ipv6_addr_copy(&ipv6h->saddr, &fl6->saddr);
983   - ipv6_addr_copy(&ipv6h->daddr, &fl6->daddr);
  982 + ipv6h->saddr = fl6->saddr;
  983 + ipv6h->daddr = fl6->daddr;
984 984 nf_reset(skb);
985 985 pkt_len = skb->len;
986 986 err = ip6_local_out(skb);
... ... @@ -1155,8 +1155,8 @@
1155 1155 memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr));
1156 1156  
1157 1157 /* Set up flowi template */
1158   - ipv6_addr_copy(&fl6->saddr, &p->laddr);
1159   - ipv6_addr_copy(&fl6->daddr, &p->raddr);
  1158 + fl6->saddr = p->laddr;
  1159 + fl6->daddr = p->raddr;
1160 1160 fl6->flowi6_oif = p->link;
1161 1161 fl6->flowlabel = 0;
1162 1162  
... ... @@ -1212,8 +1212,8 @@
1212 1212 static int
1213 1213 ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p)
1214 1214 {
1215   - ipv6_addr_copy(&t->parms.laddr, &p->laddr);
1216   - ipv6_addr_copy(&t->parms.raddr, &p->raddr);
  1215 + t->parms.laddr = p->laddr;
  1216 + t->parms.raddr = p->raddr;
1217 1217 t->parms.flags = p->flags;
1218 1218 t->parms.hop_limit = p->hop_limit;
1219 1219 t->parms.encap_limit = p->encap_limit;
... ... @@ -1105,8 +1105,8 @@
1105 1105 msg->im6_msgtype = MRT6MSG_WHOLEPKT;
1106 1106 msg->im6_mif = mrt->mroute_reg_vif_num;
1107 1107 msg->im6_pad = 0;
1108   - ipv6_addr_copy(&msg->im6_src, &ipv6_hdr(pkt)->saddr);
1109   - ipv6_addr_copy(&msg->im6_dst, &ipv6_hdr(pkt)->daddr);
  1108 + msg->im6_src = ipv6_hdr(pkt)->saddr;
  1109 + msg->im6_dst = ipv6_hdr(pkt)->daddr;
1110 1110  
1111 1111 skb->ip_summed = CHECKSUM_UNNECESSARY;
1112 1112 } else
... ... @@ -1131,8 +1131,8 @@
1131 1131 msg->im6_msgtype = assert;
1132 1132 msg->im6_mif = mifi;
1133 1133 msg->im6_pad = 0;
1134   - ipv6_addr_copy(&msg->im6_src, &ipv6_hdr(pkt)->saddr);
1135   - ipv6_addr_copy(&msg->im6_dst, &ipv6_hdr(pkt)->daddr);
  1134 + msg->im6_src = ipv6_hdr(pkt)->saddr;
  1135 + msg->im6_dst = ipv6_hdr(pkt)->daddr;
1136 1136  
1137 1137 skb_dst_set(skb, dst_clone(skb_dst(pkt)));
1138 1138 skb->ip_summed = CHECKSUM_UNNECESSARY;
... ... @@ -2181,8 +2181,8 @@
2181 2181 iph->payload_len = 0;
2182 2182 iph->nexthdr = IPPROTO_NONE;
2183 2183 iph->hop_limit = 0;
2184   - ipv6_addr_copy(&iph->saddr, &rt->rt6i_src.addr);
2185   - ipv6_addr_copy(&iph->daddr, &rt->rt6i_dst.addr);
  2184 + iph->saddr = rt->rt6i_src.addr;
  2185 + iph->daddr = rt->rt6i_dst.addr;
2186 2186  
2187 2187 err = ip6mr_cache_unresolved(mrt, vif, skb2);
2188 2188 read_unlock(&mrt_lock);
net/ipv6/ipv6_sockglue.c
... ... @@ -435,7 +435,7 @@
435 435 goto e_inval;
436 436  
437 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 439 retv = 0;
440 440 break;
441 441 }
... ... @@ -980,8 +980,7 @@
980 980 struct in6_pktinfo src_info;
981 981 src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif :
982 982 np->sticky_pktinfo.ipi6_ifindex;
983   - np->mcast_oif? ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr) :
984   - ipv6_addr_copy(&src_info.ipi6_addr, &(np->sticky_pktinfo.ipi6_addr));
  983 + src_info.ipi6_addr = np->mcast_oif ? np->daddr : np->sticky_pktinfo.ipi6_addr;
985 984 put_cmsg(&msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info);
986 985 }
987 986 if (np->rxopt.bits.rxhlim) {
... ... @@ -992,8 +991,7 @@
992 991 struct in6_pktinfo src_info;
993 992 src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif :
994 993 np->sticky_pktinfo.ipi6_ifindex;
995   - np->mcast_oif? ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr) :
996   - ipv6_addr_copy(&src_info.ipi6_addr, &(np->sticky_pktinfo.ipi6_addr));
  994 + src_info.ipi6_addr = np->mcast_oif ? np->daddr : np->sticky_pktinfo.ipi6_addr;
997 995 put_cmsg(&msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info);
998 996 }
999 997 if (np->rxopt.bits.rxohlim) {
... ... @@ -155,7 +155,7 @@
155 155 return -ENOMEM;
156 156  
157 157 mc_lst->next = NULL;
158   - ipv6_addr_copy(&mc_lst->addr, addr);
  158 + mc_lst->addr = *addr;
159 159  
160 160 rcu_read_lock();
161 161 if (ifindex == 0) {
... ... @@ -858,7 +858,7 @@
858 858  
859 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 862 mc->idev = idev; /* (reference taken) */
863 863 mc->mca_users = 1;
864 864 /* mca_stamp should be updated upon changes */
... ... @@ -1776,7 +1776,7 @@
1776 1776 hdr = (struct mld_msg *) skb_put(skb, sizeof(struct mld_msg));
1777 1777 memset(hdr, 0, sizeof(struct mld_msg));
1778 1778 hdr->mld_type = type;
1779   - ipv6_addr_copy(&hdr->mld_mca, addr);
  1779 + hdr->mld_mca = *addr;
1780 1780  
1781 1781 hdr->mld_cksum = csum_ipv6_magic(saddr, snd_addr, len,
1782 1782 IPPROTO_ICMPV6,
... ... @@ -195,8 +195,8 @@
195 195 mip6_report_rl.stamp.tv_sec = stamp->tv_sec;
196 196 mip6_report_rl.stamp.tv_usec = stamp->tv_usec;
197 197 mip6_report_rl.iif = iif;
198   - ipv6_addr_copy(&mip6_report_rl.src, src);
199   - ipv6_addr_copy(&mip6_report_rl.dst, dst);
  198 + mip6_report_rl.src = *src;
  199 + mip6_report_rl.dst = *dst;
200 200 allow = 1;
201 201 }
202 202 spin_unlock_bh(&mip6_report_rl.lock);
... ... @@ -481,7 +481,7 @@
481 481  
482 482 opt = skb_transport_header(skb) + sizeof(struct icmp6hdr);
483 483 if (target) {
484   - ipv6_addr_copy((struct in6_addr *)opt, target);
  484 + *(struct in6_addr *)opt = *target;
485 485 opt += sizeof(*target);
486 486 }
487 487  
488 488  
... ... @@ -1622,9 +1622,9 @@
1622 1622 */
1623 1623  
1624 1624 addrp = (struct in6_addr *)(icmph + 1);
1625   - ipv6_addr_copy(addrp, target);
  1625 + *addrp = *target;
1626 1626 addrp++;
1627   - ipv6_addr_copy(addrp, &ipv6_hdr(skb)->daddr);
  1627 + *addrp = ipv6_hdr(skb)->daddr;
1628 1628  
1629 1629 opt = (u8*) (addrp + 1);
1630 1630  
net/ipv6/netfilter/ip6t_REJECT.c
... ... @@ -93,8 +93,8 @@
93 93  
94 94 memset(&fl6, 0, sizeof(fl6));
95 95 fl6.flowi6_proto = IPPROTO_TCP;
96   - ipv6_addr_copy(&fl6.saddr, &oip6h->daddr);
97   - ipv6_addr_copy(&fl6.daddr, &oip6h->saddr);
  96 + fl6.saddr = oip6h->daddr;
  97 + fl6.daddr = oip6h->saddr;
98 98 fl6.fl6_sport = otcph.dest;
99 99 fl6.fl6_dport = otcph.source;
100 100 security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6));
... ... @@ -129,8 +129,8 @@
129 129 *(__be32 *)ip6h = htonl(0x60000000 | (tclass << 20));
130 130 ip6h->hop_limit = ip6_dst_hoplimit(dst);
131 131 ip6h->nexthdr = IPPROTO_TCP;
132   - ipv6_addr_copy(&ip6h->saddr, &oip6h->daddr);
133   - ipv6_addr_copy(&ip6h->daddr, &oip6h->saddr);
  132 + ip6h->saddr = oip6h->daddr;
  133 + ip6h->daddr = oip6h->saddr;
134 134  
135 135 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr));
136 136 /* Truncate to length (no data) */
... ... @@ -299,9 +299,9 @@
299 299 }
300 300  
301 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 303 if (!(addr_type & IPV6_ADDR_MULTICAST))
304   - ipv6_addr_copy(&np->saddr, &addr->sin6_addr);
  304 + np->saddr = addr->sin6_addr;
305 305 err = 0;
306 306 out_unlock:
307 307 rcu_read_unlock();
... ... @@ -495,7 +495,7 @@
495 495 if (sin6) {
496 496 sin6->sin6_family = AF_INET6;
497 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 499 sin6->sin6_flowinfo = 0;
500 500 sin6->sin6_scope_id = 0;
501 501 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
502 502  
... ... @@ -846,11 +846,11 @@
846 846 goto out;
847 847  
848 848 if (!ipv6_addr_any(daddr))
849   - ipv6_addr_copy(&fl6.daddr, daddr);
  849 + fl6.daddr = *daddr;
850 850 else
851 851 fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */
852 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 855 final_p = fl6_update_dst(&fl6, opt, &final);
856 856  
net/ipv6/reassembly.c
... ... @@ -153,8 +153,8 @@
153 153  
154 154 fq->id = arg->id;
155 155 fq->user = arg->user;
156   - ipv6_addr_copy(&fq->saddr, arg->src);
157   - ipv6_addr_copy(&fq->daddr, arg->dst);
  156 + fq->saddr = *arg->src;
  157 + fq->daddr = *arg->dst;
158 158 }
159 159 EXPORT_SYMBOL(ip6_frag_init);
160 160  
... ... @@ -729,14 +729,14 @@
729 729 if (rt->rt6i_dst.plen != 128 &&
730 730 ipv6_addr_equal(&ort->rt6i_dst.addr, daddr))
731 731 rt->rt6i_flags |= RTF_ANYCAST;
732   - ipv6_addr_copy(&rt->rt6i_gateway, daddr);
  732 + rt->rt6i_gateway = *daddr;
733 733 }
734 734  
735 735 rt->rt6i_flags |= RTF_CACHE;
736 736  
737 737 #ifdef CONFIG_IPV6_SUBTREES
738 738 if (rt->rt6i_src.plen && saddr) {
739   - ipv6_addr_copy(&rt->rt6i_src.addr, saddr);
  739 + rt->rt6i_src.addr = *saddr;
740 740 rt->rt6i_src.plen = 128;
741 741 }
742 742 #endif
... ... @@ -932,7 +932,7 @@
932 932 in6_dev_hold(rt->rt6i_idev);
933 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 936 rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES;
937 937 rt->rt6i_metric = 0;
938 938  
... ... @@ -1087,7 +1087,7 @@
1087 1087 rt->dst.output = ip6_output;
1088 1088 dst_set_neighbour(&rt->dst, neigh);
1089 1089 atomic_set(&rt->dst.__refcnt, 1);
1090   - ipv6_addr_copy(&rt->rt6i_dst.addr, addr);
  1090 + rt->rt6i_dst.addr = *addr;
1091 1091 rt->rt6i_dst.plen = 128;
1092 1092 rt->rt6i_idev = idev;
1093 1093 dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255);
... ... @@ -1324,7 +1324,7 @@
1324 1324 int gwa_type;
1325 1325  
1326 1326 gw_addr = &cfg->fc_gateway;
1327   - ipv6_addr_copy(&rt->rt6i_gateway, gw_addr);
  1327 + rt->rt6i_gateway = *gw_addr;
1328 1328 gwa_type = ipv6_addr_type(gw_addr);
1329 1329  
1330 1330 if (gwa_type != (IPV6_ADDR_LINKLOCAL|IPV6_ADDR_UNICAST)) {
... ... @@ -1378,7 +1378,7 @@
1378 1378 err = -EINVAL;
1379 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 1382 rt->rt6i_prefsrc.plen = 128;
1383 1383 } else
1384 1384 rt->rt6i_prefsrc.plen = 0;
... ... @@ -1575,7 +1575,7 @@
1575 1575 },
1576 1576 };
1577 1577  
1578   - ipv6_addr_copy(&rdfl.gateway, gateway);
  1578 + rdfl.gateway = *gateway;
1579 1579  
1580 1580 if (rt6_need_strict(dest))
1581 1581 flags |= RT6_LOOKUP_F_IFACE;
... ... @@ -1631,7 +1631,7 @@
1631 1631 if (on_link)
1632 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 1635 dst_set_neighbour(&nrt->dst, neigh_clone(neigh));
1636 1636  
1637 1637 if (ip6_ins_rt(nrt))
... ... @@ -1777,7 +1777,7 @@
1777 1777 rt->dst.output = ort->dst.output;
1778 1778 rt->dst.flags |= DST_HOST;
1779 1779  
1780   - ipv6_addr_copy(&rt->rt6i_dst.addr, dest);
  1780 + rt->rt6i_dst.addr = *dest;
1781 1781 rt->rt6i_dst.plen = 128;
1782 1782 dst_copy_metrics(&rt->dst, &ort->dst);
1783 1783 rt->dst.error = ort->dst.error;
... ... @@ -1787,7 +1787,7 @@
1787 1787 rt->dst.lastuse = jiffies;
1788 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 1791 rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES;
1792 1792 rt->rt6i_metric = 0;
1793 1793  
... ... @@ -1850,8 +1850,8 @@
1850 1850 .fc_nlinfo.nl_net = net,
1851 1851 };
1852 1852  
1853   - ipv6_addr_copy(&cfg.fc_dst, prefix);
1854   - ipv6_addr_copy(&cfg.fc_gateway, gwaddr);
  1853 + cfg.fc_dst = *prefix;
  1854 + cfg.fc_gateway = *gwaddr;
1855 1855  
1856 1856 /* We should treat it as a default route if prefix length is 0. */
1857 1857 if (!prefixlen)
... ... @@ -1900,7 +1900,7 @@
1900 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 1905 ip6_route_add(&cfg);
1906 1906  
... ... @@ -1946,9 +1946,9 @@
1946 1946  
1947 1947 cfg->fc_nlinfo.nl_net = net;
1948 1948  
1949   - ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst);
1950   - ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src);
1951   - ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway);
  1949 + cfg->fc_dst = rtmsg->rtmsg_dst;
  1950 + cfg->fc_src = rtmsg->rtmsg_src;
  1951 + cfg->fc_gateway = rtmsg->rtmsg_gateway;
1952 1952 }
1953 1953  
1954 1954 int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg)
... ... @@ -2082,7 +2082,7 @@
2082 2082 }
2083 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 2086 rt->rt6i_dst.plen = 128;
2087 2087 rt->rt6i_table = fib6_get_table(net, RT6_TABLE_LOCAL);
2088 2088  
... ... @@ -2100,7 +2100,7 @@
2100 2100 struct inet6_dev *idev = ip6_dst_idev((struct dst_entry*)rt);
2101 2101 int err = 0;
2102 2102 if (rt->rt6i_prefsrc.plen)
2103   - ipv6_addr_copy(saddr, &rt->rt6i_prefsrc.addr);
  2103 + *saddr = rt->rt6i_prefsrc.addr;
2104 2104 else
2105 2105 err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL,
2106 2106 daddr, prefs, saddr);
... ... @@ -2439,7 +2439,7 @@
2439 2439  
2440 2440 if (rt->rt6i_prefsrc.plen) {
2441 2441 struct in6_addr saddr_buf;
2442   - ipv6_addr_copy(&saddr_buf, &rt->rt6i_prefsrc.addr);
  2442 + saddr_buf = rt->rt6i_prefsrc.addr;
2443 2443 NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf);
2444 2444 }
2445 2445  
2446 2446  
... ... @@ -2513,14 +2513,14 @@
2513 2513 if (nla_len(tb[RTA_SRC]) < sizeof(struct in6_addr))
2514 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 2519 if (tb[RTA_DST]) {
2520 2520 if (nla_len(tb[RTA_DST]) < sizeof(struct in6_addr))
2521 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 2526 if (tb[RTA_IIF])
... ... @@ -914,7 +914,7 @@
914 914 goto done;
915 915 #ifdef CONFIG_IPV6_SIT_6RD
916 916 } else {
917   - ipv6_addr_copy(&ip6rd.prefix, &t->ip6rd.prefix);
  917 + ip6rd.prefix = t->ip6rd.prefix;
918 918 ip6rd.relay_prefix = t->ip6rd.relay_prefix;
919 919 ip6rd.prefixlen = t->ip6rd.prefixlen;
920 920 ip6rd.relay_prefixlen = t->ip6rd.relay_prefixlen;
... ... @@ -1082,7 +1082,7 @@
1082 1082 if (relay_prefix != ip6rd.relay_prefix)
1083 1083 goto done;
1084 1084  
1085   - ipv6_addr_copy(&t->ip6rd.prefix, &prefix);
  1085 + t->ip6rd.prefix = prefix;
1086 1086 t->ip6rd.relay_prefix = relay_prefix;
1087 1087 t->ip6rd.prefixlen = ip6rd.prefixlen;
1088 1088 t->ip6rd.relay_prefixlen = ip6rd.relay_prefixlen;
net/ipv6/syncookies.c
... ... @@ -200,8 +200,8 @@
200 200 req->mss = mss;
201 201 ireq->rmt_port = th->source;
202 202 ireq->loc_port = th->dest;
203   - ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr);
204   - ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr);
  203 + ireq6->rmt_addr = ipv6_hdr(skb)->saddr;
  204 + ireq6->loc_addr = ipv6_hdr(skb)->daddr;
205 205 if (ipv6_opt_accepted(sk, skb) ||
206 206 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
207 207 np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) {
208 208  
... ... @@ -237,9 +237,9 @@
237 237 struct flowi6 fl6;
238 238 memset(&fl6, 0, sizeof(fl6));
239 239 fl6.flowi6_proto = IPPROTO_TCP;
240   - ipv6_addr_copy(&fl6.daddr, &ireq6->rmt_addr);
  240 + fl6.daddr = ireq6->rmt_addr;
241 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 243 fl6.flowi6_oif = sk->sk_bound_dev_if;
244 244 fl6.flowi6_mark = sk->sk_mark;
245 245 fl6.fl6_dport = inet_rsk(req)->rmt_port;
... ... @@ -153,7 +153,7 @@
153 153 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel);
154 154 if (flowlabel == NULL)
155 155 return -EINVAL;
156   - ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst);
  156 + usin->sin6_addr = flowlabel->dst;
157 157 fl6_sock_release(flowlabel);
158 158 }
159 159 }
... ... @@ -195,7 +195,7 @@
195 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 199 np->flow_label = fl6.flowlabel;
200 200  
201 201 /*
... ... @@ -244,9 +244,8 @@
244 244 saddr = &np->rcv_saddr;
245 245  
246 246 fl6.flowi6_proto = IPPROTO_TCP;
247   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
248   - ipv6_addr_copy(&fl6.saddr,
249   - (saddr ? saddr : &np->saddr));
  247 + fl6.daddr = np->daddr;
  248 + fl6.saddr = saddr ? *saddr : np->saddr;
250 249 fl6.flowi6_oif = sk->sk_bound_dev_if;
251 250 fl6.flowi6_mark = sk->sk_mark;
252 251 fl6.fl6_dport = usin->sin6_port;
253 252  
... ... @@ -264,11 +263,11 @@
264 263  
265 264 if (saddr == NULL) {
266 265 saddr = &fl6.saddr;
267   - ipv6_addr_copy(&np->rcv_saddr, saddr);
  266 + np->rcv_saddr = *saddr;
268 267 }
269 268  
270 269 /* set the source address */
271   - ipv6_addr_copy(&np->saddr, saddr);
  270 + np->saddr = *saddr;
272 271 inet->inet_rcv_saddr = LOOPBACK4_IPV6;
273 272  
274 273 sk->sk_gso_type = SKB_GSO_TCPV6;
... ... @@ -398,8 +397,8 @@
398 397 */
399 398 memset(&fl6, 0, sizeof(fl6));
400 399 fl6.flowi6_proto = IPPROTO_TCP;
401   - ipv6_addr_copy(&fl6.daddr, &np->daddr);
402   - ipv6_addr_copy(&fl6.saddr, &np->saddr);
  400 + fl6.daddr = np->daddr;
  401 + fl6.saddr = np->saddr;
403 402 fl6.flowi6_oif = sk->sk_bound_dev_if;
404 403 fl6.flowi6_mark = sk->sk_mark;
405 404 fl6.fl6_dport = inet->inet_dport;
... ... @@ -489,8 +488,8 @@
489 488  
490 489 memset(&fl6, 0, sizeof(fl6));
491 490 fl6.flowi6_proto = IPPROTO_TCP;
492   - ipv6_addr_copy(&fl6.daddr, &treq->rmt_addr);
493   - ipv6_addr_copy(&fl6.saddr, &treq->loc_addr);
  491 + fl6.daddr = treq->rmt_addr;
  492 + fl6.saddr = treq->loc_addr;
494 493 fl6.flowlabel = 0;
495 494 fl6.flowi6_oif = treq->iif;
496 495 fl6.flowi6_mark = sk->sk_mark;
... ... @@ -512,7 +511,7 @@
512 511 if (skb) {
513 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 515 err = ip6_xmit(sk, skb, &fl6, opt, np->tclass);
517 516 err = net_xmit_eval(err);
518 517 }
... ... @@ -617,8 +616,7 @@
617 616 tp->md5sig_info->alloced6++;
618 617 }
619 618  
620   - ipv6_addr_copy(&tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr,
621   - peer);
  619 + tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr = *peer;
622 620 tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.key = newkey;
623 621 tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.keylen = newkeylen;
624 622  
... ... @@ -750,8 +748,8 @@
750 748  
751 749 bp = &hp->md5_blk.ip6;
752 750 /* 1. TCP pseudo-header (RFC2460) */
753   - ipv6_addr_copy(&bp->saddr, saddr);
754   - ipv6_addr_copy(&bp->daddr, daddr);
  751 + bp->saddr = *saddr;
  752 + bp->daddr = *daddr;
755 753 bp->protocol = cpu_to_be32(IPPROTO_TCP);
756 754 bp->len = cpu_to_be32(nbytes);
757 755  
... ... @@ -1039,8 +1037,8 @@
1039 1037 #endif
1040 1038  
1041 1039 memset(&fl6, 0, sizeof(fl6));
1042   - ipv6_addr_copy(&fl6.daddr, &ipv6_hdr(skb)->saddr);
1043   - ipv6_addr_copy(&fl6.saddr, &ipv6_hdr(skb)->daddr);
  1040 + fl6.daddr = ipv6_hdr(skb)->saddr;
  1041 + fl6.saddr = ipv6_hdr(skb)->daddr;
1044 1042  
1045 1043 buff->ip_summed = CHECKSUM_PARTIAL;
1046 1044 buff->csum = 0;
... ... @@ -1250,8 +1248,8 @@
1250 1248 tcp_openreq_init(req, &tmp_opt, skb);
1251 1249  
1252 1250 treq = inet6_rsk(req);
1253   - ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr);
1254   - ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr);
  1251 + treq->rmt_addr = ipv6_hdr(skb)->saddr;
  1252 + treq->loc_addr = ipv6_hdr(skb)->daddr;
1255 1253 if (!want_cookie || tmp_opt.tstamp_ok)
1256 1254 TCP_ECN_create_request(req, tcp_hdr(skb));
1257 1255  
... ... @@ -1380,7 +1378,7 @@
1380 1378  
1381 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 1383 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped;
1386 1384 newsk->sk_backlog_rcv = tcp_v4_do_rcv;
... ... @@ -1444,9 +1442,9 @@
1444 1442  
1445 1443 memcpy(newnp, np, sizeof(struct ipv6_pinfo));
1446 1444  
1447   - ipv6_addr_copy(&newnp->daddr, &treq->rmt_addr);
1448   - ipv6_addr_copy(&newnp->saddr, &treq->loc_addr);
1449   - ipv6_addr_copy(&newnp->rcv_saddr, &treq->loc_addr);
  1445 + newnp->daddr = treq->rmt_addr;
  1446 + newnp->saddr = treq->loc_addr;
  1447 + newnp->rcv_saddr = treq->loc_addr;
1450 1448 newsk->sk_bound_dev_if = treq->iif;
1451 1449  
1452 1450 /* Now IPv6 options...
... ... @@ -417,8 +417,7 @@
417 417 ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr,
418 418 &sin6->sin6_addr);
419 419 else {
420   - ipv6_addr_copy(&sin6->sin6_addr,
421   - &ipv6_hdr(skb)->saddr);
  420 + sin6->sin6_addr = ipv6_hdr(skb)->saddr;
422 421 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
423 422 sin6->sin6_scope_id = IP6CB(skb)->iif;
424 423 }
425 424  
... ... @@ -1115,11 +1114,11 @@
1115 1114  
1116 1115 fl6.flowi6_proto = sk->sk_protocol;
1117 1116 if (!ipv6_addr_any(daddr))
1118   - ipv6_addr_copy(&fl6.daddr, daddr);
  1117 + fl6.daddr = *daddr;
1119 1118 else
1120 1119 fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */
1121 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 1122 fl6.fl6_sport = inet->inet_sport;
1124 1123  
1125 1124 final_p = fl6_update_dst(&fl6, opt, &final);
net/ipv6/xfrm6_mode_beet.c
... ... @@ -72,8 +72,8 @@
72 72 top_iph->nexthdr = IPPROTO_BEETPH;
73 73 }
74 74  
75   - ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr);
76   - ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr);
  75 + top_iph->saddr = *(struct in6_addr *)&x->props.saddr;
  76 + top_iph->daddr = *(struct in6_addr *)&x->id.daddr;
77 77 return 0;
78 78 }
79 79  
... ... @@ -99,8 +99,8 @@
99 99  
100 100 ip6h = ipv6_hdr(skb);
101 101 ip6h->payload_len = htons(skb->len - size);
102   - ipv6_addr_copy(&ip6h->daddr, (struct in6_addr *) &x->sel.daddr.a6);
103   - ipv6_addr_copy(&ip6h->saddr, (struct in6_addr *) &x->sel.saddr.a6);
  102 + ip6h->daddr = *(struct in6_addr *)&x->sel.daddr.a6;
  103 + ip6h->saddr = *(struct in6_addr *)&x->sel.saddr.a6;
104 104 err = 0;
105 105 out:
106 106 return err;
net/ipv6/xfrm6_mode_tunnel.c
... ... @@ -55,8 +55,8 @@
55 55 dsfield &= ~INET_ECN_MASK;
56 56 ipv6_change_dsfield(top_iph, 0, dsfield);
57 57 top_iph->hop_limit = ip6_dst_hoplimit(dst->child);
58   - ipv6_addr_copy(&top_iph->saddr, (const struct in6_addr *)&x->props.saddr);
59   - ipv6_addr_copy(&top_iph->daddr, (const struct in6_addr *)&x->id.daddr);
  58 + top_iph->saddr = *(struct in6_addr *)&x->props.saddr;
  59 + top_iph->daddr = *(struct in6_addr *)&x->id.daddr;
60 60 return 0;
61 61 }
62 62  
net/ipv6/xfrm6_output.c
... ... @@ -49,7 +49,7 @@
49 49 struct sock *sk = skb->sk;
50 50  
51 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 54 ipv6_local_rxpmtu(sk, &fl6, mtu);
55 55 }
... ... @@ -60,7 +60,7 @@
60 60 struct sock *sk = skb->sk;
61 61  
62 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 65 ipv6_local_error(sk, EMSGSIZE, &fl6, mtu);
66 66 }
net/ipv6/xfrm6_policy.c
... ... @@ -132,8 +132,8 @@
132 132 memset(fl6, 0, sizeof(struct flowi6));
133 133 fl6->flowi6_mark = skb->mark;
134 134  
135   - ipv6_addr_copy(&fl6->daddr, reverse ? &hdr->saddr : &hdr->daddr);
136   - ipv6_addr_copy(&fl6->saddr, reverse ? &hdr->daddr : &hdr->saddr);
  135 + fl6->daddr = reverse ? hdr->saddr : hdr->daddr;
  136 + fl6->saddr = reverse ? hdr->daddr : hdr->saddr;
137 137  
138 138 while (nh + offset + 1 < skb->data ||
139 139 pskb_may_pull(skb, nh + offset + 1 - skb->data)) {
net/ipv6/xfrm6_state.c
... ... @@ -27,8 +27,8 @@
27 27  
28 28 /* Initialize temporary selector matching only
29 29 * to current session. */
30   - ipv6_addr_copy((struct in6_addr *)&sel->daddr, &fl6->daddr);
31   - ipv6_addr_copy((struct in6_addr *)&sel->saddr, &fl6->saddr);
  30 + *(struct in6_addr *)&sel->daddr = fl6->daddr;
  31 + *(struct in6_addr *)&sel->saddr = fl6->saddr;
32 32 sel->dport = xfrm_flowi_dport(fl, &fl6->uli);
33 33 sel->dport_mask = htons(0xffff);
34 34 sel->sport = xfrm_flowi_sport(fl, &fl6->uli);
... ... @@ -712,7 +712,7 @@
712 712 sin6->sin6_family = AF_INET6;
713 713 sin6->sin6_port = port;
714 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 716 sin6->sin6_scope_id = 0;
717 717 return 128;
718 718 }
net/netfilter/ipset/ip_set_hash_ip.c
... ... @@ -241,7 +241,7 @@
241 241 static inline void
242 242 hash_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  
247 247 static inline void
net/netfilter/ipset/ip_set_hash_net.c
... ... @@ -267,7 +267,7 @@
267 267 hash_net6_data_copy(struct hash_net6_elem *dst,
268 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 271 dst->cidr = src->cidr;
272 272 }
273 273  
net/netfilter/ipvs/ip_vs_core.c
... ... @@ -983,7 +983,7 @@
983 983 if (!cp)
984 984 return NF_ACCEPT;
985 985  
986   - ipv6_addr_copy(&snet.in6, &iph->saddr);
  986 + snet.in6 = iph->saddr;
987 987 return handle_response_icmp(AF_INET6, skb, &snet, cih->nexthdr, cp,
988 988 pp, offset, sizeof(struct ipv6hdr));
989 989 }
net/netfilter/ipvs/ip_vs_sync.c
... ... @@ -603,9 +603,9 @@
603 603 #ifdef CONFIG_IP_VS_IPV6
604 604 if (cp->af == AF_INET6) {
605 605 p += sizeof(struct ip_vs_sync_v6);
606   - ipv6_addr_copy(&s->v6.caddr, &cp->caddr.in6);
607   - ipv6_addr_copy(&s->v6.vaddr, &cp->vaddr.in6);
608   - ipv6_addr_copy(&s->v6.daddr, &cp->daddr.in6);
  606 + s->v6.caddr = cp->caddr.in6;
  607 + s->v6.vaddr = cp->vaddr.in6;
  608 + s->v6.daddr = cp->daddr.in6;
609 609 } else
610 610 #endif
611 611 {
net/netfilter/ipvs/ip_vs_xmit.c
... ... @@ -235,7 +235,7 @@
235 235 goto out_err;
236 236 }
237 237 }
238   - ipv6_addr_copy(ret_saddr, &fl6.saddr);
  238 + *ret_saddr = fl6.saddr;
239 239 return dst;
240 240  
241 241 out_err:
... ... @@ -279,7 +279,7 @@
279 279 atomic_read(&rt->dst.__refcnt));
280 280 }
281 281 if (ret_saddr)
282   - ipv6_addr_copy(ret_saddr, &dest->dst_saddr.in6);
  282 + *ret_saddr = dest->dst_saddr.in6;
283 283 spin_unlock(&dest->dst_lock);
284 284 } else {
285 285 dst = __ip_vs_route_output_v6(net, daddr, ret_saddr, do_xfrm);
... ... @@ -705,7 +705,7 @@
705 705 /* mangle the packet */
706 706 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp))
707 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 710 if (!local || !skb->dev) {
711 711 /* drop the old route when skb is not shared */
... ... @@ -967,8 +967,8 @@
967 967 be16_add_cpu(&iph->payload_len, sizeof(*old_iph));
968 968 iph->priority = old_iph->priority;
969 969 memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl));
970   - ipv6_addr_copy(&iph->daddr, &cp->daddr.in6);
971   - ipv6_addr_copy(&iph->saddr, &saddr);
  970 + iph->daddr = cp->daddr.in6;
  971 + iph->saddr = saddr;
972 972 iph->hop_limit = old_iph->hop_limit;
973 973  
974 974 /* Another hack: avoid icmp_send in ip_fragment */
net/netfilter/nf_conntrack_h323_main.c
... ... @@ -750,10 +750,10 @@
750 750 struct rt6_info *rt1, *rt2;
751 751  
752 752 memset(&fl1, 0, sizeof(fl1));
753   - ipv6_addr_copy(&fl1.daddr, &src->in6);
  753 + fl1.daddr = src->in6;
754 754  
755 755 memset(&fl2, 0, sizeof(fl2));
756   - ipv6_addr_copy(&fl2.daddr, &dst->in6);
  756 + fl2.daddr = dst->in6;
757 757 if (!afinfo->route(&init_net, (struct dst_entry **)&rt1,
758 758 flowi6_to_flowi(&fl1), false)) {
759 759 if (!afinfo->route(&init_net, (struct dst_entry **)&rt2,
net/netfilter/xt_TCPMSS.c
... ... @@ -161,7 +161,7 @@
161 161 struct flowi6 *fl6 = &fl.u.ip6;
162 162  
163 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 166 rcu_read_lock();
167 167 ai = nf_get_afinfo(family);
net/netfilter/xt_addrtype.c
... ... @@ -42,7 +42,7 @@
42 42 int route_err;
43 43  
44 44 memset(&flow, 0, sizeof(flow));
45   - ipv6_addr_copy(&flow.daddr, addr);
  45 + flow.daddr = *addr;
46 46 if (dev)
47 47 flow.flowi6_oif = dev->ifindex;
48 48  
net/netlabel/netlabel_kapi.c
... ... @@ -155,12 +155,12 @@
155 155 if (map6 == NULL)
156 156 goto cfg_unlbl_map_add_failure;
157 157 map6->type = NETLBL_NLTYPE_UNLABELED;
158   - ipv6_addr_copy(&map6->list.addr, addr6);
  158 + map6->list.addr = *addr6;
159 159 map6->list.addr.s6_addr32[0] &= mask6->s6_addr32[0];
160 160 map6->list.addr.s6_addr32[1] &= mask6->s6_addr32[1];
161 161 map6->list.addr.s6_addr32[2] &= mask6->s6_addr32[2];
162 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 164 map6->list.valid = 1;
165 165 ret_val = netlbl_af4list_add(&map4->list,
166 166 &addrmap->list4);
net/netlabel/netlabel_mgmt.c
... ... @@ -216,12 +216,12 @@
216 216 ret_val = -ENOMEM;
217 217 goto add_failure;
218 218 }
219   - ipv6_addr_copy(&map->list.addr, addr);
  219 + map->list.addr = *addr;
220 220 map->list.addr.s6_addr32[0] &= mask->s6_addr32[0];
221 221 map->list.addr.s6_addr32[1] &= mask->s6_addr32[1];
222 222 map->list.addr.s6_addr32[2] &= mask->s6_addr32[2];
223 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 225 map->list.valid = 1;
226 226 map->type = entry->type;
227 227  
net/netlabel/netlabel_unlabeled.c
... ... @@ -300,12 +300,12 @@
300 300 if (entry == NULL)
301 301 return -ENOMEM;
302 302  
303   - ipv6_addr_copy(&entry->list.addr, addr);
  303 + entry->list.addr = *addr;
304 304 entry->list.addr.s6_addr32[0] &= mask->s6_addr32[0];
305 305 entry->list.addr.s6_addr32[1] &= mask->s6_addr32[1];
306 306 entry->list.addr.s6_addr32[2] &= mask->s6_addr32[2];
307 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 309 entry->list.valid = 1;
310 310 entry->secid = secid;
311 311  
... ... @@ -107,7 +107,7 @@
107 107 if (addr) {
108 108 addr->a.v6.sin6_family = AF_INET6;
109 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 111 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex;
112 112 addr->valid = 1;
113 113 spin_lock_bh(&sctp_local_addr_lock);
... ... @@ -219,8 +219,8 @@
219 219 /* Fill in the dest address from the route entry passed with the skb
220 220 * and the source address from the transport.
221 221 */
222   - ipv6_addr_copy(&fl6.daddr, &transport->ipaddr.v6.sin6_addr);
223   - ipv6_addr_copy(&fl6.saddr, &transport->saddr.v6.sin6_addr);
  222 + fl6.daddr = transport->ipaddr.v6.sin6_addr;
  223 + fl6.saddr = transport->saddr.v6.sin6_addr;
224 224  
225 225 fl6.flowlabel = np->flow_label;
226 226 IP6_ECN_flow_xmit(sk, fl6.flowlabel);
... ... @@ -231,7 +231,7 @@
231 231  
232 232 if (np->opt && np->opt->srcrt) {
233 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 237 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\n",
... ... @@ -265,7 +265,7 @@
265 265 sctp_scope_t scope;
266 266  
267 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 269 fl6->fl6_dport = daddr->v6.sin6_port;
270 270 fl6->flowi6_proto = IPPROTO_SCTP;
271 271 if (ipv6_addr_type(&daddr->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL)
... ... @@ -277,7 +277,7 @@
277 277 fl6->fl6_sport = htons(asoc->base.bind_addr.port);
278 278  
279 279 if (saddr) {
280   - ipv6_addr_copy(&fl6->saddr, &saddr->v6.sin6_addr);
  280 + fl6->saddr = saddr->v6.sin6_addr;
281 281 fl6->fl6_sport = saddr->v6.sin6_port;
282 282 SCTP_DEBUG_PRINTK("SRC=%pI6 - ", &fl6->saddr);
283 283 }
... ... @@ -334,7 +334,7 @@
334 334 }
335 335 rcu_read_unlock();
336 336 if (baddr) {
337   - ipv6_addr_copy(&fl6->saddr, &baddr->v6.sin6_addr);
  337 + fl6->saddr = baddr->v6.sin6_addr;
338 338 fl6->fl6_sport = baddr->v6.sin6_port;
339 339 dst = ip6_dst_lookup_flow(sk, fl6, NULL, false);
340 340 }
... ... @@ -375,7 +375,7 @@
375 375  
376 376 if (t->dst) {
377 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 @@
400 400 if (addr) {
401 401 addr->a.v6.sin6_family = AF_INET6;
402 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 404 addr->a.v6.sin6_scope_id = dev->ifindex;
405 405 addr->valid = 1;
406 406 INIT_LIST_HEAD(&addr->list);
... ... @@ -416,7 +416,6 @@
416 416 static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb,
417 417 int is_saddr)
418 418 {
419   - void *from;
420 419 __be16 *port;
421 420 struct sctphdr *sh;
422 421  
423 422  
424 423  
... ... @@ -428,12 +427,11 @@
428 427 sh = sctp_hdr(skb);
429 428 if (is_saddr) {
430 429 *port = sh->source;
431   - from = &ipv6_hdr(skb)->saddr;
  430 + addr->v6.sin6_addr = ipv6_hdr(skb)->saddr;
432 431 } else {
433 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 437 /* Initialize an sctp_addr from a socket. */
... ... @@ -441,7 +439,7 @@
441 439 {
442 440 addr->v6.sin6_family = AF_INET6;
443 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 445 /* Initialize sk->sk_rcv_saddr from sctp_addr. */
... ... @@ -454,7 +452,7 @@
454 452 inet6_sk(sk)->rcv_saddr.s6_addr32[3] =
455 453 addr->v4.sin_addr.s_addr;
456 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 @@
467 465 inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff);
468 466 inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr;
469 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 @@
479 477 addr->v6.sin6_family = AF_INET6;
480 478 addr->v6.sin6_port = port;
481 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 481 addr->v6.sin6_scope_id = iif;
484 482 }
485 483  
... ... @@ -493,7 +491,7 @@
493 491  
494 492 param->v6.param_hdr.type = SCTP_PARAM_IPV6_ADDRESS;
495 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 496 return length;
499 497 }
... ... @@ -504,7 +502,7 @@
504 502 {
505 503 addr->sa.sa_family = AF_INET6;
506 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 508 /* Compare addresses exactly.
... ... @@ -759,7 +757,7 @@
759 757 }
760 758  
761 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 761 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
764 762 sin6->sin6_scope_id = sin6from->sin6_scope_id;
765 763 }
... ... @@ -787,7 +785,7 @@
787 785 }
788 786  
789 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 789 if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) {
792 790 struct sctp_ulpevent *ev = sctp_skb2event(skb);
793 791 sin6->sin6_scope_id = ev->iif;
... ... @@ -804,7 +804,7 @@
804 804 struct sockaddr_in6 *sin6;
805 805  
806 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 809 SCTP_DEBUG_PRINTK_IPADDR("send_asconf_del_ip: keep the last address asoc: %p ",
810 810 " at %p\n", asoc, asoc->asconf_addr_del_pending,
net/sunrpc/svcauth_unix.c
... ... @@ -134,7 +134,7 @@
134 134 struct ip_map *item = container_of(citem, struct ip_map, h);
135 135  
136 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 }
139 139 static void update(struct cache_head *cnew, struct cache_head *citem)
140 140 {
... ... @@ -274,7 +274,7 @@
274 274 }
275 275 im = container_of(h, struct ip_map, h);
276 276 /* class addr domain */
277   - ipv6_addr_copy(&addr, &im->m_addr);
  277 + addr = im->m_addr;
278 278  
279 279 if (test_bit(CACHE_VALID, &h->flags) &&
280 280 !test_bit(CACHE_NEGATIVE, &h->flags))
... ... @@ -297,7 +297,7 @@
297 297 struct cache_head *ch;
298 298  
299 299 strcpy(ip.m_class, class);
300   - ipv6_addr_copy(&ip.m_addr, addr);
  300 + ip.m_addr = *addr;
301 301 ch = sunrpc_cache_lookup(cd, &ip.h,
302 302 hash_str(class, IP_HASHBITS) ^
303 303 hash_ip6(*addr));
net/sunrpc/svcsock.c
... ... @@ -157,7 +157,7 @@
157 157 cmh->cmsg_level = SOL_IPV6;
158 158 cmh->cmsg_type = IPV6_PKTINFO;
159 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 161 cmh->cmsg_len = CMSG_LEN(sizeof(*pki));
162 162 }
163 163 break;
... ... @@ -523,7 +523,7 @@
523 523 return 0;
524 524  
525 525 daddr->sin6_family = AF_INET6;
526   - ipv6_addr_copy(&daddr->sin6_addr, &pki->ipi6_addr);
  526 + daddr->sin6_addr = pki->ipi6_addr;
527 527 daddr->sin6_scope_id = pki->ipi6_ifindex;
528 528 return 1;
529 529 }
net/xfrm/xfrm_state.c
... ... @@ -1035,16 +1035,12 @@
1035 1035 break;
1036 1036  
1037 1037 case AF_INET6:
1038   - ipv6_addr_copy((struct in6_addr *)x->sel.daddr.a6,
1039   - (const struct in6_addr *)daddr);
1040   - ipv6_addr_copy((struct in6_addr *)x->sel.saddr.a6,
1041   - (const struct in6_addr *)saddr);
  1038 + *(struct in6_addr *)x->sel.daddr.a6 = *(struct in6_addr *)daddr;
  1039 + *(struct in6_addr *)x->sel.saddr.a6 = *(struct in6_addr *)saddr;
1042 1040 x->sel.prefixlen_d = 128;
1043 1041 x->sel.prefixlen_s = 128;
1044   - ipv6_addr_copy((struct in6_addr *)x->props.saddr.a6,
1045   - (const struct in6_addr *)saddr);
1046   - ipv6_addr_copy((struct in6_addr *)x->id.daddr.a6,
1047   - (const struct in6_addr *)daddr);
  1042 + *(struct in6_addr *)x->props.saddr.a6 = *(struct in6_addr *)saddr;
  1043 + *(struct in6_addr *)x->id.daddr.a6 = *(struct in6_addr *)daddr;
1048 1044 break;
1049 1045 }
1050 1046  
security/lsm_audit.c
... ... @@ -118,8 +118,8 @@
118 118 ip6 = ipv6_hdr(skb);
119 119 if (ip6 == NULL)
120 120 return -EINVAL;
121   - ipv6_addr_copy(&ad->u.net.v6info.saddr, &ip6->saddr);
122   - ipv6_addr_copy(&ad->u.net.v6info.daddr, &ip6->daddr);
  121 + ad->u.net.v6info.saddr = ip6->saddr;
  122 + ad->u.net.v6info.daddr = ip6->daddr;
123 123 ret = 0;
124 124 /* IPv6 can have several extension header before the Transport header
125 125 * skip them */
security/selinux/hooks.c
... ... @@ -3567,8 +3567,8 @@
3567 3567 if (ip6 == NULL)
3568 3568 goto out;
3569 3569  
3570   - ipv6_addr_copy(&ad->u.net.v6info.saddr, &ip6->saddr);
3571   - ipv6_addr_copy(&ad->u.net.v6info.daddr, &ip6->daddr);
  3570 + ad->u.net.v6info.saddr = ip6->saddr;
  3571 + ad->u.net.v6info.daddr = ip6->daddr;
3572 3572 ret = 0;
3573 3573  
3574 3574 nexthdr = ip6->nexthdr;
... ... @@ -3871,7 +3871,7 @@
3871 3871 if (family == PF_INET)
3872 3872 ad.u.net.v4info.saddr = addr4->sin_addr.s_addr;
3873 3873 else
3874   - ipv6_addr_copy(&ad.u.net.v6info.saddr, &addr6->sin6_addr);
  3874 + ad.u.net.v6info.saddr = addr6->sin6_addr;
3875 3875  
3876 3876 err = avc_has_perm(sksec->sid, sid,
3877 3877 sksec->sclass, node_perm, &ad);
security/selinux/netnode.c
... ... @@ -220,7 +220,7 @@
220 220 case PF_INET6:
221 221 ret = security_node_sid(PF_INET6,
222 222 addr, sizeof(struct in6_addr), sid);
223   - ipv6_addr_copy(&new->nsec.addr.ipv6, addr);
  223 + new->nsec.addr.ipv6 = *(struct in6_addr *)addr;
224 224 break;
225 225 default:
226 226 BUG();