if (p->dir > XFRM_POLICY_OUT) return NULL;  
static struct xfrm_policy *xfrm_compile_policy(u16 family, int opt,					       u8 *data, int len, int *dir){	struct xfrm_userpolicy_info *p = (struct xfrm_userpolicy_info *)data;	struct xfrm_user_tmpl *ut = (struct xfrm_user_tmpl *) (p + 1);	struct xfrm_policy *xp;	int nr;	switch (family) {	case AF_INET:		if (opt != IP_XFRM_POLICY) {			*dir = -EOPNOTSUPP;			return NULL;		}		break;#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)	case AF_INET6:		if (opt != IPV6_XFRM_POLICY) {			*dir = -EOPNOTSUPP;			return NULL;		}		break;#endif	default:		*dir = -EINVAL;		return NULL;	}	*dir = -EINVAL;	if (len < sizeof(*p) ||	    verify_newpolicy_info(p))		return NULL;	nr = ((len - sizeof(*p)) / sizeof(*ut));	if (nr > XFRM_MAX_DEPTH)		return NULL;	xp = xfrm_policy_alloc(GFP_KERNEL);	if (xp == NULL) {		*dir = -ENOBUFS;		return NULL;	}	copy_from_user_policy(xp, p);	copy_templates(xp, ut, nr);	*dir = p->dir;	return xp;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a4f1bac62564049ea4718c4624b0fadc9f597c84/xfrm_user.c/buggy/net/xfrm/xfrm_user.c