@@ -19,7 +19,8 @@ DEFINE_MTYPE_STATIC(NHRPD, NHRP_SHORTCUT, "NHRP shortcut");
1919static struct route_table * shortcut_rib [AFI_MAX ];
2020
2121static void nhrp_shortcut_do_purge (struct event * t );
22- static void nhrp_shortcut_delete (struct nhrp_shortcut * s );
22+ static void nhrp_shortcut_delete (struct nhrp_shortcut * s ,
23+ void * arg __attribute__((__unused__ )));
2324static void nhrp_shortcut_send_resolution_req (struct nhrp_shortcut * s );
2425
2526static void nhrp_shortcut_check_use (struct nhrp_shortcut * s )
@@ -72,7 +73,7 @@ static void nhrp_shortcut_cache_notify(struct notifier_block *n,
7273 s -> route_installed = 0 ;
7374 }
7475 if (cmd == NOTIFY_CACHE_DELETE )
75- nhrp_shortcut_delete (s );
76+ nhrp_shortcut_delete (s , NULL );
7677 break ;
7778 }
7879}
@@ -132,7 +133,8 @@ static void nhrp_shortcut_update_binding(struct nhrp_shortcut *s,
132133 }
133134}
134135
135- static void nhrp_shortcut_delete (struct nhrp_shortcut * s )
136+ static void nhrp_shortcut_delete (struct nhrp_shortcut * s ,
137+ void * arg __attribute__((__unused__ )))
136138{
137139 struct route_node * rn ;
138140 afi_t afi = family2afi (PREFIX_FAMILY (s -> p ));
@@ -158,7 +160,7 @@ static void nhrp_shortcut_do_purge(struct event *t)
158160{
159161 struct nhrp_shortcut * s = EVENT_ARG (t );
160162 s -> t_timer = NULL ;
161- nhrp_shortcut_delete (s );
163+ nhrp_shortcut_delete (s , NULL );
162164}
163165
164166static struct nhrp_shortcut * nhrp_shortcut_get (struct prefix * p )
@@ -469,6 +471,8 @@ void nhrp_shortcut_init(void)
469471
470472void nhrp_shortcut_terminate (void )
471473{
474+ nhrp_shortcut_foreach (AFI_IP , nhrp_shortcut_delete , NULL );
475+ nhrp_shortcut_foreach (AFI_IP6 , nhrp_shortcut_delete , NULL );
472476 route_table_finish (shortcut_rib [AFI_IP ]);
473477 route_table_finish (shortcut_rib [AFI_IP6 ]);
474478}
0 commit comments