diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2020-11-29 09:39:34 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2020-11-29 09:39:34 +0000 |
commit | d197cef80a3fa85a4ff7aa8cce115c9c592233d6 (patch) | |
tree | 72c09692f0155c070979ba0c1630c0570d180de5 /sbin/slaacd | |
parent | 9e44f814bf68d158ae080c38771541b9a11cec28 (diff) |
Fix previous; we need to set the icmp6ev in the interface to NULL
otherwise we are referencing the wrong one when the rdomain changes.
Sorry for not spotting it earlier.
Diffstat (limited to 'sbin/slaacd')
-rw-r--r-- | sbin/slaacd/frontend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c index 5d01cfb8960..f657c79e3b5 100644 --- a/sbin/slaacd/frontend.c +++ b/sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.40 2020/11/28 22:06:25 naddy Exp $ */ +/* $OpenBSD: frontend.c,v 1.41 2020/11/29 09:39:33 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -1139,6 +1139,8 @@ unref_icmp6ev(struct iface *iface) { struct icmp6_ev *icmp6ev = iface->icmp6ev; + iface->icmp6ev = NULL; + if (icmp6ev != NULL) { icmp6ev->refcnt--; if (icmp6ev->refcnt == 0) { @@ -1146,7 +1148,6 @@ unref_icmp6ev(struct iface *iface) close(EVENT_FD(&icmp6ev->ev)); free(icmp6ev); } - icmp6ev = NULL; } } |