aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 5b426a646544..cc2630ac8061 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -762,7 +762,7 @@ static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x,
762 } 762 }
763 763
764 /* identity & sensitivity */ 764 /* identity & sensitivity */
765 if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, x->props.family)) 765 if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr, x->props.family))
766 size += sizeof(struct sadb_address) + sockaddr_size; 766 size += sizeof(struct sadb_address) + sockaddr_size;
767 767
768 if (add_keys) { 768 if (add_keys) {
@@ -909,8 +909,8 @@ static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x,
909 if (!addr->sadb_address_prefixlen) 909 if (!addr->sadb_address_prefixlen)
910 BUG(); 910 BUG();
911 911
912 if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, 912 if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr,
913 x->props.family)) { 913 x->props.family)) {
914 addr = (struct sadb_address*) skb_put(skb, 914 addr = (struct sadb_address*) skb_put(skb,
915 sizeof(struct sadb_address)+sockaddr_size); 915 sizeof(struct sadb_address)+sockaddr_size);
916 addr->sadb_address_len = 916 addr->sadb_address_len =
@@ -1321,7 +1321,7 @@ static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_
1321 1321
1322 if (hdr->sadb_msg_seq) { 1322 if (hdr->sadb_msg_seq) {
1323 x = xfrm_find_acq_byseq(net, DUMMY_MARK, hdr->sadb_msg_seq); 1323 x = xfrm_find_acq_byseq(net, DUMMY_MARK, hdr->sadb_msg_seq);
1324 if (x && xfrm_addr_cmp(&x->id.daddr, xdaddr, family)) { 1324 if (x && !xfrm_addr_equal(&x->id.daddr, xdaddr, family)) {
1325 xfrm_state_put(x); 1325 xfrm_state_put(x);
1326 x = NULL; 1326 x = NULL;
1327 } 1327 }