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 cb75f9b3105e..7b3ba32ca678 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -761,7 +761,7 @@ static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x,
761 } 761 }
762 762
763 /* identity & sensitivity */ 763 /* identity & sensitivity */
764 if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, x->props.family)) 764 if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr, x->props.family))
765 size += sizeof(struct sadb_address) + sockaddr_size; 765 size += sizeof(struct sadb_address) + sockaddr_size;
766 766
767 if (add_keys) { 767 if (add_keys) {
@@ -911,8 +911,8 @@ static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x,
911 if (!addr->sadb_address_prefixlen) 911 if (!addr->sadb_address_prefixlen)
912 BUG(); 912 BUG();
913 913
914 if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, 914 if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr,
915 x->props.family)) { 915 x->props.family)) {
916 addr = (struct sadb_address*) skb_put(skb, 916 addr = (struct sadb_address*) skb_put(skb,
917 sizeof(struct sadb_address)+sockaddr_size); 917 sizeof(struct sadb_address)+sockaddr_size);
918 addr->sadb_address_len = 918 addr->sadb_address_len =
@@ -1323,7 +1323,7 @@ static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_
1323 1323
1324 if (hdr->sadb_msg_seq) { 1324 if (hdr->sadb_msg_seq) {
1325 x = xfrm_find_acq_byseq(net, DUMMY_MARK, hdr->sadb_msg_seq); 1325 x = xfrm_find_acq_byseq(net, DUMMY_MARK, hdr->sadb_msg_seq);
1326 if (x && xfrm_addr_cmp(&x->id.daddr, xdaddr, family)) { 1326 if (x && !xfrm_addr_equal(&x->id.daddr, xdaddr, family)) {
1327 xfrm_state_put(x); 1327 xfrm_state_put(x);
1328 x = NULL; 1328 x = NULL;
1329 } 1329 }