diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-11-20 22:39:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:43:32 -0500 |
commit | 4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6 (patch) | |
tree | da3fbec7672ac6b967dfa31cec6c88f468a57fa2 /security | |
parent | 40ba84993d66469d336099c5af74c3da5b73e28d (diff) |
net: remove ipv6_addr_copy()
C assignment can handle struct in6_addr copying.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
-rw-r--r-- | security/lsm_audit.c | 4 | ||||
-rw-r--r-- | security/selinux/hooks.c | 6 | ||||
-rw-r--r-- | security/selinux/netnode.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c index 893af8a2fa1e..199616bb68d3 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c | |||
@@ -118,8 +118,8 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb, | |||
118 | ip6 = ipv6_hdr(skb); | 118 | ip6 = ipv6_hdr(skb); |
119 | if (ip6 == NULL) | 119 | if (ip6 == NULL) |
120 | return -EINVAL; | 120 | return -EINVAL; |
121 | ipv6_addr_copy(&ad->u.net.v6info.saddr, &ip6->saddr); | 121 | ad->u.net.v6info.saddr = ip6->saddr; |
122 | ipv6_addr_copy(&ad->u.net.v6info.daddr, &ip6->daddr); | 122 | ad->u.net.v6info.daddr = ip6->daddr; |
123 | ret = 0; | 123 | ret = 0; |
124 | /* IPv6 can have several extension header before the Transport header | 124 | /* IPv6 can have several extension header before the Transport header |
125 | * skip them */ | 125 | * skip them */ |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 1126c10a5e82..7e6c2564e741 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3567,8 +3567,8 @@ static int selinux_parse_skb_ipv6(struct sk_buff *skb, | |||
3567 | if (ip6 == NULL) | 3567 | if (ip6 == NULL) |
3568 | goto out; | 3568 | goto out; |
3569 | 3569 | ||
3570 | ipv6_addr_copy(&ad->u.net.v6info.saddr, &ip6->saddr); | 3570 | ad->u.net.v6info.saddr = ip6->saddr; |
3571 | ipv6_addr_copy(&ad->u.net.v6info.daddr, &ip6->daddr); | 3571 | ad->u.net.v6info.daddr = ip6->daddr; |
3572 | ret = 0; | 3572 | ret = 0; |
3573 | 3573 | ||
3574 | nexthdr = ip6->nexthdr; | 3574 | nexthdr = ip6->nexthdr; |
@@ -3871,7 +3871,7 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in | |||
3871 | if (family == PF_INET) | 3871 | if (family == PF_INET) |
3872 | ad.u.net.v4info.saddr = addr4->sin_addr.s_addr; | 3872 | ad.u.net.v4info.saddr = addr4->sin_addr.s_addr; |
3873 | else | 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 | err = avc_has_perm(sksec->sid, sid, | 3876 | err = avc_has_perm(sksec->sid, sid, |
3877 | sksec->sclass, node_perm, &ad); | 3877 | sksec->sclass, node_perm, &ad); |
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c index 3bf46abaa688..86365857c088 100644 --- a/security/selinux/netnode.c +++ b/security/selinux/netnode.c | |||
@@ -220,7 +220,7 @@ static int sel_netnode_sid_slow(void *addr, u16 family, u32 *sid) | |||
220 | case PF_INET6: | 220 | case PF_INET6: |
221 | ret = security_node_sid(PF_INET6, | 221 | ret = security_node_sid(PF_INET6, |
222 | addr, sizeof(struct in6_addr), sid); | 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 | break; | 224 | break; |
225 | default: | 225 | default: |
226 | BUG(); | 226 | BUG(); |