aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKazunori MIYAZAWA <miyazawa@linux-ipv6.org>2007-02-13 15:57:16 -0500
committerDavid S. Miller <davem@davemloft.net>2007-02-13 15:57:16 -0500
commit928ba4169dc1d82c83105831f5ddb5472379b440 (patch)
tree0c10cafc4b09306604e192a52a23e212e6ad50de /net
parent73d605d1abbd70ef67b7660cf2ff177259960756 (diff)
[IPSEC]: Fix the address family to refer encap_family
Fix the address family to refer encap_family when comparing with a kernel generated xfrm_state Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index c394b413f651..946b715db5ec 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1550,7 +1550,7 @@ xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x,
1550 unsigned short family) 1550 unsigned short family)
1551{ 1551{
1552 if (xfrm_state_kern(x)) 1552 if (xfrm_state_kern(x))
1553 return tmpl->optional && !xfrm_state_addr_cmp(tmpl, x, family); 1553 return tmpl->optional && !xfrm_state_addr_cmp(tmpl, x, tmpl->encap_family);
1554 return x->id.proto == tmpl->id.proto && 1554 return x->id.proto == tmpl->id.proto &&
1555 (x->id.spi == tmpl->id.spi || !tmpl->id.spi) && 1555 (x->id.spi == tmpl->id.spi || !tmpl->id.spi) &&
1556 (x->props.reqid == tmpl->reqid || !tmpl->reqid) && 1556 (x->props.reqid == tmpl->reqid || !tmpl->reqid) &&