if the SA is deleted because of a failed policy lookup.
-/* $OpenBSD: policy.c,v 1.78 2021/02/13 16:14:12 tobhe Exp $ */
+/* $OpenBSD: policy.c,v 1.79 2021/03/01 16:38:07 tobhe Exp $ */
/*
* Copyright (c) 2020-2021 Tobias Heider <tobhe@openbsd.org>
struct sockaddr_in6 mask6;
int rdomain;
- if (sa->sa_policy->pol_iface == 0)
+ if (sa->sa_policy == NULL || sa->sa_policy->pol_iface == 0)
return (0);
if (sa->sa_cp_addr) {