tangled
alpha
login
or
join now
jcs.org
/
openbsd-src
0
fork
atom
jcs's openbsd hax
openbsd
0
fork
atom
overview
issues
pulls
pipelines
Fix segfault in ospfd and ospf6d shutdown code
ok phessler
jan
8 months ago
e4e377e2
7a953c5f
+18
-18
2 changed files
expand all
collapse all
unified
split
usr.sbin
ospf6d
ospfe.c
ospfd
ospfe.c
+9
-9
usr.sbin/ospf6d/ospfe.c
reviewed
···
1
1
-
/* $OpenBSD: ospfe.c,v 1.78 2024/11/21 13:38:14 claudio Exp $ */
1
1
+
/* $OpenBSD: ospfe.c,v 1.79 2025/07/22 18:39:19 jan Exp $ */
2
2
3
3
/*
4
4
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
···
201
201
struct area *area;
202
202
struct iface *iface;
203
203
204
204
-
/* close pipes */
205
205
-
imsgbuf_write(&iev_rde->ibuf);
206
206
-
imsgbuf_clear(&iev_rde->ibuf);
207
207
-
close(iev_rde->ibuf.fd);
208
208
-
imsgbuf_write(&iev_main->ibuf);
209
209
-
imsgbuf_clear(&iev_main->ibuf);
210
210
-
close(iev_main->ibuf.fd);
211
211
-
212
204
/* stop all interfaces and remove all areas */
213
205
while ((area = LIST_FIRST(&oeconf->area_list)) != NULL) {
214
206
LIST_FOREACH(iface, &area->iface_list, entry) {
···
222
214
}
223
215
224
216
close(oeconf->ospf_socket);
217
217
+
218
218
+
/* close pipes */
219
219
+
imsgbuf_write(&iev_rde->ibuf);
220
220
+
imsgbuf_clear(&iev_rde->ibuf);
221
221
+
close(iev_rde->ibuf.fd);
222
222
+
imsgbuf_write(&iev_main->ibuf);
223
223
+
imsgbuf_clear(&iev_main->ibuf);
224
224
+
close(iev_main->ibuf.fd);
225
225
226
226
/* clean up */
227
227
free(iev_rde);
+9
-9
usr.sbin/ospfd/ospfe.c
reviewed
···
1
1
-
/* $OpenBSD: ospfe.c,v 1.120 2024/11/21 13:38:14 claudio Exp $ */
1
1
+
/* $OpenBSD: ospfe.c,v 1.121 2025/07/22 18:39:19 jan Exp $ */
2
2
3
3
/*
4
4
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
···
212
212
struct area *area;
213
213
struct iface *iface;
214
214
215
215
-
/* close pipes */
216
216
-
imsgbuf_write(&iev_rde->ibuf);
217
217
-
imsgbuf_clear(&iev_rde->ibuf);
218
218
-
close(iev_rde->ibuf.fd);
219
219
-
imsgbuf_write(&iev_main->ibuf);
220
220
-
imsgbuf_clear(&iev_main->ibuf);
221
221
-
close(iev_main->ibuf.fd);
222
222
-
223
215
/* stop all interfaces and remove all areas */
224
216
while ((area = LIST_FIRST(&oeconf->area_list)) != NULL) {
225
217
LIST_FOREACH(iface, &area->iface_list, entry) {
···
234
226
235
227
nbr_del(nbr_find_peerid(NBR_IDSELF));
236
228
close(oeconf->ospf_socket);
229
229
+
230
230
+
/* close pipes */
231
231
+
imsgbuf_write(&iev_rde->ibuf);
232
232
+
imsgbuf_clear(&iev_rde->ibuf);
233
233
+
close(iev_rde->ibuf.fd);
234
234
+
imsgbuf_write(&iev_main->ibuf);
235
235
+
imsgbuf_clear(&iev_main->ibuf);
236
236
+
close(iev_main->ibuf.fd);
237
237
238
238
/* clean up */
239
239
free(iev_rde);