[PATCH 4.9 22/24] xfrm: refine validation of template and selector families