netimpair
netimpair copied to clipboard
Remove ifb kernel module on teardown
I've noticed that netimpair neglects to delete the ifb0 and ifb1 interfaces added by modprobe ifb (i.e. never unloads the kernel module).
I think it would be sensible to detect if the module is loaded at start (modprobe --first-time ifb will error if it is) and then run modprobe -r ifb on tear down if the module wasn't active at start.
This preserves the system state on target machines after netimpair has done it's dirty work ;)