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 @@ -238,7 +238,7 @@ void zebra_finalize(struct event *dummy)
238
238
zebra_ns_notify_close ();
239
239
240
240
/* Final shutdown of ns resources */
241
- ns_walk_func (zebra_ns_final_shutdown , NULL , NULL );
241
+ ns_walk_func (zebra_ns_kernel_shutdown , NULL , NULL );
242
242
243
243
zebra_rib_terminate ();
244
244
zebra_router_terminate ();
@@ -251,6 +251,8 @@ void zebra_finalize(struct event *dummy)
251
251
252
252
label_manager_terminate ();
253
253
254
+ ns_walk_func (zebra_ns_final_shutdown , NULL , NULL );
255
+
254
256
ns_terminate ();
255
257
frr_fini ();
256
258
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