Commit 928ba416 authored by Kazunori MIYAZAWA's avatar Kazunori MIYAZAWA Committed by David S. Miller

[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: default avatarKazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73d605d1
...@@ -1550,7 +1550,7 @@ xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x, ...@@ -1550,7 +1550,7 @@ xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x,
unsigned short family) unsigned short family)
{ {
if (xfrm_state_kern(x)) if (xfrm_state_kern(x))
return tmpl->optional && !xfrm_state_addr_cmp(tmpl, x, family); return tmpl->optional && !xfrm_state_addr_cmp(tmpl, x, tmpl->encap_family);
return x->id.proto == tmpl->id.proto && return x->id.proto == tmpl->id.proto &&
(x->id.spi == tmpl->id.spi || !tmpl->id.spi) && (x->id.spi == tmpl->id.spi || !tmpl->id.spi) &&
(x->props.reqid == tmpl->reqid || !tmpl->reqid) && (x->props.reqid == tmpl->reqid || !tmpl->reqid) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment