Skip to content

Commit

Permalink
xfrm: Fix installation of AH IPsec SAs
Browse files Browse the repository at this point in the history
The SPI check introduced in ea9884b
was intended for IPComp SAs but actually prevented AH SAs from getting
installed (depending on the SPI).

Fixes: ea9884b ("xfrm: check user specified spi for IPComp")
Cc: Fan Du <[email protected]>
Signed-off-by: Tobias Brunner <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
  • Loading branch information
tobiasbrunner authored and klassert committed Jun 30, 2014
1 parent b7eea45 commit a0e5ef5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
attrs[XFRMA_ALG_AEAD] ||
attrs[XFRMA_ALG_CRYPT] ||
attrs[XFRMA_ALG_COMP] ||
attrs[XFRMA_TFCPAD] ||
(ntohl(p->id.spi) >= 0x10000))

attrs[XFRMA_TFCPAD])
goto out;
break;

Expand Down Expand Up @@ -207,7 +205,8 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
attrs[XFRMA_ALG_AUTH] ||
attrs[XFRMA_ALG_AUTH_TRUNC] ||
attrs[XFRMA_ALG_CRYPT] ||
attrs[XFRMA_TFCPAD])
attrs[XFRMA_TFCPAD] ||
(ntohl(p->id.spi) >= 0x10000))
goto out;
break;

Expand Down

0 comments on commit a0e5ef5

Please sign in to comment.