mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
key: Use xfrm_addr_cmp() where appropriate.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
This commit is contained in:
parent
5f95ac9111
commit
81b302a321
@ -767,14 +767,7 @@ static struct sk_buff *__pfkey_xfrm_state2msg(struct xfrm_state *x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* identity & sensitivity */
|
/* identity & sensitivity */
|
||||||
|
if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, x->props.family))
|
||||||
if ((x->props.family == AF_INET &&
|
|
||||||
x->sel.saddr.a4 != x->props.saddr.a4)
|
|
||||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
|
||||||
|| (x->props.family == AF_INET6 &&
|
|
||||||
memcmp (x->sel.saddr.a6, x->props.saddr.a6, sizeof (struct in6_addr)))
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
size += sizeof(struct sadb_address) + sockaddr_size;
|
size += sizeof(struct sadb_address) + sockaddr_size;
|
||||||
|
|
||||||
if (add_keys) {
|
if (add_keys) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user