diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-27 14:17:38 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-06-11 13:38:17 -0400 |
commit | 81b302a321a0d99ff172b8cb2a8de17bff2f9499 (patch) | |
tree | 4b12e8a36c801b1f14c45730a03bc40b40865996 /net/key | |
parent | 5f95ac9111f75aa240dc3bcabffc0f047f13cb64 (diff) |
key: Use xfrm_addr_cmp() where appropriate.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/key')
-rw-r--r-- | net/key/af_key.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 771bd61d6303..841af9f2d5e0 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -767,14 +767,7 @@ static struct sk_buff *__pfkey_xfrm_state2msg(struct xfrm_state *x, | |||
767 | } | 767 | } |
768 | 768 | ||
769 | /* identity & sensitivity */ | 769 | /* identity & sensitivity */ |
770 | 770 | if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, x->props.family)) | |
771 | if ((x->props.family == AF_INET && | ||
772 | x->sel.saddr.a4 != x->props.saddr.a4) | ||
773 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
774 | || (x->props.family == AF_INET6 && | ||
775 | memcmp (x->sel.saddr.a6, x->props.saddr.a6, sizeof (struct in6_addr))) | ||
776 | #endif | ||
777 | ) | ||
778 | size += sizeof(struct sadb_address) + sockaddr_size; | 771 | size += sizeof(struct sadb_address) + sockaddr_size; |
779 | 772 | ||
780 | if (add_keys) { | 773 | if (add_keys) { |