diff options
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/actions.c | 4 | ||||
-rw-r--r-- | net/openvswitch/flow.c | 16 | ||||
-rw-r--r-- | net/openvswitch/flow_netlink.c | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 2c77e7b1a913..c36856a457ca 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c | |||
@@ -134,8 +134,8 @@ static int set_eth_addr(struct sk_buff *skb, | |||
134 | 134 | ||
135 | skb_postpull_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2); | 135 | skb_postpull_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2); |
136 | 136 | ||
137 | memcpy(eth_hdr(skb)->h_source, eth_key->eth_src, ETH_ALEN); | 137 | ether_addr_copy(eth_hdr(skb)->h_source, eth_key->eth_src); |
138 | memcpy(eth_hdr(skb)->h_dest, eth_key->eth_dst, ETH_ALEN); | 138 | ether_addr_copy(eth_hdr(skb)->h_dest, eth_key->eth_dst); |
139 | 139 | ||
140 | ovs_skb_postpush_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2); | 140 | ovs_skb_postpush_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2); |
141 | 141 | ||
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 2998989e76db..332aa01492f1 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c | |||
@@ -372,14 +372,14 @@ static int parse_icmpv6(struct sk_buff *skb, struct sw_flow_key *key, | |||
372 | && opt_len == 8) { | 372 | && opt_len == 8) { |
373 | if (unlikely(!is_zero_ether_addr(key->ipv6.nd.sll))) | 373 | if (unlikely(!is_zero_ether_addr(key->ipv6.nd.sll))) |
374 | goto invalid; | 374 | goto invalid; |
375 | memcpy(key->ipv6.nd.sll, | 375 | ether_addr_copy(key->ipv6.nd.sll, |
376 | &nd->opt[offset+sizeof(*nd_opt)], ETH_ALEN); | 376 | &nd->opt[offset+sizeof(*nd_opt)]); |
377 | } else if (nd_opt->nd_opt_type == ND_OPT_TARGET_LL_ADDR | 377 | } else if (nd_opt->nd_opt_type == ND_OPT_TARGET_LL_ADDR |
378 | && opt_len == 8) { | 378 | && opt_len == 8) { |
379 | if (unlikely(!is_zero_ether_addr(key->ipv6.nd.tll))) | 379 | if (unlikely(!is_zero_ether_addr(key->ipv6.nd.tll))) |
380 | goto invalid; | 380 | goto invalid; |
381 | memcpy(key->ipv6.nd.tll, | 381 | ether_addr_copy(key->ipv6.nd.tll, |
382 | &nd->opt[offset+sizeof(*nd_opt)], ETH_ALEN); | 382 | &nd->opt[offset+sizeof(*nd_opt)]); |
383 | } | 383 | } |
384 | 384 | ||
385 | icmp_len -= opt_len; | 385 | icmp_len -= opt_len; |
@@ -439,8 +439,8 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key) | |||
439 | * header in the linear data area. | 439 | * header in the linear data area. |
440 | */ | 440 | */ |
441 | eth = eth_hdr(skb); | 441 | eth = eth_hdr(skb); |
442 | memcpy(key->eth.src, eth->h_source, ETH_ALEN); | 442 | ether_addr_copy(key->eth.src, eth->h_source); |
443 | memcpy(key->eth.dst, eth->h_dest, ETH_ALEN); | 443 | ether_addr_copy(key->eth.dst, eth->h_dest); |
444 | 444 | ||
445 | __skb_pull(skb, 2 * ETH_ALEN); | 445 | __skb_pull(skb, 2 * ETH_ALEN); |
446 | /* We are going to push all headers that we pull, so no need to | 446 | /* We are going to push all headers that we pull, so no need to |
@@ -538,8 +538,8 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key) | |||
538 | key->ip.proto = ntohs(arp->ar_op); | 538 | key->ip.proto = ntohs(arp->ar_op); |
539 | memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src)); | 539 | memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src)); |
540 | memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst)); | 540 | memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst)); |
541 | memcpy(key->ipv4.arp.sha, arp->ar_sha, ETH_ALEN); | 541 | ether_addr_copy(key->ipv4.arp.sha, arp->ar_sha); |
542 | memcpy(key->ipv4.arp.tha, arp->ar_tha, ETH_ALEN); | 542 | ether_addr_copy(key->ipv4.arp.tha, arp->ar_tha); |
543 | } | 543 | } |
544 | } else if (key->eth.type == htons(ETH_P_IPV6)) { | 544 | } else if (key->eth.type == htons(ETH_P_IPV6)) { |
545 | int nh_len; /* IPv6 Header + Extensions */ | 545 | int nh_len; /* IPv6 Header + Extensions */ |
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 7bd09b75ebaa..5511ad18be51 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c | |||
@@ -986,8 +986,8 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, | |||
986 | goto nla_put_failure; | 986 | goto nla_put_failure; |
987 | 987 | ||
988 | eth_key = nla_data(nla); | 988 | eth_key = nla_data(nla); |
989 | memcpy(eth_key->eth_src, output->eth.src, ETH_ALEN); | 989 | ether_addr_copy(eth_key->eth_src, output->eth.src); |
990 | memcpy(eth_key->eth_dst, output->eth.dst, ETH_ALEN); | 990 | ether_addr_copy(eth_key->eth_dst, output->eth.dst); |
991 | 991 | ||
992 | if (swkey->eth.tci || swkey->eth.type == htons(ETH_P_8021Q)) { | 992 | if (swkey->eth.tci || swkey->eth.type == htons(ETH_P_8021Q)) { |
993 | __be16 eth_type; | 993 | __be16 eth_type; |
@@ -1059,8 +1059,8 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, | |||
1059 | arp_key->arp_sip = output->ipv4.addr.src; | 1059 | arp_key->arp_sip = output->ipv4.addr.src; |
1060 | arp_key->arp_tip = output->ipv4.addr.dst; | 1060 | arp_key->arp_tip = output->ipv4.addr.dst; |
1061 | arp_key->arp_op = htons(output->ip.proto); | 1061 | arp_key->arp_op = htons(output->ip.proto); |
1062 | memcpy(arp_key->arp_sha, output->ipv4.arp.sha, ETH_ALEN); | 1062 | ether_addr_copy(arp_key->arp_sha, output->ipv4.arp.sha); |
1063 | memcpy(arp_key->arp_tha, output->ipv4.arp.tha, ETH_ALEN); | 1063 | ether_addr_copy(arp_key->arp_tha, output->ipv4.arp.tha); |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | if ((swkey->eth.type == htons(ETH_P_IP) || | 1066 | if ((swkey->eth.type == htons(ETH_P_IP) || |
@@ -1147,8 +1147,8 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, | |||
1147 | nd_key = nla_data(nla); | 1147 | nd_key = nla_data(nla); |
1148 | memcpy(nd_key->nd_target, &output->ipv6.nd.target, | 1148 | memcpy(nd_key->nd_target, &output->ipv6.nd.target, |
1149 | sizeof(nd_key->nd_target)); | 1149 | sizeof(nd_key->nd_target)); |
1150 | memcpy(nd_key->nd_sll, output->ipv6.nd.sll, ETH_ALEN); | 1150 | ether_addr_copy(nd_key->nd_sll, output->ipv6.nd.sll); |
1151 | memcpy(nd_key->nd_tll, output->ipv6.nd.tll, ETH_ALEN); | 1151 | ether_addr_copy(nd_key->nd_tll, output->ipv6.nd.tll); |
1152 | } | 1152 | } |
1153 | } | 1153 | } |
1154 | } | 1154 | } |