File tree 3 files changed +22
-4
lines changed
3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ void zebra_finalize(struct event *dummy)
239
239
zebra_ns_notify_close ();
240
240
241
241
/* Final shutdown of ns resources */
242
- ns_walk_func (zebra_ns_final_shutdown , NULL , NULL );
242
+ ns_walk_func (zebra_ns_kernel_shutdown , NULL , NULL );
243
243
244
244
zebra_rib_terminate ();
245
245
zebra_router_terminate ();
@@ -252,6 +252,8 @@ void zebra_finalize(struct event *dummy)
252
252
253
253
label_manager_terminate ();
254
254
255
+ ns_walk_func (zebra_ns_final_shutdown , NULL , NULL );
256
+
255
257
ns_terminate ();
256
258
frr_fini ();
257
259
exit (0 );
Original file line number Diff line number Diff line change @@ -175,6 +175,22 @@ int zebra_ns_early_shutdown(struct ns *ns,
175
175
return NS_WALK_CONTINUE ;
176
176
}
177
177
178
+ /* During zebra shutdown, do kernel cleanup
179
+ * netlink sockets, ..
180
+ */
181
+ int zebra_ns_kernel_shutdown (struct ns * ns , void * param_in __attribute__((unused )),
182
+ void * * param_out __attribute__((unused )))
183
+ {
184
+ struct zebra_ns * zns = ns -> info ;
185
+
186
+ if (zns == NULL )
187
+ return NS_WALK_CONTINUE ;
188
+
189
+ kernel_terminate (zns , true);
190
+
191
+ return NS_WALK_CONTINUE ;
192
+ }
193
+
178
194
/* During zebra shutdown, do final cleanup
179
195
* after all dataplane work is complete.
180
196
*/
@@ -185,9 +201,7 @@ int zebra_ns_final_shutdown(struct ns *ns,
185
201
struct zebra_ns * zns = ns -> info ;
186
202
187
203
if (zns == NULL )
188
- return 0 ;
189
-
190
- kernel_terminate (zns , true);
204
+ return NS_WALK_CONTINUE ;
191
205
192
206
zebra_ns_delete (ns );
193
207
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ int zebra_ns_early_shutdown(struct ns *ns,
70
70
int zebra_ns_final_shutdown (struct ns * ns ,
71
71
void * param_in __attribute__((unused )),
72
72
void * * param_out __attribute__((unused )));
73
+ int zebra_ns_kernel_shutdown (struct ns * ns , void * param_in __attribute__((unused )),
74
+ void * * param_out __attribute__((unused )));
73
75
74
76
void zebra_ns_startup_continue (struct zebra_dplane_ctx * ctx );
75
77
You can’t perform that action at this time.
0 commit comments