Reported by Stefan Puch via e-mail on 2015-04-17:
Hello Jaroslav,
attached you can find a patch I've written in order to add an additional parameter "ignore_device" to ipwatchd.conf which can be used in automatic mode to blacklist a network device.
I had to problem, that didn't want to use the manual mode (in order to configure each network interface), but the automatic more always included my tap devices from OpenVPN. As there were two device at one host with different mac addresses I had always false positives when I disconnected VPN session. I did not managed to narrow that problem down in detail so I thought about an option to exclude a tap or tun device. While loopback device could easily be excluded through network flag I found no direct option to distinguish between real ethernet and tun / tap device.
So I added an additional parameter which allows to exclude (ignore) a network device, of cause you could it multiple times. The only limitation so far is, that this parameter MUST be specified before "iface_configuration" parameter in config file. That is because I didn't want to dynamically decrease the array of monitored devices afterwards, so the interfaces to be ignored must be known beforehand. They are simply skipped like the loopback interface.
Maybe you want to take a look at this patch, feel free to integrate / improve / modify it it is tested against last release 1.2.1.
Kind regards
Stefan
Attachments: ignore-interface-patch.zip
Reported by Stefan Puch via e-mail on 2015-04-17:
Hello Jaroslav,
attached you can find a patch I've written in order to add an additional parameter "ignore_device" to ipwatchd.conf which can be used in automatic mode to blacklist a network device.
I had to problem, that didn't want to use the manual mode (in order to configure each network interface), but the automatic more always included my tap devices from OpenVPN. As there were two device at one host with different mac addresses I had always false positives when I disconnected VPN session. I did not managed to narrow that problem down in detail so I thought about an option to exclude a tap or tun device. While loopback device could easily be excluded through network flag I found no direct option to distinguish between real ethernet and tun / tap device.
So I added an additional parameter which allows to exclude (ignore) a network device, of cause you could it multiple times. The only limitation so far is, that this parameter MUST be specified before "iface_configuration" parameter in config file. That is because I didn't want to dynamically decrease the array of monitored devices afterwards, so the interfaces to be ignored must be known beforehand. They are simply skipped like the loopback interface.
Maybe you want to take a look at this patch, feel free to integrate / improve / modify it it is tested against last release 1.2.1.
Kind regards
Stefan
Attachments: ignore-interface-patch.zip