|
@@ -271,6 +271,7 @@ void intf_close ( struct interface *intf, int rc ) {
|
271
|
271
|
* unplugs the interface.
|
272
|
272
|
*/
|
273
|
273
|
void intf_shutdown ( struct interface *intf, int rc ) {
|
|
274
|
+ struct interface tmp;
|
274
|
275
|
|
275
|
276
|
DBGC ( INTF_COL ( intf ), "INTF " INTF_FMT " shutting down (%s)\n",
|
276
|
277
|
INTF_DBG ( intf ), strerror ( rc ) );
|
|
@@ -278,11 +279,15 @@ void intf_shutdown ( struct interface *intf, int rc ) {
|
278
|
279
|
/* Block further operations */
|
279
|
280
|
intf_nullify ( intf );
|
280
|
281
|
|
281
|
|
- /* Notify destination of close */
|
282
|
|
- intf_close ( intf, rc );
|
|
282
|
+ /* Transfer destination to temporary interface */
|
|
283
|
+ tmp.dest = intf->dest;
|
|
284
|
+ intf->dest = &null_intf;
|
|
285
|
+
|
|
286
|
+ /* Notify destination of close via temporary interface */
|
|
287
|
+ intf_close ( &tmp, rc );
|
283
|
288
|
|
284
|
|
- /* Unplug interface */
|
285
|
|
- intf_unplug ( intf );
|
|
289
|
+ /* Unplug temporary interface */
|
|
290
|
+ intf_unplug ( &tmp );
|
286
|
291
|
}
|
287
|
292
|
|
288
|
293
|
/**
|