use variable ifname in reconnection checks