diff options
author | 2021-03-01 16:38:07 +0000 | |
---|---|---|
committer | 2021-03-01 16:38:07 +0000 | |
commit | ca71a65578a7d83642d840168bb530f540c9f465 (patch) | |
tree | eadc8b2ee8bc41648240a0c2dc4ca635a2a07088 | |
parent | Log adding and deleting of IP addresses as well as nameservers. (diff) | |
download | wireguard-openbsd-ca71a65578a7d83642d840168bb530f540c9f465.tar.xz wireguard-openbsd-ca71a65578a7d83642d840168bb530f540c9f465.zip |
Make sure sa_policy is not NULL in sa_configure_iface(). This can happen
if the SA is deleted because of a failed policy lookup.
-rw-r--r-- | sbin/iked/policy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/iked/policy.c b/sbin/iked/policy.c index 189dd822596..bef0cbf9850 100644 --- a/sbin/iked/policy.c +++ b/sbin/iked/policy.c @@ -1,4 +1,4 @@ -/* $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> @@ -683,7 +683,7 @@ sa_configure_iface(struct iked *env, struct iked_sa *sa, int add) 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) { |