Skip to content

Commit

Permalink
key: Use xfrm_addr_cmp() where appropriate.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
  • Loading branch information
YOSHIFUJI Hideaki committed Jun 11, 2008
1 parent 5f95ac9 commit 81b302a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,7 @@ static struct sk_buff *__pfkey_xfrm_state2msg(struct xfrm_state *x,
}

/* identity & sensitivity */

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
)
if (xfrm_addr_cmp(&x->sel.saddr, &x->props.saddr, x->props.family))
size += sizeof(struct sadb_address) + sockaddr_size;

if (add_keys) {
Expand Down

0 comments on commit 81b302a

Please sign in to comment.