Delete all of our interfaces. checkName: only delete interfaces that contain our name
( self, checkName=True )
| 513 | return connections |
| 514 | |
| 515 | def deleteIntfs( self, checkName=True ): |
| 516 | """Delete all of our interfaces. |
| 517 | checkName: only delete interfaces that contain our name""" |
| 518 | # In theory the interfaces should go away after we shut down. |
| 519 | # However, this takes time, so we're better off removing them |
| 520 | # explicitly so that we won't get errors if we run before they |
| 521 | # have been removed by the kernel. Unfortunately this is very slow, |
| 522 | # at least with Linux kernels before 2.6.33 |
| 523 | for intf in list( self.intfs.values() ): |
| 524 | # Protect against deleting hardware interfaces |
| 525 | if ( self.name in intf.name ) or ( not checkName ): |
| 526 | intf.delete() |
| 527 | info( '.' ) |
| 528 | |
| 529 | # Routing support |
| 530 |
no test coverage detected