Anirudh Gupta b38ff4075a xfrm: Fix xfrm sel prefix length validation
Family of src/dst can be different from family of selector src/dst.
Use xfrm selector family to validate address prefix length,
while verifying new sa from userspace.

Validated patch with this command:
ip xfrm state add src 1.1.6.1 dst 1.1.6.2 proto esp spi 4260196 \
reqid 20004 mode tunnel aead "rfc4106(gcm(aes))" \
0x1111016400000000000000000000000044440001 128 \
sel src 1011:1:4::2/128 sel dst 1021:1:4::2/128 dev Port5

Fixes: 07bf7908950a ("xfrm: Validate address prefix lengths in the xfrm selector.")
Signed-off-by: Anirudh Gupta <anirudh.gupta@sophos.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2019-05-28 09:16:30 +02:00
..
2019-05-05 10:25:52 -07:00
2019-04-21 10:37:26 -07:00
2019-04-27 09:07:04 -07:00
2019-05-16 17:00:13 -07:00
2019-05-16 14:25:58 -07:00
2018-11-10 16:55:11 -08:00
2019-03-26 08:35:36 +01:00
2019-05-09 09:02:46 -07:00
2019-04-19 14:07:40 -07:00
2019-04-19 14:07:40 -07:00