projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: remove ipv6_addr_copy()
[cascardo/linux.git]
/
net
/
core
/
pktgen.c
diff --git
a/net/core/pktgen.c
b/net/core/pktgen.c
index
0001c24
..
aa53a35
100644
(file)
--- a/
net/core/pktgen.c
+++ b/
net/core/pktgen.c
@@
-1304,7
+1304,7
@@
static ssize_t pktgen_if_write(struct file *file,
scan_ip6(buf, pkt_dev->in6_daddr.s6_addr);
snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_daddr);
scan_ip6(buf, pkt_dev->in6_daddr.s6_addr);
snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_daddr);
-
ipv6_addr_copy(&pkt_dev->cur_in6_daddr, &pkt_dev->in6_daddr)
;
+
pkt_dev->cur_in6_daddr = pkt_dev->in6_daddr
;
if (debug)
printk(KERN_DEBUG "pktgen: dst6 set to: %s\n", buf);
if (debug)
printk(KERN_DEBUG "pktgen: dst6 set to: %s\n", buf);
@@
-1327,8
+1327,7
@@
static ssize_t pktgen_if_write(struct file *file,
scan_ip6(buf, pkt_dev->min_in6_daddr.s6_addr);
snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->min_in6_daddr);
scan_ip6(buf, pkt_dev->min_in6_daddr.s6_addr);
snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->min_in6_daddr);
- ipv6_addr_copy(&pkt_dev->cur_in6_daddr,
- &pkt_dev->min_in6_daddr);
+ pkt_dev->cur_in6_daddr = pkt_dev->min_in6_daddr;
if (debug)
printk(KERN_DEBUG "pktgen: dst6_min set to: %s\n", buf);
if (debug)
printk(KERN_DEBUG "pktgen: dst6_min set to: %s\n", buf);
@@
-1371,7
+1370,7
@@
static ssize_t pktgen_if_write(struct file *file,
scan_ip6(buf, pkt_dev->in6_saddr.s6_addr);
snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_saddr);
scan_ip6(buf, pkt_dev->in6_saddr.s6_addr);
snprintf(buf, sizeof(buf), "%pI6c", &pkt_dev->in6_saddr);
-
ipv6_addr_copy(&pkt_dev->cur_in6_saddr, &pkt_dev->in6_saddr)
;
+
pkt_dev->cur_in6_saddr = pkt_dev->in6_saddr
;
if (debug)
printk(KERN_DEBUG "pktgen: src6 set to: %s\n", buf);
if (debug)
printk(KERN_DEBUG "pktgen: src6 set to: %s\n", buf);
@@
-2079,9
+2078,7
@@
static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
ifp = ifp->if_next) {
if (ifp->scope == IFA_LINK &&
!(ifp->flags & IFA_F_TENTATIVE)) {
ifp = ifp->if_next) {
if (ifp->scope == IFA_LINK &&
!(ifp->flags & IFA_F_TENTATIVE)) {
- ipv6_addr_copy(&pkt_dev->
- cur_in6_saddr,
- &ifp->addr);
+ pkt_dev->cur_in6_saddr = ifp->addr;
err = 0;
break;
}
err = 0;
break;
}
@@
-2958,8
+2955,8
@@
static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
iph->payload_len = htons(sizeof(struct udphdr) + datalen);
iph->nexthdr = IPPROTO_UDP;
iph->payload_len = htons(sizeof(struct udphdr) + datalen);
iph->nexthdr = IPPROTO_UDP;
- ip
v6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr)
;
- ip
v6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr)
;
+ ip
h->daddr = pkt_dev->cur_in6_daddr
;
+ ip
h->saddr = pkt_dev->cur_in6_saddr
;
skb->mac_header = (skb->network_header - ETH_HLEN -
pkt_dev->pkt_overhead);
skb->mac_header = (skb->network_header - ETH_HLEN -
pkt_dev->pkt_overhead);