diff options
| author | Patrick McHardy <kaber@trash.net> | 2005-03-31 05:19:27 -0800 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2005-03-31 05:19:27 -0800 |
| commit | 0038bccf6b28af630e05c75cc1ef516ecd7e92f9 (patch) | |
| tree | 7ed7bf96b458f3c8113799954f16ab521c84f538 | |
| parent | 71bf6e6d7605727cc287644a11da8e70fd2c63b6 (diff) | |
[IPSEC]: Check SPI in xfrm_state_find()
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/xfrm/xfrm_state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 102bb826e273..d96218fc01c0 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -315,7 +315,8 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, x->props.reqid == tmpl->reqid && xfrm_state_addr_check(x, daddr, saddr, family) && tmpl->mode == x->props.mode && - tmpl->id.proto == x->id.proto) { + tmpl->id.proto == x->id.proto && + (tmpl->id.spi == x->id.spi || !tmpl->id.spi)) { /* Resolution logic: 1. There is a valid state with matching selector. Done. |
